pert
April 25, 2021, 5:01pm
7
This is a known bug that affects the "legacy" (AKA "Arduino library 1.0 format" libraries that don't have a library.properties metadata file:
opened 04:21PM - 25 Feb 21 UTC
closed 11:41AM - 05 Oct 22 UTC
conclusion: resolved
topic: code
type: imperfection
criticality: medium
### 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"](https://arduino.github.io/arduino-cli/dev/library-specification/#library-layout) is attained by the addition of [a `library.properties` metadata file](https://arduino.github.io/arduino-cli/dev/library-specification/#library-metadata) 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
1. 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.
1. Select **Sketch > Include Library > Add .ZIP Library...** from the Arduino IDE menus.
1. Select the downloaded file (`RestClient-master.zip`).
1. Click the <kbd>Open</kbd> button.
1. Close the Arduino IDE.
1. 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)
1. 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](https://arduino.github.io/arduino-cli/dev/platform-specification/#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 (https://github.com/arduino/ArduinoCore-mbed/pull/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
I can see from the .zip you shared that the library is indeed a "legacy" library.
I think you misremembered because legacy libraries are not allowed in Library Manager, due to it relying on the metadata file. More likely, you installed it via Sketch > Include Library > Add .ZIP Library... .