This repository was archived by the owner on Apr 20, 2026. It is now read-only.
[wip] preprocessor PoC#198
Closed
klkvr wants to merge 10 commits into
Closed
Conversation
8 tasks
Member
mattsse
pushed a commit
that referenced
this pull request
Apr 7, 2025
Implements a preprocessor allowing us to skip recompiling tests on non-interface source file changes. See the companion Foundry PR foundry-rs/foundry#10010 for benchmarks and more details. Supersedes #198: - uses solar AST instead solang-parser to compute interface representation - uses solar HIR instead of solc AST to find bytecode dependencies - handles more edge cases, like deploying with salt/value Closes #197. ### TODO - [x] use solar HIR (deps to review and include paradigmxyz/solar#210) - [x] unit tests - [x] opt-in caching changes - [x] autodetect mocks - [x] figure out how to parse when building from different dir - [x] additional testing (tested with uniswap v4-core and simpler projects) ### Depends on - [x] merge solar PR (paradigmxyz/solar#210) - [x] solar release --------- Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
alexandergrey33
added a commit
to alexandergrey33/compilers
that referenced
this pull request
Sep 17, 2025
Implements a preprocessor allowing us to skip recompiling tests on non-interface source file changes. See the companion Foundry PR foundry-rs/foundry#10010 for benchmarks and more details. Supersedes foundry-rs/compilers#198: - uses solar AST instead solang-parser to compute interface representation - uses solar HIR instead of solc AST to find bytecode dependencies - handles more edge cases, like deploying with salt/value Closes #197. ### TODO - [x] use solar HIR (deps to review and include paradigmxyz/solar#210) - [x] unit tests - [x] opt-in caching changes - [x] autodetect mocks - [x] figure out how to parse when building from different dir - [x] additional testing (tested with uniswap v4-core and simpler projects) ### Depends on - [x] merge solar PR (paradigmxyz/solar#210) - [x] solar release --------- Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
bug-knightxmiu70
added a commit
to bug-knightxmiu70/compilers
that referenced
this pull request
Sep 28, 2025
Implements a preprocessor allowing us to skip recompiling tests on non-interface source file changes. See the companion Foundry PR foundry-rs/foundry#10010 for benchmarks and more details. Supersedes foundry-rs/compilers#198: - uses solar AST instead solang-parser to compute interface representation - uses solar HIR instead of solc AST to find bytecode dependencies - handles more edge cases, like deploying with salt/value Closes #197. ### TODO - [x] use solar HIR (deps to review and include paradigmxyz/solar#210) - [x] unit tests - [x] opt-in caching changes - [x] autodetect mocks - [x] figure out how to parse when building from different dir - [x] additional testing (tested with uniswap v4-core and simpler projects) ### Depends on - [x] merge solar PR (paradigmxyz/solar#210) - [x] solar release --------- Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
ref #197
Implements preprocessor allowing us to skip recompiling tests on non-interface source file changes. Still testing, but looks like it's working correctly, decreasing single-change build times from ~1 minute to 5s in some cases.
Implementation needed some hacks to correctly handle constructor arguments, tried to document it clearly -
compilers/crates/compilers/src/preprocessor.rs
Line 265 in 15ce120
still WIP as caching changes are not opt-in yet (preprocessor is), and I want to do more testing