This is a problem in a project for multiple esp32 boards, using the TFT_eSPI library.
The library source requires editing before use, items like specific driver chip and SPI pin assignments. SPI pin assignments are board-specific.
I made a copy of the TFT_eSPI directory from .pio/libdeps in the workspace lib directory. I made suitable modifications to the local lib copy.
This arrangement worked. I had successful tests with 2 different boards/envs. My local changes were compiled and included in the binaries.
I added a third project env for a third board type.
After saving platformio.ini, the update process showed the library manager updating and installing versions for all the project libraries, INCLUDING TFT_eSPI!
Three projects now fail.
Subsequent examination of the contents of the .pio\libdeps…copies of TFT_eSPI reveals that now for all three board types, the unmodified&unusable github version has been installed.
So, the modified local library is being ignored contrary to the docs.
How does one avoid this issue?