From 3d00af845fe57a8dd0fc4db6c79378f03934310b Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 5 Jul 2020 00:57:43 -0700 Subject: [PATCH 1/2] [skip ci] Remove outdated statement re: Library Manager not handling library dependencies Dependencies of libraries may now be defined via the depends field of library.properties and Library Manager will automatically install these dependencies when the library is installed. This is well documented later in the specification, so there is no need to mention it in the Library Manager overview. --- docs/library-specification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/library-specification.md b/docs/library-specification.md index 31e24d72f03..fc80450ba12 100644 --- a/docs/library-specification.md +++ b/docs/library-specification.md @@ -5,7 +5,7 @@ This is the specification for the 3rd party library format to be used with Ardui * rev.2.1 will be implemented starting from version Arduino IDE 1.6.10 * rev.2.2 will be implemented starting from version Arduino IDE 1.8.10 -This new library format is intended to be used in tandem with **Library Manager**, available since Arduino IDE 1.6.2. The Library Manager allows users to automatically download and install libraries needed in their projects, with an easy to use graphic interface in the [Arduino IDE](https://www.arduino.cc/en/guide/libraries#toc3)/Pro IDE and [Arduino Web Editor](https://create.arduino.cc/projecthub/Arduino_Genuino/getting-started-with-arduino-web-editor-on-various-platforms-4b3e4a#toc-libraries-and-the-arduino-web-editor-11) as well as [`arduino-cli lib`](https://arduino.github.io/arduino-cli/commands/arduino-cli_lib/). It doesn't yet take care of dependencies between libraries. +This new library format is intended to be used in tandem with **Library Manager**, available since Arduino IDE 1.6.2. The Library Manager allows users to automatically download and install libraries needed in their projects, with an easy to use graphic interface in the [Arduino IDE](https://www.arduino.cc/en/guide/libraries#toc3)/Pro IDE and [Arduino Web Editor](https://create.arduino.cc/projecthub/Arduino_Genuino/getting-started-with-arduino-web-editor-on-various-platforms-4b3e4a#toc-libraries-and-the-arduino-web-editor-11) as well as [`arduino-cli lib`](https://arduino.github.io/arduino-cli/commands/arduino-cli_lib/). More information about how Library Manager works is available [here](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ). From 20be18843ad225d798814f5d942b2e0634f592eb Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 5 Jul 2020 01:09:34 -0700 Subject: [PATCH 2/2] [skip ci] Update documentation re: library "import" behavior The described behavior is now configurable via the includes field of library.properties. --- docs/library-specification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/library-specification.md b/docs/library-specification.md index fc80450ba12..6816b771a27 100644 --- a/docs/library-specification.md +++ b/docs/library-specification.md @@ -83,7 +83,7 @@ For 1.5.x+-only libraries, the source code resides in the **src** folder. For ex Servo/src/Servo.h Servo/src/Servo.cpp -The source code found in **src** folder and *all its subfolders* is compiled and linked in the user’s sketch. Only the *src* folder is added to the include search path (both when compiling the sketch and the library). When the user imports a library into their sketch (from the Arduino IDE's "Sketch > Include Library" menu or the Arduino Web Editor's "Include" button), an `#include` statement will be added for all header (.h) files in the src/ directory (but not its subfolders). As a result, these header files form something of a de facto interface to your library; in general, the only header files in the root src/ folder should be those that you want to expose to the user's sketch and plan to maintain compatibility with in future versions of the library. Place internal header files in a subfolder of the src/ folder. +The source code found in **src** folder and *all its subfolders* is compiled and linked in the user’s sketch. Only the *src* folder is added to the include search path (both when compiling the sketch and the library). When the user imports a library into their sketch (from the Arduino IDE's "Sketch > Include Library" menu or the Arduino Web Editor's "Include" button), the default behavior (configurable via the [library.properties `includes` field](#libraryproperties-file-format)) is for an `#include` statement to be added for all header (.h) files in the src/ directory (but not its subfolders). As a result, these header files form something of a de facto interface to your library; in general, the only header files in the root src/ folder should be those that you want to expose to the user's sketch and plan to maintain compatibility with in future versions of the library. Place internal header files in a subfolder of the src/ folder. For backward compatibility with Arduino IDE 1.0.x, the library author may opt to place source code into the root folder, instead of the folder called **src**. In this case the 1.0 library format is applied and the source code is searched from the **library root folder** and the **utility** folder, for example: