foundry-rs / compilers

Utilities for working with native solc and compiling projects.
Apache License 2.0
58 stars 36 forks source link

fix: invalidate cache for out-of-scope entries #104

Closed klkvr closed 2 months ago

klkvr commented 2 months ago

missed this in #90

ref https://t.me/foundry_support/52331

after #90 we stopped removing out of scope sources from cache, however, we never validated if they are dirty, this results in invalid cached artifacts in certain cases.

with this PR we iterate over all cache entries out of scope of current compiler run, then build graph with them to find if they import any of files marked as dirty.