Skip to content

Commit a8136ba

Browse files
author
AztecBot
committed
feat: don't report warnings for dependencies (noir-lang/noir#6926)
chore: simplify boolean in a mul of a mul (noir-lang/noir#6951) feat(ssa): Immediately simplify away RefCount instructions in ACIR functions (noir-lang/noir#6893) chore: Move comment as part of #6945 (noir-lang/noir#6959) chore: Separate unconstrained functions during monomorphization (noir-lang/noir#6894) feat!: turn CannotReexportItemWithLessVisibility into an error (noir-lang/noir#6952) feat: lock on Nargo.toml on several nargo commands (noir-lang/noir#6941) feat: don't simplify SSA instructions when creating them from a string (noir-lang/noir#6948) chore: add reproduction case for bignum test failure (noir-lang/noir#6464) chore: bump `noir-gates-diff` (noir-lang/noir#6949) feat(test): Enable the test fuzzer for Wasm (noir-lang/noir#6835) chore: also print test output to stdout in CI (noir-lang/noir#6930) fix: Non-determinism from under constrained checks (noir-lang/noir#6945) chore: use logs for benchmarking (noir-lang/noir#6911) chore: bump `noir-gates-diff` (noir-lang/noir#6944) chore: bump `noir-gates-diff` (noir-lang/noir#6943) fix: Show output of `test_program_is_idempotent` on failure (noir-lang/noir#6942) chore: delete a bunch of dead code from `noirc_evaluator` (noir-lang/noir#6939) feat: require trait function calls (`Foo::bar()`) to have the trait in scope (imported) (noir-lang/noir#6882) chore: Bump arkworks to version `0.5.0` (noir-lang/noir#6871)
2 parents 3e9bb5b + 65c7e62 commit a8136ba

File tree

50 files changed

+656
-853
lines changed

Some content is hidden

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

50 files changed

+656
-853
lines changed

.noir-sync-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
000799244b6df18f6d3a1335d2e054c983afa0d1
1+
7cc8dbfe670aeaf9ec84f30265417658f5465d11

noir/noir-repo/.github/workflows/reports.yml

+2-126
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
7777
- name: Compare gates reports
7878
id: gates_diff
79-
uses: noir-lang/noir-gates-diff@60c57a6e3b67bf1553a5774ded82920150f2210e
79+
uses: noir-lang/noir-gates-diff@7e4ddaa91c69380f15ccba514eac17bc7432a8cc
8080
with:
8181
report: gates_report.json
8282
summaryQuantile: 0.9 # only display the 10% most significant circuit size diffs in the summary (defaults to 20%)
@@ -121,7 +121,7 @@ jobs:
121121
122122
- name: Compare Brillig bytecode size reports
123123
id: brillig_bytecode_diff
124-
uses: noir-lang/noir-gates-diff@60c57a6e3b67bf1553a5774ded82920150f2210e
124+
uses: noir-lang/noir-gates-diff@7e4ddaa91c69380f15ccba514eac17bc7432a8cc
125125
with:
126126
report: gates_report_brillig.json
127127
header: |
@@ -333,13 +333,6 @@ jobs:
333333
test_programs/execution_report.sh
334334
test_programs/parse_time.sh
335335
sparse-checkout-cone-mode: false
336-
337-
- uses: actions/checkout@v4
338-
with:
339-
path: scripts
340-
sparse-checkout: |
341-
test_programs/execution_report.sh
342-
sparse-checkout-cone-mode: false
343336

344337
- name: Checkout
345338
uses: actions/checkout@v4
@@ -357,123 +350,6 @@ jobs:
357350
chmod +x parse_time.sh
358351
cp /home/runner/work/noir/noir/scripts/test_programs/parse_time.sh ./parse_time.sh
359352
./compilation_report.sh 1
360-
361-
- name: Generate execution report
362-
working-directory: ./test-repo/${{ matrix.project.path }}
363-
if: ${{ !matrix.project.is_library }}
364-
run: |
365-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
366-
./execution_report.sh 1
367-
368-
- name: Generate compilation report with averages
369-
working-directory: ./test-repo/${{ matrix.project.path }}
370-
if: ${{ matrix.project.take_average }}
371-
run: |
372-
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
373-
chmod +x ./compilation_report.sh
374-
./compilation_report.sh 1 1
375-
376-
- name: Generate execution report without averages
377-
working-directory: ./test-repo/${{ matrix.project.path }}
378-
if: ${{ !matrix.project.is_library && !matrix.project.take_average }}
379-
run: |
380-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
381-
./execution_report.sh 1
382-
383-
- name: Generate execution report with averages
384-
working-directory: ./test-repo/${{ matrix.project.path }}
385-
if: ${{ !matrix.project.is_library && matrix.project.take_average }}
386-
run: |
387-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
388-
./execution_report.sh 1 1
389-
390-
- name: Generate compilation report with averages
391-
working-directory: ./test-repo/${{ matrix.project.path }}
392-
if: ${{ matrix.project.take_average }}
393-
run: |
394-
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
395-
chmod +x ./compilation_report.sh
396-
./compilation_report.sh 1 1
397-
398-
- name: Generate execution report without averages
399-
working-directory: ./test-repo/${{ matrix.project.path }}
400-
if: ${{ !matrix.project.is_library && !matrix.project.take_average }}
401-
run: |
402-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
403-
./execution_report.sh 1
404-
405-
- name: Generate execution report with averages
406-
working-directory: ./test-repo/${{ matrix.project.path }}
407-
if: ${{ !matrix.project.is_library && matrix.project.take_average }}
408-
run: |
409-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
410-
./execution_report.sh 1 1
411-
412-
- name: Generate compilation report with averages
413-
working-directory: ./test-repo/${{ matrix.project.path }}
414-
if: ${{ matrix.project.take_average }}
415-
run: |
416-
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
417-
chmod +x ./compilation_report.sh
418-
./compilation_report.sh 1 1
419-
420-
- name: Generate execution report without averages
421-
working-directory: ./test-repo/${{ matrix.project.path }}
422-
if: ${{ !matrix.project.is_library && !matrix.project.take_average }}
423-
run: |
424-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
425-
./execution_report.sh 1
426-
427-
- name: Generate execution report with averages
428-
working-directory: ./test-repo/${{ matrix.project.path }}
429-
if: ${{ !matrix.project.is_library && matrix.project.take_average }}
430-
run: |
431-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
432-
./execution_report.sh 1 1
433-
434-
- name: Generate compilation report with averages
435-
working-directory: ./test-repo/${{ matrix.project.path }}
436-
if: ${{ matrix.project.take_average }}
437-
run: |
438-
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
439-
chmod +x ./compilation_report.sh
440-
./compilation_report.sh 1 1
441-
442-
- name: Generate execution report without averages
443-
working-directory: ./test-repo/${{ matrix.project.path }}
444-
if: ${{ !matrix.project.is_library && !matrix.project.take_average }}
445-
run: |
446-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
447-
./execution_report.sh 1
448-
449-
- name: Generate execution report with averages
450-
working-directory: ./test-repo/${{ matrix.project.path }}
451-
if: ${{ !matrix.project.is_library && matrix.project.take_average }}
452-
run: |
453-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
454-
./execution_report.sh 1 1
455-
456-
- name: Generate compilation report with averages
457-
working-directory: ./test-repo/${{ matrix.project.path }}
458-
if: ${{ matrix.project.take_average }}
459-
run: |
460-
mv /home/runner/work/noir/noir/scripts/test_programs/compilation_report.sh ./compilation_report.sh
461-
chmod +x ./compilation_report.sh
462-
./compilation_report.sh 1 1
463-
464-
- name: Generate execution report without averages
465-
working-directory: ./test-repo/${{ matrix.project.path }}
466-
if: ${{ !matrix.project.is_library && !matrix.project.take_average }}
467-
run: |
468-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
469-
./execution_report.sh 1
470-
471-
- name: Generate execution report with averages
472-
working-directory: ./test-repo/${{ matrix.project.path }}
473-
if: ${{ !matrix.project.is_library && matrix.project.take_average }}
474-
run: |
475-
mv /home/runner/work/noir/noir/scripts/test_programs/execution_report.sh ./execution_report.sh
476-
./execution_report.sh 1 1
477353
478354
- name: Generate compilation report with averages
479355
working-directory: ./test-repo/${{ matrix.project.path }}

noir/noir-repo/Cargo.lock

+20-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

noir/noir-repo/Cargo.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ noir_lsp = { path = "tooling/lsp" }
8383
noir_debugger = { path = "tooling/debugger" }
8484
noirc_abi = { path = "tooling/noirc_abi" }
8585
noirc_artifacts = { path = "tooling/noirc_artifacts" }
86-
bb_abstraction_leaks = { path = "tooling/bb_abstraction_leaks" }
87-
acvm_cli = { path = "tooling/acvm_cli" }
8886

8987
# Arkworks
9088
ark-bn254 = { version = "^0.5.0", default-features = false, features = [
@@ -152,8 +150,12 @@ jsonrpsee = { version = "0.24.7", features = ["client-core"] }
152150
flate2 = "1.0.24"
153151
color-eyre = "0.6.2"
154152
rand = "0.8.5"
155-
proptest = "1.2.0"
156-
proptest-derive = "0.4.0"
153+
# The `fork` and `timeout` feature doesn't compile with Wasm (wait-timeout doesn't find the `imp` module).
154+
proptest = { version = "1.6.0", default-features = false, features = [
155+
"std",
156+
"bit-set",
157+
] }
158+
proptest-derive = "0.5.0"
157159
rayon = "1.8.0"
158160
sha2 = { version = "0.10.6", features = ["compress"] }
159161
sha3 = "0.10.6"

noir/noir-repo/compiler/noirc_driver/src/lib.rs

+20-10
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,9 @@ pub fn check_crate(
311311
crate_id: CrateId,
312312
options: &CompileOptions,
313313
) -> CompilationResult<()> {
314-
let error_on_unused_imports = true;
315-
let diagnostics = CrateDefMap::collect_defs(
316-
crate_id,
317-
context,
318-
options.debug_comptime_in_file.as_deref(),
319-
error_on_unused_imports,
320-
);
314+
let diagnostics =
315+
CrateDefMap::collect_defs(crate_id, context, options.debug_comptime_in_file.as_deref());
316+
let crate_files = context.crate_files(&crate_id);
321317
let warnings_and_errors: Vec<FileDiagnostic> = diagnostics
322318
.into_iter()
323319
.map(|(error, file_id)| {
@@ -328,6 +324,14 @@ pub fn check_crate(
328324
// We filter out any warnings if they're going to be ignored later on to free up memory.
329325
!options.silence_warnings || diagnostic.diagnostic.kind != DiagnosticKind::Warning
330326
})
327+
.filter(|error| {
328+
// Only keep warnings from the crate we are checking
329+
if error.diagnostic.is_warning() {
330+
crate_files.contains(&error.file_id)
331+
} else {
332+
true
333+
}
334+
})
331335
.collect();
332336

333337
if has_errors(&warnings_and_errors, options.deny_warnings) {
@@ -590,10 +594,17 @@ pub fn compile_no_check(
590594
cached_program: Option<CompiledProgram>,
591595
force_compile: bool,
592596
) -> Result<CompiledProgram, CompileError> {
597+
let force_unconstrained = options.force_brillig;
598+
593599
let program = if options.instrument_debug {
594-
monomorphize_debug(main_function, &mut context.def_interner, &context.debug_instrumenter)?
600+
monomorphize_debug(
601+
main_function,
602+
&mut context.def_interner,
603+
&context.debug_instrumenter,
604+
force_unconstrained,
605+
)?
595606
} else {
596-
monomorphize(main_function, &mut context.def_interner)?
607+
monomorphize(main_function, &mut context.def_interner, force_unconstrained)?
597608
};
598609

599610
if options.show_monomorphized {
@@ -632,7 +643,6 @@ pub fn compile_no_check(
632643
}
633644
},
634645
enable_brillig_logging: options.show_brillig,
635-
force_brillig_output: options.force_brillig,
636646
print_codegen_timings: options.benchmark_codegen,
637647
expression_width: if options.bounded_codegen {
638648
options.expression_width.unwrap_or(DEFAULT_EXPRESSION_WIDTH)

noir/noir-repo/compiler/noirc_evaluator/src/acir/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,8 @@ impl<'a> Context<'a> {
769769
unreachable!("Expected all load instructions to be removed before acir_gen")
770770
}
771771
Instruction::IncrementRc { .. } | Instruction::DecrementRc { .. } => {
772-
// Do nothing. Only Brillig needs to worry about reference counted arrays
772+
// Only Brillig needs to worry about reference counted arrays
773+
unreachable!("Expected all Rc instructions to be removed before acir_gen")
773774
}
774775
Instruction::RangeCheck { value, max_bit_size, assert_message } => {
775776
let acir_var = self.convert_numeric_value(*value, dfg)?;

0 commit comments

Comments
 (0)