Description
Describe the problem
Building with arduino-cli compile makes build cache in build-path directory. e.g.:
core
libraries
sketch
includes.cache
libraries.cache
...
but if any new file (header or cpp or event not compile-able file like .json files) adds to sketch folder it cleans all cache directory, even core and libraries. This will compile all core and libraries again and it takes too long.
To reproduce
1- compile a working project (specially with lots of dependencies)
e.g. run command
arduino-cli compile --fqbn esp32:esp32:esp32 demo --output-dir ./build/output --build-path ./build
2- add a new file to the sketch folder like test.h
3- see build directory while building started, all caches are removed
Expected behavior
whole build cache should not be removed by sketch only changes, at lease "core" and "libraries" which are too heavy to compile
Arduino CLI version
1.1.1
Operating system
Windows
Operating system version
Windows 11
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details