-
Notifications
You must be signed in to change notification settings - Fork 70
feat: add support for preprocessing sources #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
abd521f
wip
klkvr fb64ca7
wip
klkvr 0876b01
add preprocessor
klkvr 314f284
wip
klkvr 86f0562
wip
klkvr af6550f
fixes
klkvr 276bc94
helper libs
klkvr fa5d7bf
some docs
klkvr 15ce120
clean up
klkvr a379db3
fixes
klkvr 25e5ef9
Merge branch 'main' into klkvr/pp-test-rebase
grandizzy 3faaa02
Port to solar
grandizzy 0f78197
Clippy
grandizzy 594c09b
Changes after review
grandizzy 3105272
Patch solar to get HIR visitor impl
grandizzy 7d0edb8
Review changes
grandizzy 4025e5a
reuse replace source fn
grandizzy 0c940d1
Clippy
grandizzy 79d0a0f
Cleanup, move Update type in lib
grandizzy d37cafb
Change replace_source_content sig, move apply_updates
grandizzy c526df6
Port to solar HIR, refactor
grandizzy e691a96
add preprocessing parse constructors
grandizzy 4241d2b
Contract id cleanup
grandizzy c86c4aa
Cleanup, filter collected dependencies to be source contracts
grandizzy f4a109d
Cleanup, remove Hir:: usage, use ContractIds
grandizzy f0818ea
Optional preprocessed cache
grandizzy 2d1e59f
Review cleanup
grandizzy c354a7c
Simplify find and remove branches
grandizzy 719d4e8
Autodetect and recompile mocks
grandizzy 4342f82
Fix description
grandizzy d8ece14
Cleanup autodetect and update cached mocks:
grandizzy c4ec52c
Invalidate cache on preprocess option toggle
grandizzy 15ec56f
Bump solar rev
grandizzy 2f80366
Move preproc tests
grandizzy 1a3de9f
Preprocess by input reference
grandizzy 5c4becb
Merge branch 'main' into klkvr/pp-test-rebase
grandizzy 0fd4caa
Update crates/compilers/src/preprocessor/deps.rs
grandizzy 6259e8d
Merge branch 'main' into klkvr/pp-test-rebase
grandizzy c41692d
Bump solar
grandizzy 8138172
Rust backtrace to debug win failure
grandizzy 2947ec6
Update crates/compilers/src/lib.rs
grandizzy af7cc59
Update crates/compilers/src/preprocessor/deps.rs
grandizzy cb0f1d8
Handle vars without name in ctor
grandizzy ebda056
Better way to determine constructor call
grandizzy 64c5ecd
Use Path, add named args test
grandizzy 67ac483
Ensure / for win
grandizzy 6b3e887
clean
DaniPopes c04627d
Use solar main
grandizzy 0d0f5d9
Ensure / for win in import
grandizzy 6a81147
Support value and salt in constructors
grandizzy 322e80a
Handle named args with call args and offset
grandizzy 5d02555
cleaning
DaniPopes 8dd35c3
chore: replace SourceMapLocation with Range<usize>
DaniPopes a7bc520
fmt
DaniPopes 6b907d1
Cleanup BytecodeDependencyKind::New
grandizzy 446a5d8
Use sources that are already read
grandizzy 4eefc93
fix: correctly set paths in ParsingContext
DaniPopes 9b15b7a
clippy
grandizzy d27f6f4
Merge branch 'main' into klkvr/pp-test-rebase
grandizzy fb5ebc2
bump
DaniPopes 59ebda6
feat: avoid reparsing for interface_repr_hash
DaniPopes 4451c71
perf: cache interface_hash in ArtifactsCacheInner
DaniPopes 73ae218
chore: change &PathBuf to &Path
DaniPopes a9341af
com
DaniPopes a48b275
fix: correctly create Session and ParsingContext from solc input
DaniPopes 49b65bf
fix: better check for 'is_source_file'
DaniPopes de0bebc
chore: rm &PathBuf
DaniPopes 14cabe3
test: dapptools instead of hardhat paths
DaniPopes 93b3c3f
Continue compiling if preprocessor fails parsing
grandizzy 5377589
chore: move preprocessor to foundry
DaniPopes 48df36d
check
DaniPopes 743ff47
clippy
DaniPopes a3f4c4d
nit
DaniPopes 87b9346
Bump solar version
grandizzy 2527d65
Merge branch 'main' into klkvr/pp-test-rebase
grandizzy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: noticed
interfaceReprHashis sometimesnullin the cache, would it make sense to skip this field when it isNoneduring serialization w/#[serde(skip_serializing_if = "Option::is_none")]?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, that's null for all files under test / script dirs, will check if any side effect if we don't serialize them but shouldn't