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

feat: Sync from aztec-packages #7293

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .aztec-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a7f8d9670902dfa4856b8514ce5eb4ad031a44fc
b60a39d989b77702a89ebb24047e5b2419915dc3
2 changes: 1 addition & 1 deletion .github/scripts/playwright-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -eu

npx -y playwright@1.50 install --with-deps
npx -y playwright@1.49 install --with-deps
7 changes: 3 additions & 4 deletions compiler/integration-tests/web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ export default {
// playwrightLauncher({ product: "webkit" }),
// playwrightLauncher({ product: "firefox" }),
],
middleware: [async function setGzHeader(ctx, next) {
if (ctx.url.endsWith('.gz')) {
ctx.set('Content-Encoding', 'gzip');
ctx.res.removeHeader('Content-Length');
middleware: [async (ctx, next) => {
if (ctx.url.endsWith('.wasm.gz')) {
ctx.url = ctx.url.replace('/', "/node_modules/@aztec/bb.js/dest/browser/");
}
await next();
}],
Expand Down
30 changes: 19 additions & 11 deletions compiler/noirc_evaluator/src/brillig/brillig_gen/brillig_globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ impl BrilligGlobals {
);
}

// NB: Temporary fix to override entry point analysis
vezenovm marked this conversation as resolved.
Show resolved Hide resolved
let merged_set =
used_globals.values().flat_map(|set| set.iter().copied()).collect::<HashSet<_>>();
for set in used_globals.values_mut() {
*set = merged_set.clone();
}

Self { used_globals, brillig_entry_points, ..Default::default() }
}

Expand Down Expand Up @@ -303,10 +310,11 @@ mod tests {
if func_id.to_u32() == 1 {
assert_eq!(
artifact.byte_code.len(),
1,
2,
"Expected just a `Return`, but got more than a single opcode"
);
assert!(matches!(&artifact.byte_code[0], Opcode::Return));
// TODO: Bring this back (https://github.com/noir-lang/noir/issues/7306)
// assert!(matches!(&artifact.byte_code[0], Opcode::Return));
vezenovm marked this conversation as resolved.
Show resolved Hide resolved
} else if func_id.to_u32() == 2 {
assert_eq!(
artifact.byte_code.len(),
Expand Down Expand Up @@ -420,17 +428,17 @@ mod tests {
if func_id.to_u32() == 1 {
assert_eq!(
artifact.byte_code.len(),
2,
30,
"Expected enough opcodes to initialize the globals"
);
let Opcode::Const { destination, bit_size, value } = &artifact.byte_code[0] else {
panic!("First opcode is expected to be `Const`");
};
assert_eq!(destination.unwrap_direct(), GlobalSpace::start());
assert!(matches!(bit_size, BitSize::Field));
assert_eq!(*value, FieldElement::from(1u128));

assert!(matches!(&artifact.byte_code[1], Opcode::Return));
// TODO: Bring this back (https://github.com/noir-lang/noir/issues/7306)
// let Opcode::Const { destination, bit_size, value } = &artifact.byte_code[0] else {
vezenovm marked this conversation as resolved.
Show resolved Hide resolved
// panic!("First opcode is expected to be `Const`");
// };
// assert_eq!(destination.unwrap_direct(), GlobalSpace::start());
// assert!(matches!(bit_size, BitSize::Field));
// assert_eq!(*value, FieldElement::from(1u128));
// assert!(matches!(&artifact.byte_code[1], Opcode::Return));
} else if func_id.to_u32() == 2 || func_id.to_u32() == 3 {
// We want the entry point which uses globals (f2) and the entry point which calls f2 function internally (f3 through f4)
// to have the same globals initialized.
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14925,7 +14925,7 @@ __metadata:
languageName: node
linkType: hard

"fsevents@patch:fsevents@2.3.2#~builtin<compat/fsevents>":
"fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>":
version: 2.3.2
resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=df0bf1"
dependencies:
Expand Down Expand Up @@ -20322,27 +20322,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.50.0":
version: 1.50.0
resolution: "playwright-core@npm:1.50.0"
"playwright-core@npm:1.49.0":
version: 1.49.0
resolution: "playwright-core@npm:1.49.0"
bin:
playwright-core: cli.js
checksum: aca5222d7859039bc579b4b860db57c8adc1cc94c3de990ed08cec911bf888e2decb331560bd456991c98222a55c58526187a2a070e6f101fbef43a8e07e1dea
checksum: d8423ad0cab2e672856529bf6b98b406e7e605da098b847b9b54ee8ebd8d716ed8880a9afff4b38f0a2e3f59b95661c74589116ce3ff2b5e0ae3561507086c94
languageName: node
linkType: hard

"playwright@npm:^1.22.2":
version: 1.50.0
resolution: "playwright@npm:1.50.0"
version: 1.49.0
resolution: "playwright@npm:1.49.0"
dependencies:
fsevents: 2.3.2
playwright-core: 1.50.0
fsevents: "npm:2.3.2"
playwright-core: "npm:1.49.0"
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: 44004e3082433f6024665fcf04bd37cda2b284bd5262682a40a60c66943ccf66f68fbc9ca859908dfd0d117235424580a55e9ccd07e2ad9c30df363b6445448b
checksum: f1bfb2fff65cad2ce996edab74ec231dfd21aeb5961554b765ce1eaec27efb87eaba37b00e91ecd27727b82861e5d8c230abe4960e93f6ada8be5ad1020df306
languageName: node
linkType: hard

Expand Down
Loading