From 3bec9121cd1ae442c87db673747ab2fef27d32ad Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 20 Nov 2013 12:12:05 +0100 Subject: [PATCH] Reintroduced warning on development leftovers in 1.5 libraries. See #1692 --- app/src/processing/app/packages/Library.java | 19 +++++++++++++++---- build/shared/revisions.txt | 5 +++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/packages/Library.java b/app/src/processing/app/packages/Library.java index e70a62e03..a6322ab44 100644 --- a/app/src/processing/app/packages/Library.java +++ b/app/src/processing/app/packages/Library.java @@ -1,7 +1,6 @@ package processing.app.packages; -import processing.app.helpers.FileUtils; -import processing.app.helpers.PreferencesMap; +import static processing.app.helpers.StringUtils.wildcardMatch; import java.io.File; import java.io.IOException; @@ -10,7 +9,8 @@ import java.util.Arrays; import java.util.Comparator; import java.util.List; -import static processing.app.helpers.StringUtils.wildcardMatch; +import processing.app.helpers.FileUtils; +import processing.app.helpers.PreferencesMap; public class Library { @@ -36,7 +36,7 @@ public class Library { * Scans inside a folder and create a Library object out of it. Automatically * detects pre-1.5 libraries. Automatically fills metadata from * library.properties file if found. - * + * * @param libFolder * @return */ @@ -69,6 +69,17 @@ public class Library { if (!srcFolder.exists() || !srcFolder.isDirectory()) throw new IOException("Missing 'src' folder"); + // 3. Warn if root folder contains development leftovers + for (File file : libFolder.listFiles()) { + if (file.isDirectory()) { + if (FileUtils.isSCCSOrHiddenFile(file)) { + System.out.println("WARNING: Spurious " + file.getName() + + " folder in '" + properties.get("name") + "' library"); + continue; + } + } + } + // Extract metadata info List archs = new ArrayList(); for (String arch : properties.get("architectures").split(",")) diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 57bdbba55..3a669698a 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,6 +1,10 @@ ARDUINO 1.5.5 BETA +NOTICE: +The 1.5 library format is under heavy review on the Arduino Developers mailing list. +We suggest to delay the adoption of the new format until a stable 1.5.x is released. + [ide] * Added missing keywords: YunServer, YunClient, pow * Improved folder ignore: now hidden, starting with a dot, and SCCS folders are ignored @@ -11,6 +15,7 @@ ARDUINO 1.5.5 BETA * (windows) Upgraded embedded Java runtime to version 7: much faster startup * Improved files open/save dialogs * Added line numbers, can be enabled/disabled from preferences (Cayci Gorlitsky) +* Removed check on forbidden file in 1.5 formatted libraries (#1692) [libraries] * avr: Fixed buffer overflow in File::doBuffer() (dreggy)