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.
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.