I’m trying to modify a library that is used by a project.
To do that I’ve placed the library sources in a local folder, and pointed lib_deps to this folder using full local path “c:\dev\my_library”
The code builds correctly the first time build is run, but all subsequent modifications of the sources are ignored.
Also, code navigation features of VSCode like “go to declaration” go to the cached copy in .pio\libdeps and not to the original sources I’m editing.
Thanks for the quick answer.
Tried prefixing the path with symlink:// and I’m getting this error: VCSBaseException: VCS: Unknown repository type symlink://C:\Dev\my_library
The linked documentation of lib-extra-dirs doesn’t mention that it disables caching - what’s the rationale for it?
Good questions, since I’m not a PlatformIO developer / designer I can’t answer that. For file:// libraries maybe a symlink by default would be better… But on the other hand, if the original folder is deleted, compilation breaks. You can propose changes to that caching system via Issues · platformio/platformio-core · GitHub.
The file: version fetches a local copy and never looks back, just as it does for other URLs referring to remote libraries. The symlink: model avoids copying and continues to track changes, so that the project will rebuild if the library changes. It’s super convenient for a range of usage scenarios, IMO.