We already keep all compilation settings on Project (paths, compier settings, compiler itself), so this PR moves sparse_output to Project as well to allow us to just configure it in Config::project instead of adding it to compiler on every invocation in multiple places.
Also this PR gets rid of separate SparseOutputFileFilter<D> trait and makes sparse_output filter just a FileFilter again. Instead, we now have ParsedSource::compilation_dependencies which determines which of the source imports must be compiled along with it.
Simplified some sparse output related logic along with changes.
Due to Box<dyn FileFilter> on Project this PR adds dyn-clone to keep Clone impl and derivative to avoid manually implementing Debug
better approach for https://github.com/foundry-rs/foundry/pull/8061
We already keep all compilation settings on
Project
(paths, compier settings, compiler itself), so this PR movessparse_output
toProject
as well to allow us to just configure it inConfig::project
instead of adding it to compiler on every invocation in multiple places.Also this PR gets rid of separate
SparseOutputFileFilter<D>
trait and makessparse_output
filter just aFileFilter
again. Instead, we now haveParsedSource::compilation_dependencies
which determines which of the source imports must be compiled along with it.Simplified some sparse output related logic along with changes.
Due to
Box<dyn FileFilter>
onProject
this PR addsdyn-clone
to keepClone
impl andderivative
to avoid manually implementingDebug