Even this is the community forum, I tried to reproduce this - without success
Here is my folder initial structure:
.
├── MyLibA
│ ├── src
│ │ ├── MyLibA.cpp
│ │ └── MyLibA.h
│ └── library.json
├── MyLibB
│ ├── src
│ │ ├── MyLibB.cpp
│ │ └── MyLibB.h
│ └── library.json
└── Project
├── .pio
├── include
├── lib
├── src
│ └── main.cpp
├── test
└── platformio.ini
Here is the initial platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
Step 1: Adding a valid symlink to MyLibA
lib_deps =
symlink://../MyLibA
Results in
.
├── .pio
│ ├── build
│ └── libdeps
│ └── esp32dev
│ ├── integrity.dat
│ └── MyLibA.pio-link
├── include
├── lib
├── src
│ └── main.cpp
├── test
└── platformio.ini
Step 2: Adding a faulty symlink //../../MyLibB
(The correct symlink would be //../MyLibB
):
lib_deps =
symlink://../MyLibA
symlink://../../MyLibB
Results in an error message:
Resolving esp32dev dependencies...
Library Manager: Installing symlink://../../MyLibB
PackageException: Can not create a symbolic link for `../../MyLibB`, not a directory
Step 3. Removing the faulty link
lib_deps =
symlink://../MyLibA
Output:
Resolving esp32dev dependencies...
Already up-to-date.
Updating metadata for the vscode IDE...
Project has been successfully updated!
No changes in the filesystem
Step 4. Adding the correct link to //../MyLibB
lib_deps =
symlink://../MyLibA
symlink://../MyLibB
Output:
Resolving esp32dev dependencies...
Already up-to-date.
Updating metadata for the vscode IDE...
Project has been successfully updated!
Filesystem:
.
├── .pio
│ ├── build
│ └── libdeps
│ └── esp32dev
│ ├── integrity.dat
│ ├── MyLibA.pio-link
│ └── MyLibB.pio-link
├── include
├── lib
├── src
│ └── main.cpp
├── test
└── platformio.ini
Everything looks correct to me.
But what I have noticed is, when you remove all lib_deps
- there will no automatic clean up of the libdeps
folder.
Fortunately, that’s what PROJECT TASKS / Default / General / Full Clean
is made for 