-
-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use shared library storage with lib_deps #2708
Comments
Please re-test with |
Yes, thanks! What about the use of global storage with lib_deps? i.e. my second question was, is it possible to place $PIOENV here? platformio-core/platformio/project/helpers.py Lines 130 to 133 in 4123aa4
And change all relevant places to substitute in on-demand (either from cli option, config or scons env) That way lib_deps can be global when it is possible, keeping the fix for #1696 Do I need to open another issue for this? Or is there some other way this will / can be done? The goal is to still use lib_deps variable for dependencies in case there are no conflicts (and since it is not possible to do |
Just add global storage to the top of list using http://docs.platformio.org/en/latest/projectconf/section_env_library.html#lib-extra-dirs |
Yes, that does work with already installed libs. But there are no libraries yet, the installation will only happen in the project's .pio/libdeps/... |
But this is the right behavior? If you don't like the default behavior, you can install packages manually and extend lib_extra_dirs. Another option is to use Pre Script and call env.GetProjectOption("lib_deps") |
It depends, as I have explained. My hope was it could be resolved via ini variable pointing to the exact installation directory. I will try extra script, thanks for the pointer. |
BTW, I did try extra script just now. Mini template project with subprocess and LibraryManager (probably OK too?) |
I like your implementation! Let keep this in mind when someone will ask. We don't want to support different workflows in official docs. It will help us to save resources when developers will have any issues. Extra scripting was specially created for these cases when you don't like default PlatformIO Core behavior. So, everyone can tune it for own needs. |
Configuration
Operating system:
Linux
PlatformIO Version (
platformio --version
):PlatformIO, version 4.0.0b2
Description of problem
Having a project with multiple environments that re-use same lib_deps variable, I encountered a confusing behaviour with global library storage:
Steps to Reproduce
The content of
platformio.ini
:The content of
src/dummy.cpp
Examining libdeps contents:
I have also tried adding
[env:...] lib_extra_dirs = ./my_shared_libs
and installing the library there.Actual Results
lib_deps = ... library gets installed in the .pio/libdeps/env/... despite being in the global storage
Expected Results
Library presence is checked in global or lib_extra storage dir before installing it in the {workspace_dir}/libdeps storage.
Which I think I solved locally for me via mcspr/platformio-core@c231535e
It would also be extremely useful to still be able to use
pio run -e ...
with old-style .piolibdeps storage when there is no practical reason of having multiple copies of the same library in .pio/libdeps/.../libraryFor example, when environments only differ in src_build_flags values or without internet connection present.
I wonder if this can be solved by making default
libdeps_dir
actually reference that it uses current environment as a part of the path (e.g{workspace_dir}/libdeps/{pioenv}
)?The text was updated successfully, but these errors were encountered: