Description
Bug Report
The library specification documents two flavours of libraries: The modern one with source files in the src/
directory, and the legacy one with source files in the root and utility
directory. However, it is not immediately clear how the Arduino toolchain decides whether a library is one or the other.
I thought that it depended on the presence of a library.properties
file, which is also implied by the last section (but not 100% clear): https://arduino.github.io/arduino-cli/latest/library-specification/#old-library-format-pre-15
However, the section about source code layout is where this distinction is mainly made, but that has nothing explicit about when one or the other is chosen (but it seems to imply that the presence of a src
directory might be the trigger?
It would be good to clarify this behavior, maybe make it more explicit in the last section and refer to that from the "source" section? Maybe it would also be useful to clarify what "legacy" mode means exactly, i.e. make explicit that for all library.properties
fields, whether the default value is used (i.e. like when the field is omitted in a new-style library), or whether there is some other default (e.g. like the name field which is probably deduced from the folder name).