Commit 5a86c8a
feat: switch to new preprocessor (#1031)
# Rationale for this change
Move to a new Yul preprocessor so Yul imports and snippets are handled
cleanly (rename to .presl), and to consolidate preprocessing logic under
versioned, testable Python code. The commit stream shows “add new Yul
preprocessor,” then renames and import fixes to align on the new
extension.
# What changes are included in this PR?
- New preprocessor module & tests
Adds solidity/preprocessor/yul_preprocessor.py with pytest tests and a
corpus of .presl fixtures covering imports, circular graphs, caching,
function dedup, etc.
- File/extension migration
Renames .pre.sol → .presl; updates Solidity imports and config
accordingly. Commits: “rename .pre.sol files to .presl”, “update imports
and config”, plus “fix Yul imports.”
- Build/Foundry config
foundry.toml now ignores .presl for match/coverage/doc, replacing the
old .pre.sol ignores.
- CI workflow
Adds a “Check Yul Preprocessor” job that sets up Python, runs black and
pytest for solidity/preprocessor. In the main lint/test job, it removes
preprocessor/test_files before coverage to avoid double counting.
- Helper scripts & misc
Adds solidity/scripts/pre_forge.sh and preprocess_yul_imports.sh;
touches Slither config and several .sol files to match the new import
pathing.
# Are these changes tested?
Yes!
Dedicated pytest suite runs in CI for the preprocessor. All existing
tests also pass.
---------
Co-authored-by: Claude <[email protected]>1 parent 4c35c05 commit 5a86c8a
File tree
115 files changed
+2512
-7912
lines changed- .github/workflows
- solidity
- scripts
- src
- base
- builder
- client
- hyperkzg
- proof_exprs
- proof_gadgets
- proof_plans
- sumcheck
- verifier
- test
- base
- builder
- client
- hyperkzg
- proof_exprs
- proof_gadgets
- proof_plans
- sumcheck
- verifier
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
115 files changed
+2512
-7912
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
| 218 | + | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
248 | 258 | | |
249 | 259 | | |
250 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
This file was deleted.
Lines changed: 3 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 31 | + | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
| |||
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 62 | + | |
69 | 63 | | |
70 | 64 | | |
71 | 65 | | |
| |||
126 | 120 | | |
127 | 121 | | |
128 | 122 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 123 | + | |
133 | 124 | | |
134 | 125 | | |
135 | 126 | | |
| |||
Lines changed: 7 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 32 | + | |
| 33 | + | |
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
| |||
84 | 78 | | |
85 | 79 | | |
86 | 80 | | |
87 | | - | |
| 81 | + | |
88 | 82 | | |
89 | 83 | | |
90 | 84 | | |
| |||
152 | 146 | | |
153 | 147 | | |
154 | 148 | | |
| 149 | + | |
155 | 150 | | |
156 | 151 | | |
157 | 152 | | |
| |||
179 | 174 | | |
180 | 175 | | |
181 | 176 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 177 | + | |
| 178 | + | |
190 | 179 | | |
191 | 180 | | |
192 | 181 | | |
| |||
0 commit comments