Skip to content
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

preprocessor to skip recompiling tests on non-interface source file changes #252

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
abd521f
wip
klkvr Sep 11, 2024
fb64ca7
wip
klkvr Sep 11, 2024
0876b01
add preprocessor
klkvr Sep 11, 2024
314f284
wip
klkvr Sep 11, 2024
86f0562
wip
klkvr Sep 11, 2024
af6550f
fixes
klkvr Sep 13, 2024
276bc94
helper libs
klkvr Sep 13, 2024
fa5d7bf
some docs
klkvr Sep 13, 2024
15ce120
clean up
klkvr Sep 13, 2024
a379db3
fixes
klkvr Sep 16, 2024
25e5ef9
Merge branch 'main' into klkvr/pp-test-rebase
grandizzy Feb 18, 2025
3faaa02
Port to solar
grandizzy Feb 19, 2025
0f78197
Clippy
grandizzy Feb 19, 2025
594c09b
Changes after review
grandizzy Feb 19, 2025
3105272
Patch solar to get HIR visitor impl
grandizzy Feb 19, 2025
7d0edb8
Review changes
grandizzy Feb 19, 2025
4025e5a
reuse replace source fn
grandizzy Feb 19, 2025
0c940d1
Clippy
grandizzy Feb 19, 2025
79d0a0f
Cleanup, move Update type in lib
grandizzy Feb 19, 2025
d37cafb
Change replace_source_content sig, move apply_updates
grandizzy Feb 20, 2025
c526df6
Port to solar HIR, refactor
grandizzy Feb 26, 2025
e691a96
add preprocessing parse constructors
grandizzy Feb 26, 2025
4241d2b
Contract id cleanup
grandizzy Feb 26, 2025
c86c4aa
Cleanup, filter collected dependencies to be source contracts
grandizzy Feb 27, 2025
f4a109d
Cleanup, remove Hir:: usage, use ContractIds
grandizzy Feb 28, 2025
f0818ea
Optional preprocessed cache
grandizzy Mar 3, 2025
2d1e59f
Review cleanup
grandizzy Mar 3, 2025
c354a7c
Simplify find and remove branches
grandizzy Mar 3, 2025
719d4e8
Autodetect and recompile mocks
grandizzy Mar 4, 2025
4342f82
Fix description
grandizzy Mar 4, 2025
d8ece14
Cleanup autodetect and update cached mocks:
grandizzy Mar 5, 2025
c4ec52c
Invalidate cache on preprocess option toggle
grandizzy Mar 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ serde = { version = "1", features = ["derive", "rc"] }
serde_json = "1.0"
similar-asserts = "1"
solar-parse = { version = "=0.1.1", default-features = false }
solar-sema = { version = "=0.1.1", default-features = false }
svm = { package = "svm-rs", version = "0.5", default-features = false }
tempfile = "3.9"
thiserror = "2"
Expand All @@ -67,3 +68,8 @@ futures-util = "0.3"
tokio = { version = "1.35", features = ["rt-multi-thread"] }

snapbox = "0.6.9"

[patch.crates-io]
solar-parse = { git = "https://github.com/paradigmxyz/solar", rev = "964b054" }
solar-sema = { git = "https://github.com/paradigmxyz/solar", rev = "964b054" }

2 changes: 1 addition & 1 deletion crates/artifacts/solc/src/ast/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{fmt, fmt::Write, str::FromStr};
/// Represents the source location of a node: `<start byte>:<length>:<source index>`.
///
/// The `start`, `length` and `index` can be -1 which is represented as `None`
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct SourceLocation {
pub start: Option<usize>,
pub length: Option<usize>,
Expand Down
1 change: 1 addition & 0 deletions crates/compilers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ thiserror.workspace = true
path-slash.workspace = true
yansi.workspace = true
solar-parse.workspace = true
solar-sema.workspace = true
futures-util = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }

Expand Down
Loading
Loading