Skip to content
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
71ba689
chore!: enforce visibility warnings as errors
TomAFrench Mar 11, 2025
84059a1
Merge branch 'master' into tf/enforce-visibility
TomAFrench Mar 17, 2025
13eb87a
Merge branch 'master' into tf/enforce-visibility
TomAFrench Mar 24, 2025
97ecdea
Merge branch 'master' into tf/enforce-visibility
TomAFrench Apr 17, 2025
8530a29
chore: update snapshots
TomAFrench Apr 17, 2025
abc29df
.
TomAFrench Apr 17, 2025
f3d06cb
.
TomAFrench Apr 17, 2025
cf24967
.
TomAFrench Apr 17, 2025
651d998
.
TomAFrench Apr 17, 2025
273958a
.
TomAFrench Apr 17, 2025
3e5f696
.
TomAFrench Apr 17, 2025
86db477
.
TomAFrench Apr 17, 2025
72f5315
.
TomAFrench Apr 17, 2025
0f31687
.
TomAFrench Apr 17, 2025
48ffe36
.
TomAFrench Apr 17, 2025
0e939d1
.
TomAFrench Apr 17, 2025
4455ee9
.
TomAFrench Apr 18, 2025
44b4dcc
.
TomAFrench Apr 18, 2025
8ac84db
Merge branch 'master' into tf/enforce-visibility
TomAFrench Apr 18, 2025
28e4ae8
.
TomAFrench Apr 18, 2025
24f1519
.
TomAFrench Apr 18, 2025
17cdad4
.
TomAFrench Apr 18, 2025
b5843a7
.
TomAFrench Apr 18, 2025
de89af6
bigcurve status: cooked
TomAFrench Apr 18, 2025
77a8883
Merge branch 'master' into tf/enforce-visibility
Apr 29, 2025
8f8e4cd
.
Apr 29, 2025
35804a2
Merge branch 'master' into tf/enforce-visibility
TomAFrench Apr 29, 2025
82c593c
.
Apr 29, 2025
03f53b2
.
Apr 29, 2025
56d7f40
Merge branch 'master' into tf/enforce-visibility
May 12, 2025
2d231c3
.
May 12, 2025
58555e1
.
May 12, 2025
d638363
.
May 12, 2025
0aec286
Update .github/workflows/reports.yml
TomAFrench May 12, 2025
097db0d
Update EXTERNAL_NOIR_LIBRARIES.yml
TomAFrench May 12, 2025
200a2ee
Merge branch 'master' into tf/enforce-visibility
May 12, 2025
392496c
Merge branch 'master' into tf/enforce-visibility
May 12, 2025
7631f4c
.
May 12, 2025
1e4b6a6
Merge branch 'master' into tf/enforce-visibility
TomAFrench May 16, 2025
cd8fedc
Merge branch 'master' into tf/enforce-visibility
TomAFrench May 27, 2025
5da8642
.
TomAFrench May 27, 2025
3619f9c
.
TomAFrench May 27, 2025
662a754
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jun 3, 2025
d424e41
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jun 6, 2025
68f151e
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jun 24, 2025
b50cfc1
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jun 27, 2025
493d8cf
Merge branch 'master' into tf/enforce-visibility
asterite Jul 1, 2025
6c69bae
Snapshots, and fix missing nargo expand struct field visibility
asterite Jul 1, 2025
8f084d1
Use "crate" instead of "super" in nargo expand when possible
asterite Jul 1, 2025
4cf75cf
chore: Update pinned commit of aztec-packages
Jul 15, 2025
b1be6ec
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jul 15, 2025
049ebab
Merge branch 'bump-aztec-packages' into tf/enforce-visibility
TomAFrench Jul 15, 2025
8236bba
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jul 15, 2025
6c97362
.
TomAFrench Jul 15, 2025
e3f1aeb
chore: disable aztec-packages reports
TomAFrench Jul 15, 2025
4b00d93
.
TomAFrench Jul 15, 2025
da917f6
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jul 17, 2025
07ad518
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jul 17, 2025
d1a37bf
.
TomAFrench Jul 17, 2025
eeddbd1
Update tooling/nargo_cli/build.rs
TomAFrench Jul 18, 2025
1016f92
Update compiler/noirc_frontend/src/hir/resolution/import.rs
TomAFrench Jul 18, 2025
564994e
Merge branch 'master' into tf/enforce-visibility
TomAFrench Jul 22, 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
194 changes: 97 additions & 97 deletions .github/benchmark_projects.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
define: &AZ_COMMIT 801a120d940fe3b0068eb770d57124d426e0f2b1
projects:
private-kernel-inner:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner
num_runs: 5
compilation-timeout: 3.0
execution-timeout: 0.08
compilation-memory-limit: 350
execution-memory-limit: 250
private-kernel-tail:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail
num_runs: 5
timeout: 4
compilation-timeout: 3
execution-timeout: 0.04
compilation-memory-limit: 250
execution-memory-limit: 230
private-kernel-reset:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset
num_runs: 5
timeout: 250
compilation-timeout: 10
execution-timeout: 0.35
compilation-memory-limit: 750
execution-memory-limit: 300
rollup-base-private:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/rollup-base-private
num_runs: 5
timeout: 15
compilation-timeout: 20
execution-timeout: 1
compilation-memory-limit: 1600
execution-memory-limit: 650
rollup-base-public:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/rollup-base-public
num_runs: 5
timeout: 15
compilation-timeout: 20
execution-timeout: 0.75
compilation-memory-limit: 1700
execution-memory-limit: 600
rollup-block-root-empty:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-empty
cannot_execute: true
num_runs: 5
timeout: 60
compilation-timeout: 25
compilation-memory-limit: 1500
rollup-block-root-single-tx:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-single-tx
cannot_execute: true
num_runs: 1
timeout: 60
compilation-timeout: 250
compilation-memory-limit: 10000
rollup-block-root:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/rollup-block-root
num_runs: 1
timeout: 60
compilation-timeout: 250
execution-timeout: 40
compilation-memory-limit: 10000
execution-memory-limit: 1900
rollup-merge:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/rollup-merge
num_runs: 5
timeout: 300
compilation-timeout: 4
execution-timeout: 0.01
compilation-memory-limit: 450
execution-memory-limit: 450
rollup-root:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
path: noir-projects/noir-protocol-circuits/crates/rollup-root
num_runs: 5
timeout: 300
compilation-timeout: 2
execution-timeout: 0.6
compilation-memory-limit: 500
execution-memory-limit: 450
# private-kernel-inner:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner
# num_runs: 5
# compilation-timeout: 3.0
# execution-timeout: 0.08
# compilation-memory-limit: 350
# execution-memory-limit: 250
# private-kernel-tail:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail
# num_runs: 5
# timeout: 4
# compilation-timeout: 3
# execution-timeout: 0.04
# compilation-memory-limit: 250
# execution-memory-limit: 230
# private-kernel-reset:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset
# num_runs: 5
# timeout: 250
# compilation-timeout: 10
# execution-timeout: 0.35
# compilation-memory-limit: 750
# execution-memory-limit: 300
# rollup-base-private:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/rollup-base-private
# num_runs: 5
# timeout: 15
# compilation-timeout: 20
# execution-timeout: 1
# compilation-memory-limit: 1600
# execution-memory-limit: 650
# rollup-base-public:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/rollup-base-public
# num_runs: 5
# timeout: 15
# compilation-timeout: 20
# execution-timeout: 0.75
# compilation-memory-limit: 1700
# execution-memory-limit: 600
# rollup-block-root-empty:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-empty
# cannot_execute: true
# num_runs: 5
# timeout: 60
# compilation-timeout: 25
# compilation-memory-limit: 1500
# rollup-block-root-single-tx:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-single-tx
# cannot_execute: true
# num_runs: 1
# timeout: 60
# compilation-timeout: 250
# compilation-memory-limit: 10000
# rollup-block-root:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/rollup-block-root
# num_runs: 1
# timeout: 60
# compilation-timeout: 250
# execution-timeout: 40
# compilation-memory-limit: 10000
# execution-memory-limit: 1900
# rollup-merge:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/rollup-merge
# num_runs: 5
# timeout: 300
# compilation-timeout: 4
# execution-timeout: 0.01
# compilation-memory-limit: 450
# execution-memory-limit: 450
# rollup-root:
# repo: AztecProtocol/aztec-packages
# ref: *AZ_COMMIT
# path: noir-projects/noir-protocol-circuits/crates/rollup-root
# num_runs: 5
# timeout: 300
# compilation-timeout: 2
# execution-timeout: 0.6
# compilation-memory-limit: 500
# execution-memory-limit: 450
semaphore-depth-10:
repo: noir-lang/noir
path: test_programs/benchmarks/semaphore_depth_10
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
{"suite":"noir_bigcurve","name":"utils::derive_offset_generators::test_compute_and_print_offset_generators"}
1 change: 1 addition & 0 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ jobs:
- name: Download noir-inspector binary
uses: ./.github/actions/download-noir-inspector


- name: Generate compilation report
id: compilation_report
run: |
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -614,36 +614,36 @@ jobs:
exit 1
fi

compile-noir-contracts:
needs: [build-nargo]
runs-on: ubuntu-22.04
timeout-minutes: 30
name: Compile `noir-contracts` zero inliner aggressiveness
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: noir-repo

- name: Checkout
uses: actions/checkout@v4
with:
repository: AztecProtocol/aztec-packages
path: test-repo

- name: Download nargo binary
uses: ./noir-repo/.github/actions/download-nargo

- name: Remove requirements on compiler version
working-directory: ./test-repo
run: |
# Github actions seems to not expand "**" in globs by default.
shopt -s globstar
sed -i '/^compiler_version/d' ./**/Nargo.toml

- name: Run nargo compile
working-directory: ./test-repo/noir-projects/noir-contracts
run: nargo compile --inliner-aggressiveness 0
# compile-noir-contracts:
# needs: [build-nargo]
# runs-on: ubuntu-22.04
# timeout-minutes: 30
# name: Compile `noir-contracts` zero inliner aggressiveness
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# path: noir-repo

# - name: Checkout
# uses: actions/checkout@v4
# with:
# repository: AztecProtocol/aztec-packages
# path: test-repo

# - name: Download nargo binary
# uses: ./noir-repo/.github/actions/download-nargo

# - name: Remove requirements on compiler version
# working-directory: ./test-repo
# run: |
# # Github actions seems to not expand "**" in globs by default.
# shopt -s globstar
# sed -i '/^compiler_version/d' ./**/Nargo.toml

# - name: Run nargo compile
# working-directory: ./test-repo/noir-projects/noir-contracts
# run: nargo compile --inliner-aggressiveness 0

upload_critical_library_report:
name: Upload critical library report
Expand Down Expand Up @@ -711,7 +711,7 @@ jobs:
- test-integration-node
- test-integration-browser
- test-examples
- compile-noir-contracts
# - compile-noir-contracts

steps:
- name: Report overall success
Expand Down
3 changes: 1 addition & 2 deletions compiler/noirc_frontend/src/hir/resolution/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ impl<'a> From<&'a PathResolutionError> for CustomDiagnostic {
PathResolutionError::Unresolved(ident) => {
CustomDiagnostic::simple_error(error.to_string(), String::new(), ident.location())
}
// This will be upgraded to an error in future versions
PathResolutionError::Private(ident) => CustomDiagnostic::simple_warning(
PathResolutionError::Private(ident) => CustomDiagnostic::simple_error(
error.to_string(),
format!("{ident} is private"),
ident.location(),
Expand Down
10 changes: 0 additions & 10 deletions compiler/noirc_frontend/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ fn emit_compile_test(test_path: &str, src: &str, mut expect: Expect) {
let error_to_warn_cases = [
"cast_256_to_u8_size_checks",
"enums_errors_on_unspecified_unstable_enum",
"imports_warns_on_use_of_private_exported_item",
"metaprogramming_does_not_fail_to_parse_macro_on_parser_warning",
"resolve_unused_var",
"struct_array_len",
Expand All @@ -185,17 +184,8 @@ fn emit_compile_test(test_path: &str, src: &str, mut expect: Expect) {
"unused_items_errors_on_unused_trait",
"unused_items_errors_on_unused_type_alias",
"unused_items_warns_on_unused_global",
"visibility_warns_if_calling_private_struct_method",
"warns_on_nested_unsafe",
"warns_on_unneeded_unsafe",
// TODO(https://github.com/noir-lang/noir/issues/6932): these will be hard errors
"visibility_error_when_accessing_private_struct_field",
"visibility_error_when_using_private_struct_field_in_constructor",
"visibility_error_when_using_private_struct_field_in_struct_pattern",
"visibility_errors_if_accessing_private_struct_member_inside_comptime_context",
"visibility_errors_if_accessing_private_struct_member_inside_function_generated_at_comptime",
"visibility_errors_if_trying_to_access_public_function_inside_private_module",
"visibility_errors_once_on_unused_import_that_is_not_accessible",
// TODO(https://github.com/noir-lang/noir/issues/7795): these will be hard errors
"indexing_array_with_non_u32_on_lvalue_produces_a_warning",
"indexing_array_with_non_u32_produces_a_warning",
Expand Down
25 changes: 0 additions & 25 deletions compiler/noirc_frontend/src/tests/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,6 @@ fn use_super_in_path() {
assert_no_errors!(src);
}

#[named]
#[test]
fn warns_on_use_of_private_exported_item() {
let src = r#"
mod foo {
mod bar {
pub fn baz() {}
}

use bar::baz;

pub fn qux() {
baz();
}
}

fn main() {
foo::baz();
^^^ baz is private and not visible from the current module
~~~ baz is private
}
"#;
check_errors!(src);
}

#[named]
#[test]
fn can_use_pub_use_item() {
Expand Down
27 changes: 26 additions & 1 deletion compiler/noirc_frontend/src/tests/visibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ fn errors_if_trying_to_access_public_function_inside_private_module() {

#[named]
#[test]
fn warns_if_calling_private_struct_method() {
fn errors_if_calling_private_struct_method() {
let src = r#"
mod moo {
pub struct Foo {}
Expand Down Expand Up @@ -561,3 +561,28 @@ fn errors_if_accessing_private_struct_member_inside_function_generated_at_compti
"#;
check_errors!(src);
}

#[named]
#[test]
fn errors_on_use_of_private_exported_item() {
let src = r#"
mod foo {
mod bar {
pub fn baz() {}
}

use bar::baz;

pub fn qux() {
baz();
}
}

fn main() {
foo::baz();
^^^ baz is private and not visible from the current module
~~~ baz is private
}
"#;
check_errors!(src);
}
Loading
Loading