Closed klkvr closed 3 months ago
Patched https://github.com/foundry-rs/foundry/pull/7334 with this PR branch, will merge after it succeeds
@mattsse @onbjerg mind taking one more look? updated impl after failed foundry ci
it should become a little bit more safer now, there were some edge cases with multiple versions when we could have dirty artifacts staying in cache
Currently we are not keeping cache entries for files which were out of scope of compiler (might be dirty or not)
Because of that, when running
forge compile
, then runningforge compile --skip ...
which will filter some artifacts out, and then runningforge compile
again, some artifacts will be recompiled, because--skip
run removed those entries from cache.Solution is to keep those entries in cache (we already silently keep artifacts anyway).