diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java index 5adcbf201..462cdd353 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java @@ -59,7 +59,6 @@ public class LibrariesIndexer { private LibrariesIndex index; private final LibraryList installedLibraries = new LibraryList(); - private final LibraryList installedLibrariesWithDuplicates = new LibraryList(); private List librariesFolders; private final File indexFile; private final File stagingFolder; @@ -113,7 +112,6 @@ public class LibrariesIndexer { public void rescanLibraries() { // Clear all installed flags installedLibraries.clear(); - installedLibrariesWithDuplicates.clear(); if (index.getLibraries() == null) { return; @@ -180,11 +178,6 @@ public class LibrariesIndexer { throw new IOException(lib.getSrcFolder().getAbsolutePath()); } installedLibraries.addOrReplace(lib); - if (isSketchbook) { - installedLibrariesWithDuplicates.add(lib); - } else { - installedLibrariesWithDuplicates.addOrReplace(lib); - } return; } @@ -196,11 +189,6 @@ public class LibrariesIndexer { throw new IOException(lib.getSrcFolder().getAbsolutePath()); } installedLibraries.addOrReplaceArchAware(lib); - if (isSketchbook) { - installedLibrariesWithDuplicates.add(lib); - } else { - installedLibrariesWithDuplicates.addOrReplaceArchAware(lib); - } // Check if we can find the same library in the index // and mark it as installed @@ -229,15 +217,6 @@ public class LibrariesIndexer { return new LibraryList(installedLibraries); } - // Same as getInstalledLibraries(), but allow duplicates between - // builtin+package libraries and sketchbook installed libraries. - // However, do not report duplicates among builtin and packages, to - // allow any package to override builtin libraries without being - // reported as duplicates. - public LibraryList getInstalledLibrariesWithDuplicates() { - return installedLibrariesWithDuplicates; - } - public File getStagingFolder() { return stagingFolder; } diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 4d6401701..328d57750 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -816,25 +816,6 @@ public class BaseNoGui { .format("Unable to list header files in {0}", lib.getSrcFolder()), e); } } - // repeat for ALL libraries, to pick up duplicates not visible normally. - // any new libraries found here are NEVER used, but they are added to the - // end of already-found headers, to allow Compiler to report them if - // the sketch tries to use them. - for (UserLibrary lib : librariesIndexer.getInstalledLibrariesWithDuplicates()) { - try { - String headers[] = headerListFromIncludePath(lib.getSrcFolder()); - for (String header : headers) { - LibraryList list = importToLibraryTable.get(header); - if (list != null) { - if (!(list.hasLibrary(lib))) { - list.addLast(lib); - //System.out.println(" duplicate lib: " + lib.getInstalledFolder().getPath()); - } - } - } - } catch (IOException e) { - } - } } static public void initParameters(String args[]) throws Exception {