Skip to content

refactor: sparse output#135

Merged
klkvr merged 2 commits intomainfrom
klkvr/refactor-sparse-output
Jun 5, 2024
Merged

refactor: sparse output#135
klkvr merged 2 commits intomainfrom
klkvr/refactor-sparse-output

Conversation

@klkvr
Copy link
Member

@klkvr klkvr commented Jun 5, 2024

better approach for foundry-rs/foundry#8061

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

@klkvr klkvr requested review from DaniPopes and Evalir as code owners June 5, 2024 03:30
@klkvr klkvr requested review from DaniPopes, Evalir and mattsse and removed request for DaniPopes and Evalir June 5, 2024 03:30
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@klkvr klkvr merged commit 7d2e0d7 into main Jun 5, 2024
@DaniPopes DaniPopes deleted the klkvr/refactor-sparse-output branch June 5, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants