Merged
Conversation
4fc020c to
996cea7
Compare
DaniPopes
commented
Aug 28, 2025
| cmd.args(["test"]).with_no_redact().assert_success().stdout_eq(str![[r#" | ||
| ... | ||
| Compiling 21 files with [..] | ||
| Compiling 23 files with [..] |
Member
Author
There was a problem hiding this comment.
the extra 2 files are script/Counter.s.sol and forge-std/Script.sol
Member
There was a problem hiding this comment.
the idea for get_sources_to_compile was that we don't want to compile e.g scripts for forge test, is this no longer the case?
Member
Author
There was a problem hiding this comment.
My hunch was that in practice it ends up being slower to compile another time before to filter out unneeded files than to just run the pipeline normally; I can revisit further by rewriting to solar
onbjerg
approved these changes
Aug 29, 2025
This was referenced Sep 3, 2025
MerkleBoy
pushed a commit
to MerkleBoy/foundry
that referenced
this pull request
Sep 17, 2025
* refactor: test filter * refactor: handling of empty test filters * dontfail * fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
get_sources_to_compilecurrently is always called, even when there are no filters to apply to the input. This is wasteful because it will compile all sources to ABI, filter out nothing, then recompile everything again for bytecode regardlessrun_teststo simplify the function and so we can also handle the case when there are no tests at all in the project