Automatic cleaning of .piolibdeps


#1

Hi,

In my platform.io file I reference a local library:

lib_deps=
  file://../lib/CommonLib

When I make changes to the library I have to delete .piolibdeps from my project directory for the changes to be picked up. It seems once the library is copied to .piolibdeps updates are not automatically copied in.

Is there a way to automatically clean the folder and pickup the new library changes? Executing pio run -t clean doesn’t delete things in .piolibdeps. Is there a different workflow I should be following with local libraries?

Thanks,

Jeremy


#2

I’m having the same issue. Any suggestions?


#3

If you add LOCAL library as a dependency, PlatformIO will copy it to .piolibdeps. If you need to work with a local library located outside the project, please use lib_extra_dirs option.

[env:myenv]
board = ...
lib_extra_dirs = file://../lib

#4

Thanks a lot that did the trick. I added lib_extra_dirs (without file:// which did not work when present):

lib_extra_dirs = ../lib

And changed

lib_deps = file://../lib/SomeLib

to

lib_deps = SomeLib

Changes to the local library are now picked up when building without having to delete .piolibdeps.