You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request.
Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
Configuration
Operating system: Win10 x64
PlatformIO Version (platformio --version): 5.2.4.
Description of problem
When creating a project and adding a library dependency to it via lib_deps and compiles the project, the specified library gets downloaded into .pio\libdeps\<env>\<library name> and included in the build.
When removing the library again from the lib_deps of the platformio.ini and recompiling, the downloaded dependency is not removed.
The downloaded dependency in .pio\libdeps should be removed because
Users expect that a removal of the library from lib_deps results in wiping the downloaded library off the project completely (see e.g. here)
It can lead to inconsistent behavior / compilation results
E.g., if I add ArduinoJson to the lib_deps and do #include <ArduinoJson.h> in the src\main.cpp, the project compiles. I remove ArduinoJson from lib_deps again, and hit compile. The project still compiles although the library declaration is gone. Now when I upload the PlatformIO project (platformio.ini, src/ etc) thinking it's all working and people download my project and compile it, they won't have that .pio folder with the left-over library and compilation will fail.
Even worse, I've seen it happen that e.g. people include the wrong Servo.h library in lib_deps. They then notice that and remove it from lib_deps to try and get the correct framework built-in library. However, compilation still fails (or the used library won't work correctly) unless they delete the hidden.pio folder that clears off the old library and actually results in the usage of the right library.
Steps to Reproduce
Create an arbitrary project, e.g., Arduino Uno + Framework = Arduino
Add a library dependency to it (e.g., lib_deps=bblanchon/ArduinoJson@^6.19.1)
To the standard empty Arduino sketch, add #include <ArduinoJson.h>
Compile the project, it all works, library is downloaded
Remove the lib_deps expression from the platformio.ini again and save the file
Recompile
Actual Results
Compilation still works although library was removed.
Expected Results
Compilation fails, the library is removed from .pio\libdeps.
If problems with PlatformIO Build System:
The content of platformio.ini:
[env:uno]platform = atmelavr
board = uno
framework = arduino
lib_deps=bblanchon/ArduinoJson@^6.19.1
What kind of issue is this?
Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
Configuration
Operating system: Win10 x64
PlatformIO Version (
platformio --version
): 5.2.4.Description of problem
When creating a project and adding a library dependency to it via
lib_deps
and compiles the project, the specified library gets downloaded into.pio\libdeps\<env>\<library name>
and included in the build.When removing the library again from the
lib_deps
of theplatformio.ini
and recompiling, the downloaded dependency is not removed.The downloaded dependency in
.pio\libdeps
should be removed becauselib_deps
results in wiping the downloaded library off the project completely (see e.g. here)E.g., if I add ArduinoJson to the
lib_deps
and do#include <ArduinoJson.h>
in thesrc\main.cpp
, the project compiles. I remove ArduinoJson fromlib_deps
again, and hit compile. The project still compiles although the library declaration is gone. Now when I upload the PlatformIO project (platformio.ini
,src/
etc) thinking it's all working and people download my project and compile it, they won't have that.pio
folder with the left-over library and compilation will fail.Even worse, I've seen it happen that e.g. people include the wrong
Servo.h
library inlib_deps
. They then notice that and remove it from lib_deps to try and get the correct framework built-in library. However, compilation still fails (or the used library won't work correctly) unless they delete the hidden.pio
folder that clears off the old library and actually results in the usage of the right library.Steps to Reproduce
lib_deps=bblanchon/ArduinoJson@^6.19.1
)#include <ArduinoJson.h>
lib_deps
expression from theplatformio.ini
again and save the fileActual Results
Compilation still works although library was removed.
Expected Results
Compilation fails, the library is removed from
.pio\libdeps
.If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
-/-
The text was updated successfully, but these errors were encountered: