Skip to content

Commit 3bec912

Browse files
committed
Reintroduced warning on development leftovers in 1.5 libraries.
See #1692
1 parent a4a6601 commit 3bec912

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

app/src/processing/app/packages/Library.java

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package processing.app.packages;
22

3-
import processing.app.helpers.FileUtils;
4-
import processing.app.helpers.PreferencesMap;
3+
import static processing.app.helpers.StringUtils.wildcardMatch;
54

65
import java.io.File;
76
import java.io.IOException;
@@ -10,7 +9,8 @@
109
import java.util.Comparator;
1110
import java.util.List;
1211

13-
import static processing.app.helpers.StringUtils.wildcardMatch;
12+
import processing.app.helpers.FileUtils;
13+
import processing.app.helpers.PreferencesMap;
1414

1515
public class Library {
1616

@@ -36,7 +36,7 @@ public class Library {
3636
* Scans inside a folder and create a Library object out of it. Automatically
3737
* detects pre-1.5 libraries. Automatically fills metadata from
3838
* library.properties file if found.
39-
*
39+
*
4040
* @param libFolder
4141
* @return
4242
*/
@@ -69,6 +69,17 @@ private static Library createLibrary(File libFolder) throws IOException {
6969
if (!srcFolder.exists() || !srcFolder.isDirectory())
7070
throw new IOException("Missing 'src' folder");
7171

72+
// 3. Warn if root folder contains development leftovers
73+
for (File file : libFolder.listFiles()) {
74+
if (file.isDirectory()) {
75+
if (FileUtils.isSCCSOrHiddenFile(file)) {
76+
System.out.println("WARNING: Spurious " + file.getName() +
77+
" folder in '" + properties.get("name") + "' library");
78+
continue;
79+
}
80+
}
81+
}
82+
7283
// Extract metadata info
7384
List<String> archs = new ArrayList<String>();
7485
for (String arch : properties.get("architectures").split(","))

build/shared/revisions.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
ARDUINO 1.5.5 BETA
33

4+
NOTICE:
5+
The 1.5 library format is under heavy review on the Arduino Developers mailing list.
6+
We suggest to delay the adoption of the new format until a stable 1.5.x is released.
7+
48
[ide]
59
* Added missing keywords: YunServer, YunClient, pow
610
* Improved folder ignore: now hidden, starting with a dot, and SCCS folders are ignored
@@ -11,6 +15,7 @@ ARDUINO 1.5.5 BETA
1115
* (windows) Upgraded embedded Java runtime to version 7: much faster startup
1216
* Improved files open/save dialogs
1317
* Added line numbers, can be enabled/disabled from preferences (Cayci Gorlitsky)
18+
* Removed check on forbidden file in 1.5 formatted libraries (#1692)
1419

1520
[libraries]
1621
* avr: Fixed buffer overflow in File::doBuffer() (dreggy)

0 commit comments

Comments
 (0)