Skip to content
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

Old dependencies are not removed from .pio folder #3076

Closed
manuelbl opened this issue Oct 1, 2019 · 1 comment
Closed

Old dependencies are not removed from .pio folder #3076

manuelbl opened this issue Oct 1, 2019 · 1 comment
Labels
Milestone

Comments

@manuelbl
Copy link

manuelbl commented Oct 1, 2019

Temporary solution

Please remove .pio folder from a project and restart build.


Configuration

Operating system:
macOS 10.14

PlatformIO Version (platformio --version):
4.0.3

Description of problem

Old dependencies that are no longer referenced from platformio.ini are not removed from .pio folder and are still included in the build.

As a consequence, invalid projects still build as long as they are not shared with other developers via a repository. Furthermore, header files from old dependencies can be included if they have the same name as other files in the project causing hard to find bugs.

Steps to Reproduce

  1. Build project - succeeds
  2. Remove lib_deps line from platformio.ini
  3. Build project again - succeeds even though it should fail

Actual Results

Project without lib_deps still builds even if dependency is removed

Expected Results

Project without lib_deps should fail to build since it's missing a dependency

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:uno]
platform = atmelavr
board = uno
framework = arduino

lib_deps = 4

Source file to reproduce issue:

#include <Arduino.h>
#include <IRremote.h>

IRrecv ir(10);
decode_results results;

void setup() {
    Serial.begin(115200);
    ir.enableIRIn();
}

void loop() {
    if (ir.decode(&results)) {
        Serial.println(results.value);
    }
    delay(100);
}

Additional info

The folder /Users/me/.platformio/lib is empty.

If the folder .pio within the project folder is deleted, the project (without lib_deps) no longer compiles as expected.

Also see: https://community.platformio.org/t/what-is-the-proper-way-to-remove-dependency/9580

@ivankravets ivankravets added bug ldf Library Dependency Finder labels Oct 2, 2019
@ivankravets ivankravets added this to the Backlog milestone Oct 24, 2019
Tasssadar added a commit to RoboticsBrno/Esp32-RBGridUI that referenced this issue Apr 10, 2020
@ivankravets ivankravets modified the milestones: Backlog, 4.4.0 Aug 1, 2020
@ivankravets ivankravets modified the milestones: 5.0.0, 5.0.1 Sep 1, 2020
@ivankravets ivankravets modified the milestones: 5.0.1, Backlog Sep 2, 2020
@ivankravets ivankravets modified the milestones: Backlog, 5.3.0 Feb 7, 2022
@ivankravets ivankravets modified the milestones: 5.4, 5.3.0, 5.2.5 Feb 9, 2022
@ivankravets
Copy link
Member

Thanks for the report! Please re-test with pio upgrade --dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants