mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
Removed installedLibrariesWithDuplicates since it's no more used
This commit is contained in:
parent
627d4fb536
commit
bf1b523854
@ -59,7 +59,6 @@ public class LibrariesIndexer {
|
||||
|
||||
private LibrariesIndex index;
|
||||
private final LibraryList installedLibraries = new LibraryList();
|
||||
private final LibraryList installedLibrariesWithDuplicates = new LibraryList();
|
||||
private List<File> 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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user