Closed
Description
Describe the problem
In Examples menu a multi-platform library examples are shown instated of bundled library with the same name.
My ArduinoOTA library examples are in Examples menu even when ESP8266 board is selected. The ESP8266 platform has a bundled ArduinoOTA library.
Operating system
Linux Mint
Additional context
Examples respect library priority in Arduino IDE 1.x.
Additional reports:
Issue checklist
- I searched for previous reports inI verified the problem still occurs when using theMy report contains all necessary details
Activity
per1234 commentedon Feb 7, 2022
I transferred this issue to the Arduino CLI repository because it seems the bug is in this code base:
But this is not the library that is used when compiling for that board:
The esp8266 platform bundled library is "architecture optimized" for the
esp8266
architecture of theesp8266:esp8266:generic
:https://github.com/esp8266/Arduino/blob/3.0.2/libraries/ArduinoOTA/library.properties#L9
This causes it to be given priority by the library dependency resolution system over the sketchbook installed "ArduinoOTA" library, which is only "architecture compatible":
https://github.com/jandrassy/ArduinoOTA/blob/1.0.7/library.properties#L9
As mentioned by jandrassy, Arduino IDE 2.x incorrectly shows the sketchbook installed "ArduinoOTA" library examples in the File > Examples menu, while Arduino IDE 1.8.19 and older correctly show the examples associated with the library that has architecture priority for the currently selected board:
esp8266:esp8266
platform - the examples of the platform bundled "ArduinoOTA" library:[-]Examples menu - bundled versus installed libraries priority[/-][+]`lib examples` does not respect bundled versus installed libraries priority[/+]Added test for a similar bug in `lib examples`
lib list --fqbn
andlib examples --fqbn
do not show platform bundled lib when lib of same name is installed globally #2113Added test for a similar bug in `lib examples`
Added test for a similar bug in `lib examples`
[breaking] Fix: `lib list --fqbn` and `lib examples --fqbn` do not sh…