Skip to content

Commit 5cb5996

Browse files
committed
Don't forbid unknown files in a library
Warning about unknown folders was considered bad in arduino/Arduino#1692 but the problem is still present in arduino-builder. This has caused issues like arduino#70 (comment) which resulted in arduino#162 The original arguments in Arduino/pull/1692 still apply: * It breaks forward compatibility if we later add more files or directories to the library format. * It breaks for people who want to have some extra stuff in their library (say, .gitignore or a README file). We can't keep a list of "allowed" stuff, since there will always be stuff missing. Signed-off-by: Mikael Falkvidd [email protected] <[email protected]>
1 parent bc2c38f commit 5cb5996

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

Diff for: src/arduino.cc/builder/constants/constants.go

-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ const MSG_USING_CACHED_INCLUDES = "Using cached library dependencies for file: {
192192
const MSG_WARNING_LIB_INVALID_CATEGORY = "WARNING: Category '{0}' in library {1} is not valid. Setting to '{2}'"
193193
const MSG_WARNING_PLATFORM_MISSING_VALUE = "Warning: platform.txt from core '{0}' misses property '{1}', using default value '{2}'. Consider upgrading this core."
194194
const MSG_WARNING_PLATFORM_OLD_VALUES = "Warning: platform.txt from core '{0}' contains deprecated {1}, automatically converted to {2}. Consider upgrading this core."
195-
const MSG_WARNING_SPURIOUS_FILE_IN_LIB = "WARNING: Spurious {0} folder in '{1}' library"
196195
const MSG_WRONG_PROPERTIES_FILE = "Property line '{0}' in file {1} is invalid"
197196
const MSG_WRONG_PROPERTIES = "Property line '{0}' is invalid"
198197
const PACKAGE_NAME = "name"

Diff for: src/arduino.cc/builder/libraries_loader.go

-10
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,6 @@ func makeNewLibrary(libraryFolder string, debugLevel int, logger i18n.Logger) (*
153153
return nil, i18n.WrapError(err)
154154
}
155155

156-
if debugLevel >= 0 {
157-
for _, subFolder := range subFolders {
158-
if utils.IsSCCSOrHiddenFile(subFolder) {
159-
if !utils.IsSCCSFile(subFolder) && utils.IsHiddenFile(subFolder) {
160-
logger.Fprintln(os.Stdout, constants.LOG_LEVEL_WARN, constants.MSG_WARNING_SPURIOUS_FILE_IN_LIB, filepath.Base(subFolder.Name()), libProperties[constants.LIBRARY_NAME])
161-
}
162-
}
163-
}
164-
}
165-
166156
if libProperties[constants.LIBRARY_ARCHITECTURES] == constants.EMPTY_STRING {
167157
libProperties[constants.LIBRARY_ARCHITECTURES] = constants.LIBRARY_ALL_ARCHS
168158
}

0 commit comments

Comments
 (0)