while i was “crying” about my complication oddities, i thought, maybe there is a way to use the lib manager to put libraries into the private directory?
something like :
pio lib global install lib_one
pio lib local/private install lib_one
First scenario - current functionality; second - the lib will be installed in the project only…
i’m sure Ivan thought of that and implemented or it is in some request …
Sure, it is a part of platformio library installation. The feature already exists.
When you install the libraries using the library manager, they ask whether you want to install the library for global use or project local use. You can choose so there.
pio lib
Usage: pio lib [OPTIONS] COMMAND [ARGS]...
Options:
-g, --global Manage global PlatformIO library storage
`/home/az/.platformio/lib`
-d, --storage-dir DIRECTORY Manage custom library storage
-h, --help Show this message and exit.
the lib_dir parameter states that the (default “lib” ) is for private libraries
the “libdep_dirs” is (default to .piolibdeps in the root of the project) where lib manager will put all the required libraries.
i wonder why was the design decision made to separate these two? ( as opposite to put all libs into a single “lib_dir” ).
Because Project’s lib_dir is intended for private/custom libraries.
PlatformIO Core proposes powerful control on your library dependencies. You decide which libraries are common per project and which aren’t. If you prefer “Arduino style”, you can install all libraries to global storage. PIO will look for libraries here automatically for each your project.