Skip to content

Commit f3911a8

Browse files
authored
feat(ci): Snapshots for aztec-nr contract compilation failures and nargo expand (#23061)
Resolves [F-607](https://linear.app/aztec-labs/issue/F-607/adopt-cargo-insta-for-noir-contract-snapshot-testing) Don't be scared by the diff size, the majority of the diff is new snapshots. - Deleted `noir-projects/noir-contracts-comp-failures/` crate. We now have `noir-projects/contract-snapshots/` - `nargo expand` tests cover Token, AMM, StorageProofTest, AvmTest, AvmGadgetsTest to match the CI benchmarks - `compile_failure` snapshots are now full stderr (not just `error: ` headlines) Asserting the full stderr and `expand` output provide us a strong test invariant on the current compiler behavior. Some of the expanded snapshots are quite large, and that is why I ultimately chose to only have snapshots for the benchmark contracts. For compilation failures, I felt it would be better to have the full snapshot in all cases. We then assert against the actual compiler behavior rather than some stripped version of the stderr. A great example of how these snapshots are useful can be seen in the child PR #23062.
1 parent b6e2d69 commit f3911a8

238 files changed

Lines changed: 21902 additions & 360 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ aztec-nr: noir bb-cpp-native
301301
noir-projects-txe-tests:
302302
$(call test,$@,noir-projects/aztec-nr)
303303
$(call test,$@,noir-projects/noir-contracts)
304-
$(call test,$@,noir-projects/noir-contracts-comp-failures)
305304

306305
# Noir Projects - Aggregate target (builds all sub-projects)
307306
noir-projects: noir-protocol-circuits mock-protocol-circuits noir-contracts aztec-nr

cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"cimg",
7272
"ciphertext",
7373
"ciphertexts",
74+
"clippy",
7475
"clonedeep",
7576
"clonedeepwith",
7677
"cmd",
@@ -171,6 +172,7 @@
171172
"includable",
172173
"incrementation",
173174
"indexeddb",
175+
"INSTA",
174176
"interruptible",
175177
"IPFS",
176178
"isequal",
@@ -367,8 +369,8 @@
367369
"unfinalized",
368370
"uniquified",
369371
"uniquify",
370-
"unlinkability",
371372
"unkonstrained",
373+
"unlinkability",
372374
"unnullify",
373375
"unpadded",
374376
"unprefixed",

noir-projects/bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function build {
2626
}
2727

2828
function test_cmds {
29-
parallel -k ./{}/bootstrap.sh test_cmds ::: noir-protocol-circuits noir-contracts aztec-nr noir-contracts-comp-failures
29+
parallel -k ./{}/bootstrap.sh test_cmds ::: noir-protocol-circuits noir-contracts aztec-nr contract-snapshots
3030
}
3131

3232
function test {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/**/target/

0 commit comments

Comments
 (0)