Skip to content

fix(expand): show references to ModuleDefId recursing on parents#8977

Merged
TomAFrench merged 4 commits intomasterfrom
ab/nargo-expand-show-module-def-id-recursively
Jun 19, 2025
Merged

fix(expand): show references to ModuleDefId recursing on parents#8977
TomAFrench merged 4 commits intomasterfrom
ab/nargo-expand-show-module-def-id-recursively

Conversation

@asterite
Copy link
Copy Markdown
Collaborator

Description

Problem

Part of #8281

Summary

nargo expand didn't correctly produce references to items in some cases. To do this it relied on a function that didn't have access to the expander (a function used mainly for LSP) so it didn't know about existing imports, etc. Actually, in the end some logic was moved to be done more generally (previously it was only done if the item to reference wasn't visible).

Additional Context

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@asterite asterite requested a review from a team June 19, 2025 14:13
@TomAFrench TomAFrench enabled auto-merge June 19, 2025 14:20
@TomAFrench TomAFrench added this pull request to the merge queue Jun 19, 2025
Merged via the queue into master with commit 2cfc786 Jun 19, 2025
117 of 118 checks passed
@TomAFrench TomAFrench deleted the ab/nargo-expand-show-module-def-id-recursively branch June 19, 2025 15:05
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 23, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: increment reference counts when deduplicating calls which return
arrays (noir-lang/noir#8757)
fix: Add a aliased check for last stores
(noir-lang/noir#8955)
fix(LICM): Consider negative loop bounds before hoisting `div <const>
<induction-var>` (noir-lang/noir#8986)
fix: check "negate with overflow" in comptime code + allow u1 to be used
in comptime code (noir-lang/noir#8969)
fix: better package name validation and error messages for nargo
new/init (noir-lang/noir#8978)
feat(fuzz): Add comptime_vs_brillig_direct target
(noir-lang/noir#8924)
fix(expand): show references to ModuleDefId recursing on parents
(noir-lang/noir#8977)
feat(ssa_fuzzer): loops + signed
(noir-lang/noir#8881)
fix(fuzz): Do not take a mutable reference over immutable vars which
contain a mutable ref (noir-lang/noir#8971)
fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile
(noir-lang/noir#8972)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <[email protected]>
Co-authored-by: Tom French <[email protected]>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 23, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: increment reference counts when deduplicating calls which return
arrays (noir-lang/noir#8757)
fix: Add a aliased check for last stores
(noir-lang/noir#8955)
fix(LICM): Consider negative loop bounds before hoisting `div <const>
<induction-var>` (noir-lang/noir#8986)
fix: check "negate with overflow" in comptime code + allow u1 to be used
in comptime code (noir-lang/noir#8969)
fix: better package name validation and error messages for nargo
new/init (noir-lang/noir#8978)
feat(fuzz): Add comptime_vs_brillig_direct target
(noir-lang/noir#8924)
fix(expand): show references to ModuleDefId recursing on parents
(noir-lang/noir#8977)
feat(ssa_fuzzer): loops + signed
(noir-lang/noir#8881)
fix(fuzz): Do not take a mutable reference over immutable vars which
contain a mutable ref (noir-lang/noir#8971)
fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile
(noir-lang/noir#8972)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <[email protected]>
Co-authored-by: Tom French <[email protected]>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 23, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: increment reference counts when deduplicating calls which return
arrays (noir-lang/noir#8757)
fix: Add a aliased check for last stores
(noir-lang/noir#8955)
fix(LICM): Consider negative loop bounds before hoisting `div <const>
<induction-var>` (noir-lang/noir#8986)
fix: check "negate with overflow" in comptime code + allow u1 to be used
in comptime code (noir-lang/noir#8969)
fix: better package name validation and error messages for nargo
new/init (noir-lang/noir#8978)
feat(fuzz): Add comptime_vs_brillig_direct target
(noir-lang/noir#8924)
fix(expand): show references to ModuleDefId recursing on parents
(noir-lang/noir#8977)
feat(ssa_fuzzer): loops + signed
(noir-lang/noir#8881)
fix(fuzz): Do not take a mutable reference over immutable vars which
contain a mutable ref (noir-lang/noir#8971)
fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile
(noir-lang/noir#8972)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <[email protected]>
Co-authored-by: Tom French <[email protected]>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 23, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: increment reference counts when deduplicating calls which return
arrays (noir-lang/noir#8757)
fix: Add a aliased check for last stores
(noir-lang/noir#8955)
fix(LICM): Consider negative loop bounds before hoisting `div <const>
<induction-var>` (noir-lang/noir#8986)
fix: check "negate with overflow" in comptime code + allow u1 to be used
in comptime code (noir-lang/noir#8969)
fix: better package name validation and error messages for nargo
new/init (noir-lang/noir#8978)
feat(fuzz): Add comptime_vs_brillig_direct target
(noir-lang/noir#8924)
fix(expand): show references to ModuleDefId recursing on parents
(noir-lang/noir#8977)
feat(ssa_fuzzer): loops + signed
(noir-lang/noir#8881)
fix(fuzz): Do not take a mutable reference over immutable vars which
contain a mutable ref (noir-lang/noir#8971)
fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile
(noir-lang/noir#8972)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <[email protected]>
Co-authored-by: Tom French <[email protected]>
danielntmd pushed a commit to danielntmd/aztec-packages that referenced this pull request Jul 16, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: increment reference counts when deduplicating calls which return
arrays (noir-lang/noir#8757)
fix: Add a aliased check for last stores
(noir-lang/noir#8955)
fix(LICM): Consider negative loop bounds before hoisting `div <const>
<induction-var>` (noir-lang/noir#8986)
fix: check "negate with overflow" in comptime code + allow u1 to be used
in comptime code (noir-lang/noir#8969)
fix: better package name validation and error messages for nargo
new/init (noir-lang/noir#8978)
feat(fuzz): Add comptime_vs_brillig_direct target
(noir-lang/noir#8924)
fix(expand): show references to ModuleDefId recursing on parents
(noir-lang/noir#8977)
feat(ssa_fuzzer): loops + signed
(noir-lang/noir#8881)
fix(fuzz): Do not take a mutable reference over immutable vars which
contain a mutable ref (noir-lang/noir#8971)
fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile
(noir-lang/noir#8972)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <[email protected]>
Co-authored-by: Tom French <[email protected]>
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Dec 3, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: increment reference counts when deduplicating calls which return
arrays (noir-lang/noir#8757)
fix: Add a aliased check for last stores
(noir-lang/noir#8955)
fix(LICM): Consider negative loop bounds before hoisting `div <const>
<induction-var>` (noir-lang/noir#8986)
fix: check "negate with overflow" in comptime code + allow u1 to be used
in comptime code (noir-lang/noir#8969)
fix: better package name validation and error messages for nargo
new/init (noir-lang/noir#8978)
feat(fuzz): Add comptime_vs_brillig_direct target
(noir-lang/noir#8924)
fix(expand): show references to ModuleDefId recursing on parents
(noir-lang/noir#8977)
feat(ssa_fuzzer): loops + signed
(noir-lang/noir#8881)
fix(fuzz): Do not take a mutable reference over immutable vars which
contain a mutable ref (noir-lang/noir#8971)
fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile
(noir-lang/noir#8972)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <[email protected]>
Co-authored-by: Tom French <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants