Releases: noir-lang/noir
Releases · noir-lang/noir
nightly-2024-10-13: chore: regression test for #5462 (#6286)
# Description ## Problem\* Regression test for github.com/noir-lang/noir/issues/5462 ## Summary\* - Added the test from [5462](github.com/noir-lang/noir/issues/5462) - Updated the issue needed to re-enable the `array_regex` execution test ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
nightly-2024-10-12: chore: regression test for #5462 (#6286)
# Description ## Problem\* Regression test for github.com/noir-lang/noir/issues/5462 ## Summary\* - Added the test from [5462](github.com/noir-lang/noir/issues/5462) - Updated the issue needed to re-enable the `array_regex` execution test ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
nightly-2024-10-11: feat: slightly improve "unexpected token" error message (#6279)
Pre-release
# Description ## Problem Tokens appear like `]` or `)` in error messages where showing them as `']'` or `')'` might be clearer. ## Summary ## Additional Context ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
nightly-2024-10-10: fix: visibility for impl methods (#6261)
# Description ## Problem Part of #4515 Apparently in #6179 I only made it work for calls like `foo::Bar::baz()` but no checks were done for method calls (where `self` is involved). ## Summary This PR now warns when calling private or `pub(crate)` methods, either on structs or primitive types, when they are not accessible from the current module. We also now don't suggest non-accessible methods from LSP. ## Additional Context I also removed an unused global that was introduced some time ago. ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
nightly-2024-10-09: fix: homogeneous input points for EC ADD (#6241)
# Description ## Problem\* Resolves https://github.com/AztecProtocol/barretenberg/issues/1108 ## Summary\* Barretenberg does not support points that are not all constant or all witness in EC ADD opcode. ## Additional Context ## Documentation\* Check one: - [X] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [X] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
nightly-2024-10-08: feat: handwritten parser (#6180)
# Description Resolves https://github.com/noir-lang/noir/issues/853 ## Problem There are some issues with the current parser: - it leads to "stack overflow" with small programs that should probably compile (like a program with a chanin of 17 `if-else-if`) - it leads to some of us not being able to run the noric_frontend tests because of linker errors, and sometimes making changes to the parser will lead to linker errors that we have to workaround - it's (very) slow ## Summary This PR implements a hand-written parser. It parses any program with just one look-ahead token. It has very good error-recovery. I tested the parser's performance by copying the contents of `noir-contracts/contracts/avm_test_contract/src/main.nr` in Aztec-Packages 100 times to a single file. That ends up with a file of about 57K lines. The times: - chumsky parser: 1.52 **seconds** - handwritten parser: 52.97 **milliseconds** Some other benefits: - The linker errors are gone! - Compiling noirc_frontend is slightly faster - Macro code also becomes faster (`quote { ... }.as_expr()`, etc, invoke the parser). For example `test_programs/noir_test_success/comptime_expr/src/main.nr` takes around one second with chumsky and 140ms with the handwritten parser (to do `nargo compile`) - Even though the parser is handwritten, I think the parsing code is relatively simple. It's just "check if we get this token, then do this" or sometimes "check if we get this token followed by this one (or not followed by this one). Also also the `impl`s and `traits` that we needed for chumsky (and the lifetimes, and passing parsers around, and cloning them, and calling `boxed()`, etc.) are gone, which I believe make the code much simpler. That said, chumsky has great helpers to be able to parse things separated by, say, a comma, and this PR at least has that too (`parse_many`). - Compiling an empty program is faster (goes from 650ms to 140ms) - Compiing any program is much faster - Tests run faster (it would become feasible to run tests locally before pushing to CI to avoid CI cycles): - Running noirc_frontend tests: - before: 1:03 minute - after: 6 seconds - Running lsp tests: - before: 55 seconds - after: 6 seconds - Running nargo_cli tests: - before: 2:47 minutes - after: 38 seconds - CI runs faster (for example each of the four partitions take 1 minute instead of 4 minutes - Building the compiler is faster: - before: 1:29 minutes - after: 1:19 minutes (so building noirc_frontend is 10 seconds faster because that's the only thing changed in this PR) - Better parsing recovery and more fine-grained control over the errors we report I tested this parser by running `./boostrap.sh` on the Aztec-Packages contracts and they compile file (of course they didn't compile right away, I had to fix some bugs to get there). ## Additional Context ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: Tom French <[email protected]> Co-authored-by: jfecher <[email protected]>
nightly-2024-10-07
feat(perf): Follow array sets backwards in array set from get optimiz…
nightly-2024-10-06
feat(perf): Follow array sets backwards in array set from get optimiz…
nightly-2024-10-05
feat(perf): Follow array sets backwards in array set from get optimiz…
v0.35.0
0.35.0 (2024-10-03)
⚠ BREAKING CHANGES
- Syncing TypeVariableKind with Kind (#6094)
- remove sha256 opcode (AztecProtocol/aztec-packages#4571)
- add support for u1 in the avm, ToRadix's radix arg is a memory addr (AztecProtocol/aztec-packages#8570)
- Infer globals to be u32 when used in a type (#6083)
- removing implicit numeric generics (#5837)
Features
- (LSP) if in runtime code, always suggest functions that return Quoted as macro calls (#6098) (4a160cb)
- (LSP) remove unused imports (#6129) (98bc460)
- (LSP) show global value on hover (#6097) (3d9d072)
- (LSP) suggest $vars inside
quote { ... }
(#6114) (73245b3) - Add
Expr::as_constructor
(#5980) (76dea7b) - Add
Expr::as_for
andExpr::as_for_range
(#6039) (abcae75) - Add
Expr::as_lambda
(#6048) (31130dc) - Add a
comptime
string type for string handling at compile-time (#6026) (5d2984f) - Add support for u1 in the avm, ToRadix's radix arg is a memory addr (AztecProtocol/aztec-packages#8570) (e8bbce7)
- Allow silencing an unused variable defined via
let
(#6149) (a2bc059) - Allow visibility modifiers in struct definitions (#6054) (199be58)
- Check unconstrained trait impl method matches (#6057) (aedc983)
- Default to outputting witness with file named after package (#6031) (e74b4ae)
- Detect unconstructed structs (#6061) (bcb438b)
- Do not double error on import with error (#6131) (9b26650)
- Expose
derived_generators
andpedersen_commitment_with_separator
from the stdlib (#6154) (877b806) - Faster LSP by caching file managers (#6047) (c48a4f8)
- Hoist constant allocation outside of loops (#6158) (180bfc9)
- Implement
to_be_radix
in the comptime interpreter (#6043) (1550278) - Implement solver for mov_registers_to_registers (#6089) (4170c55)
- Implement type paths (#6093) (2174ffb)
- Let
Module::functions
andModule::structs
return them in definition order (#6178) (dec9874) - Let LSP suggest macro calls too (#6090) (26d275b)
- Let LSP suggest trait impl methods as you are typing them (#6029) (dfed81b)
- LSP autocompletion for
TypePath
(#6117) (3f79d8f) - metaprogramming: Add
#[use_callers_scope]
(#6050) (8c34046) - Optimize allocating immediate amounts of memory (AztecProtocol/aztec-packages#8579) (e8bbce7)
- Optimize constraints in sha256 (#6145) (164d29e)
- perf: Allow array set last uses optimization in return block of Brillig functions (#6119) (5598059)
- perf: Handle array set optimization across blocks for Brillig functions (#6153) (12cb80a)
- perf: Optimize array set from get (#6207) (dfeb1c5)
- perf: Remove inc_rc instructions for arrays which are never mutably borrowed (#6168) (a195442)
- perf: Remove redundant inc rc without instructions between (#6183) (be9dcfe)
- perf: Remove unused loads in mem2reg and last stores per function (#5925) (19eef30)
- perf: Remove useless paired RC instructions within a block during DIE (#6160) (59c4118)
- perf: Simplify the cfg after DIE (#6184) (a1b5046)
- Pretty print Quoted token stream (#6111) (cd81f85)
- Refactor SSA passes to run on individual functions (#6072) (85c502c)
- Remove aztec macros (#6087) (9d96207)
- Remove orphaned blocks from cfg to improve
simplify_cfg
pass. (#6198) (b4712c5) - Remove sha256 opcode (AztecProtocol/aztec-packages#4571) (e8bbce7)
- Remove unnecessary branching in keccak impl (#6133) (9c69dce)
- Represent assertions more similarly to function calls (#6103) (3ecd0e2)
- Show test output when running via LSP (#6049) (9fb010e)
- Simplify sha256 implementation (#6142) (acdfbbc)
- Skip
remove_enable_side_effects
pass on brillig functions (#6199) ([2303615](2303615815...