-
Notifications
You must be signed in to change notification settings - Fork 226
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!: Handle generic fields in StructDefinition::fields
and move old functionality to StructDefinition::fields_as_written
#7067
Conversation
Compilation Memory Report
|
Execution Memory Report
|
🚀 Deployed on https://6786d32777c5174a76a4468e--noir-docs.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with small note r.e. using fields
on fields_as_written
compiler/noirc_frontend/src/hir/comptime/interpreter/builtin.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Michael J Klein <michaeljklein@users.noreply.github.com>
FYI @noir-lang/developerrelations on Noir doc changes. |
…oir-lang/noir#7066) feat!: Handle generic fields in `StructDefinition::fields` and move old functionality to `StructDefinition::fields_as_written` (noir-lang/noir#7067) chore(ci): Check various inliner aggressiveness setttings in Brillig reports (noir-lang/noir#7049) chore: reenable reports on rollup root circuits (noir-lang/noir#7061) fix: don't always select trait impl when verifying trait constraints (noir-lang/noir#7041) chore: mark some critical libraries as good again (noir-lang/noir#7065) fix: Reduce memory usage in mem2reg (noir-lang/noir#7053) feat: Allow associated types to be ellided from trait constraints (noir-lang/noir#7026) chore(perf): try using vec-collections's VecSet in AliasSet (noir-lang/noir#7058) chore: reduce number of iterations of `acvm::compiler::compile` (noir-lang/noir#7050) chore: add `noir_check_shuffle` as a critical library (noir-lang/noir#7056) chore: clippy warning fix (noir-lang/noir#7051) chore(ci): Unify compilation/execution report jobs that take averages with single runs (noir-lang/noir#7048) fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046) fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043) feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037) feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036) fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027) chore: add more protocol circuits to reports (noir-lang/noir#6977) feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031) feat: skip codegen of zero iteration loops (noir-lang/noir#7030)
…ir#7066) feat!: Handle generic fields in `StructDefinition::fields` and move old functionality to `StructDefinition::fields_as_written` (noir-lang/noir#7067) chore(ci): Check various inliner aggressiveness setttings in Brillig reports (noir-lang/noir#7049) chore: reenable reports on rollup root circuits (noir-lang/noir#7061) fix: don't always select trait impl when verifying trait constraints (noir-lang/noir#7041) chore: mark some critical libraries as good again (noir-lang/noir#7065) fix: Reduce memory usage in mem2reg (noir-lang/noir#7053) feat: Allow associated types to be ellided from trait constraints (noir-lang/noir#7026) chore(perf): try using vec-collections's VecSet in AliasSet (noir-lang/noir#7058) chore: reduce number of iterations of `acvm::compiler::compile` (noir-lang/noir#7050) chore: add `noir_check_shuffle` as a critical library (noir-lang/noir#7056) chore: clippy warning fix (noir-lang/noir#7051) chore(ci): Unify compilation/execution report jobs that take averages with single runs (noir-lang/noir#7048) fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046) fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043) feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037) feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036) fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027) chore: add more protocol circuits to reports (noir-lang/noir#6977) feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031) feat: skip codegen of zero iteration loops (noir-lang/noir#7030)
In future please coordinate with me if merging breaking changes which blow up all of our benchmarks. Having this dropped on me when noir syncs are blocked is not fun. |
…ir#7070) feat(LSP): code action to import trait in a method call (noir-lang/noir#7066) feat!: Handle generic fields in `StructDefinition::fields` and move old functionality to `StructDefinition::fields_as_written` (noir-lang/noir#7067) chore(ci): Check various inliner aggressiveness setttings in Brillig reports (noir-lang/noir#7049) chore: reenable reports on rollup root circuits (noir-lang/noir#7061) fix: don't always select trait impl when verifying trait constraints (noir-lang/noir#7041) chore: mark some critical libraries as good again (noir-lang/noir#7065) fix: Reduce memory usage in mem2reg (noir-lang/noir#7053) feat: Allow associated types to be ellided from trait constraints (noir-lang/noir#7026) chore(perf): try using vec-collections's VecSet in AliasSet (noir-lang/noir#7058) chore: reduce number of iterations of `acvm::compiler::compile` (noir-lang/noir#7050) chore: add `noir_check_shuffle` as a critical library (noir-lang/noir#7056) chore: clippy warning fix (noir-lang/noir#7051) chore(ci): Unify compilation/execution report jobs that take averages with single runs (noir-lang/noir#7048) fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046) fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043) feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037) feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036) fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027) chore: add more protocol circuits to reports (noir-lang/noir#6977) feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031) feat: skip codegen of zero iteration loops (noir-lang/noir#7030)
feat(LSP): code action to import trait in a method call (noir-lang/noir#7066) feat!: Handle generic fields in `StructDefinition::fields` and move old functionality to `StructDefinition::fields_as_written` (noir-lang/noir#7067) chore(ci): Check various inliner aggressiveness setttings in Brillig reports (noir-lang/noir#7049) chore: reenable reports on rollup root circuits (noir-lang/noir#7061) fix: don't always select trait impl when verifying trait constraints (noir-lang/noir#7041) chore: mark some critical libraries as good again (noir-lang/noir#7065) fix: Reduce memory usage in mem2reg (noir-lang/noir#7053) feat: Allow associated types to be ellided from trait constraints (noir-lang/noir#7026) chore(perf): try using vec-collections's VecSet in AliasSet (noir-lang/noir#7058) chore: reduce number of iterations of `acvm::compiler::compile` (noir-lang/noir#7050) chore: add `noir_check_shuffle` as a critical library (noir-lang/noir#7056) chore: clippy warning fix (noir-lang/noir#7051) chore(ci): Unify compilation/execution report jobs that take averages with single runs (noir-lang/noir#7048) fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046) fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043) feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037) feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036) fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027) chore: add more protocol circuits to reports (noir-lang/noir#6977) feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031) feat: skip codegen of zero iteration loops (noir-lang/noir#7030)
Another thing that might have been good to do, given that this is a breaking change, is to also return the visibility of each field (we also have an issue to be able to set those visibilities when setting those fields) |
@TomAFrench sorry about that, I mistakenly assumed the sync itself would be quick and it'd just break aztec-noir downstream which could be fixed fairly quickly. I'll definitely coordinate more in the future |
Automated pull of development from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: add end step for formatting workflow (noir-lang/noir#7070) feat(LSP): code action to import trait in a method call (noir-lang/noir#7066) feat!: Handle generic fields in `StructDefinition::fields` and move old functionality to `StructDefinition::fields_as_written` (noir-lang/noir#7067) chore(ci): Check various inliner aggressiveness setttings in Brillig reports (noir-lang/noir#7049) chore: reenable reports on rollup root circuits (noir-lang/noir#7061) fix: don't always select trait impl when verifying trait constraints (noir-lang/noir#7041) chore: mark some critical libraries as good again (noir-lang/noir#7065) fix: Reduce memory usage in mem2reg (noir-lang/noir#7053) feat: Allow associated types to be ellided from trait constraints (noir-lang/noir#7026) chore(perf): try using vec-collections's VecSet in AliasSet (noir-lang/noir#7058) chore: reduce number of iterations of `acvm::compiler::compile` (noir-lang/noir#7050) chore: add `noir_check_shuffle` as a critical library (noir-lang/noir#7056) chore: clippy warning fix (noir-lang/noir#7051) chore(ci): Unify compilation/execution report jobs that take averages with single runs (noir-lang/noir#7048) fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046) fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043) feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037) feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036) fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027) chore: add more protocol circuits to reports (noir-lang/noir#6977) feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031) feat: skip codegen of zero iteration loops (noir-lang/noir#7030) END_COMMIT_OVERRIDE --------- Co-authored-by: Tom French <tom@tomfren.ch> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Jake Fecher <jfecher11@gmail.com>
Automated pull of development from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: add end step for formatting workflow (noir-lang/noir#7070) feat(LSP): code action to import trait in a method call (noir-lang/noir#7066) feat!: Handle generic fields in `StructDefinition::fields` and move old functionality to `StructDefinition::fields_as_written` (noir-lang/noir#7067) chore(ci): Check various inliner aggressiveness setttings in Brillig reports (noir-lang/noir#7049) chore: reenable reports on rollup root circuits (noir-lang/noir#7061) fix: don't always select trait impl when verifying trait constraints (noir-lang/noir#7041) chore: mark some critical libraries as good again (noir-lang/noir#7065) fix: Reduce memory usage in mem2reg (noir-lang/noir#7053) feat: Allow associated types to be ellided from trait constraints (noir-lang/noir#7026) chore(perf): try using vec-collections's VecSet in AliasSet (noir-lang/noir#7058) chore: reduce number of iterations of `acvm::compiler::compile` (noir-lang/noir#7050) chore: add `noir_check_shuffle` as a critical library (noir-lang/noir#7056) chore: clippy warning fix (noir-lang/noir#7051) chore(ci): Unify compilation/execution report jobs that take averages with single runs (noir-lang/noir#7048) fix(nargo_fmt): let doc comment could come after regular comment (noir-lang/noir#7046) fix(nargo_fmt): don't consider identifiers the same if they are equal… (noir-lang/noir#7043) feat: auto-import traits when suggesting trait methods (noir-lang/noir#7037) feat: avoid inserting `inc_rc` instructions into ACIR (noir-lang/noir#7036) fix(lsp): suggest all possible trait methods, but only visible ones (noir-lang/noir#7027) chore: add more protocol circuits to reports (noir-lang/noir#6977) feat: avoid generating a new witness when checking if linear expression is zero (noir-lang/noir#7031) feat: skip codegen of zero iteration loops (noir-lang/noir#7030) END_COMMIT_OVERRIDE --------- Co-authored-by: Tom French <tom@tomfren.ch> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Jake Fecher <jfecher11@gmail.com>
Description
Problem*
Resolves an issue from a private slack request. Needed for implementing
derive_serialize
recursively so that struct field types have their generics substituted correctly.Summary*
Adds a
generic_args
argument toStructDefinition::fields
to instantiate the field types with. This means this PR is breaking since this method used to require onlyself
.Since the old functionality of not instantiating can still be useful, I have moved it to a new function
fields_as_written
but wanted to emphasize that if users did need field types, and they don't know what the difference is, that they should prefer to usefields
.Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.