-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Advise of duplicate libraries after compiling #2850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advise of duplicate libraries after compiling #2850
Conversation
Here's another example, when the copy of SPI in the sketchbook libraries is an old copy from Arduino 1.0.6. For users who long-ago made copies of libraries that later conflict or need to be updated, this pull request adds a nice message where they would have only seen difficult compile errors from deep within the libraries. |
Please consider merging this before the 1.6.3 release. It's very low risk. The only practical effect is printing a message, so in a worst case scenario, it prints a confusing message. No actual build behavior is changed. I'd like to move forward on redoing the library dependency detection (1.6.2 broke that pull request). I want to build more pull requests for more features on top of this work, so I'm really hoping you can find a few moments to review this low risk change and merge it. |
Advise of duplicate libraries after compiling
Thanks @PaulStoffregen |
thanks :) |
Just want to say thanks again for adding this. I know it was tight timing to squeeze it in between 1.6.2 and 1.6.3 and I really appreciate your effort. This patch is really helping with end user support on forums! Here's a perfect example: |
🎱 |
When 2 or more libraries match to the same #include in the sketch, this prints a helpful message after compiling. As discussed on issue #2847 and the mail list...
Internally, this change extends LibrariesIndexer to keep another list of libraries which includes duplicates. In BaseNoGui, importToLibraryTable is extended to map header names to LibraryList objects, instead of only a single UserLibrary object. The building of importToLibraryTable is improved to also add the duplicates found by LibrariesIndexer. Compiler is extended to use the new importToLibraryTable, and take note of any LibraryList is uses with more than 1 library. After compiling, those are used to print the helpful message.