Many times I run a build and it fails. I run it again and it succeeds. I noticed that the VS Code project sync dialog flashes briefly when this occurs. I think a sync during the build breaks the build. Build failure looks like:
framework-arduinoespressif32/cores/esp32/main.cpp:72:1: fatal error: opening dependency file .pio/build/master/FrameworkArduino/main.cpp.d: No such file or directory
For example, if I edit platformio.ini and press ctrl+B,enter to build, a second or so into the build the project syncs and the build fails. ctrl+B,enter again and the build succeeds.
I think a sync should be done before a build and syncing should be disallowed during a build.
In case it matters, I’m using:
lib_ldf_mode = off
lib_compat_mode = off
I’m editing my platformio.ini to add a dependency to lib_deps.