Description
Describe the bug
The examples of installed "1.0 format" libraries are not correctly handled by the IDE's File > Examples menu.
Background:
The "1.5 library format" is attained by the addition of a library.properties
metadata file to the library root folder. The decade of Arduino library development before the introduction of this format produced many "1.0 format" libraries, which are still supported by the Arduino development software for the sake of backwards compatibility.
To Reproduce
- Download https://github.com/arduino-libraries/RestClient/archive/refs/heads/master.zip
NOTE: this is just an arbitrary 1.0 format library. The issue will occur with any such library. - Select Sketch > Include Library > Add .ZIP Library... from the Arduino IDE menus.
- Select the downloaded file (
RestClient-master.zip
). - Click the Open button.
- Close the Arduino IDE.
- Start the Arduino IDE.
(there is a separate bug that causes the examples of libraries installed via Add .ZIP Library... to not be shown until restart) - Open the File > Examples menu
Note that the expected "RestClient-master" entry is missing.
Note that there is a blank entry in the menu that contains all examples of all installed 1.0 format libraries:
Expected behavior
Handling of "1.0 format" libraries to be done the same as in the classic Arduino IDE:
A menu entry is added to the File > Examples menu for each library which provides example sketches, regardless of its format. Since 1.0 format libraries don't provide a name via the name
field of the library.properties
metadata file, the name is determined by the name of the library's installation folder.
Desktop
OS: Windows 10
Version: 2.0.0-beta.2-snapshot.f9730ab
Date: 2021-02-18T13:01:31.751Z
CLI Version: 0.16.0 alpha [c977a238]
Additional context
Incidence in platform bundled libraries
The original demonstration of this issue used the platform bundled libraries of the "Arduino Mbed OS Boards" platform. The bug still affects versions of that platform up to, and including, version 2.5.2:
After 2.5.2, the platform's libraries were converted to "1.5 format" as a workaround for this bug (arduino/ArduinoCore-mbed#340), so the later versions of the platform are not affected. For this reason, I changed the demo to using a manually installed "1.0 format" library, which is a less dramatic demo.
However, it may be that "1.0 format" libraries are still relatively common in bundled libraries of 3rd party platforms, since they are not distributed through Library Manager, which has been the primary reason for converting libraries to the 1.5 format.
Reports
- Originally reported publicly (incidentally) at: https://forum.arduino.cc/t/invalid-dfu-suffix-signature/679244/11
- Originally reported internally by @per1234
- https://forum.arduino.cc/t/libraries-included-with-board-dont-show-up-as-expected/1032334