-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Library installed in sketchbook is given priority when core bundled library is better architecture match #572
Comments
Thanks for reporting, @per1234 |
I'd also add that, as a development aid, we should allow a flag in the CLI to permit the use of a llibrary from the user folder to override the core one |
ESP32 boards package has this problem with WiFi library. builder uses the old WiFi library bundled with IDE instead of ESP32 WiFi library |
The IDE version 1.8.11 should be removed from download page because of this issue. https://stackoverflow.com/questions/60036869/multiple-libraries-were-found-for-wire |
Bug Report
Current behavior
./arduino-cli core update-index --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
./arduino-cli core install esp8266:esp8266 --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
./arduino-cli lib install SD
./arduino-cli compile --fqbn esp8266:esp8266:generic Foo
Compilation fails:
Expected behavior
The
architectures
field of C:\Users\per\Documents\Arduino\libraries\SD\library.properties:https://github.com/arduino-libraries/SD/blob/1.2.4/library.properties#L9
The
architectures
field of C:\Users\per\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\SDhttps://github.com/esp8266/Arduino/blob/2.6.3/libraries/SD/library.properties#L9
Since the library bundled with the core is a better architecture match than the one installed in the sketchbook (explicit match > wildcard match), it should get priority. This is how the priority system has worked historically.
Environment
arduino-cli version
): 0.7.0-rc1 Commit: afdf259Additional context
The bug does not occur at fc9b70b.
The bug does occur at cca6936.
I remember we had similar problems during the development of arduino-builder. It might be helpful to clearly document the intended library include priorities. This would make it easy to create tests to ensure the correct priorities are maintained.
Originally reported at:
https://forum.arduino.cc/index.php?topic=661342.msg4458460#msg4458460
The text was updated successfully, but these errors were encountered: