-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
LDF downloads always all "lib" dependencies regardless of lib_deps #4823
Comments
Do you run only the specified environment? |
The environments are exclusively used, depended on the use case. Not sure whether I understood your question right. :-) |
Please provide a simple project (as ZIP attached to this issue) to reproduce this issue. |
I can't reproduce this issue:
|
I believe you did reproduce the issue. |
Does NeoPixelBus depend on TFT_eSPI? |
No, it does not. |
Thanks, we reproduced this issue. This is a normal behaviour, see https://github.com/platformio/platformio-core/blob/develop/platformio/package/commands/install.py#L258 We resolve dependencies BEFORE LDF starts (because we need all manifests). Please note that libraries installed/copied to the |
Can you please test the following project? Library "A" depends on
|
This is a bug. Could I ask you to file a new issue https://github.com/platformio/platformio-core ? |
Sure, I can file a new issue. However, is this issue not already the description of the problem? The reason of this behavior is still the LDF loading all libraries. If this issue is not enough, please detail what the new issue should say and contain in order to be different from this one. Thank you for your support |
This issue relates to "all dependencies are downloaded from the "lib" folder" and this is normal behavior.
This a bug. Please open a new issue and refer to this issue. Thank you so much for your attention and participation. |
@ivankravets If always all dependencies from the lib folder are downloaded, its an performance issue for projects with a large number of environments, using always only a part of the libs. To get around, the only chance is to move the meta dependencies info from the libs to the environment directly, or do you recommend something else? |
I reopen this issue with updated subject. Indeed, we can improve PlatformIO Core behaviour installing local "lib" dependencies to the separate common folder. Anyway, please file a new issue which actually a bug regarding LDF that picks wrong library version when requirements are declared and multiple versions of the same library are installed. |
Configuration
Operating system:
Win10 + VSCode + PIO
PlatformIO Version (
platformio --version
):6.1.11
Description of problem
The platformio.ini contains several environments. Every environment requires a different set of libraries, which are configured by lib_deps. The problem is that ALL dependencies are downloaded for every environment, means .pio/libdeps/<ENV> contains always all of them.
Steps to Reproduce
platformio.ini
lib/A/library.json
lib/B/library.json
Actual Results
.pio/libdeps/testA/ folder contains NeoPixelBus and TFT_eSPI libraries
.pio/libdeps/testB/ folder contains NeoPixelBus and TFT_eSPI libraries
Expected Results
.pio/libdeps/testA/ folder contains ONLY NeoPixelBus library
.pio/libdeps/testB/ folder contains ONLY TFT_eSPI library
Notes
It seems LDF loops over every library in ./lib instead of following environment wise.
The text was updated successfully, but these errors were encountered: