Skip to content

Releases: noir-lang/noir

v0.34.0

13 Sep 14:42
359caaf
Compare
Choose a tag to compare
v0.34.0 Pre-release
Pre-release

0.34.0 (2024-09-13)

⚠ BREAKING CHANGES

Features

Read more

nightly-2024-09-16: feat: add `Expr::as_for` and `Expr::as_for_range` (#6039)

16 Sep 02:30
abcae75
Compare
Choose a tag to compare
# Description

## Problem

Part of #5668

## Summary


## Additional Context



## Documentation

Check one:
- [ ] No documentation needed.
- [x] 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-09-15: feat: add `Expr::as_for` and `Expr::as_for_range` (#6039)

15 Sep 02:30
abcae75
Compare
Choose a tag to compare
# Description

## Problem

Part of #5668

## Summary


## Additional Context



## Documentation

Check one:
- [ ] No documentation needed.
- [x] 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-09-14: feat: add `Expr::as_for` and `Expr::as_for_range` (#6039)

14 Sep 02:23
abcae75
Compare
Choose a tag to compare
# Description

## Problem

Part of #5668

## Summary


## Additional Context



## Documentation

Check one:
- [ ] No documentation needed.
- [x] 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-09-13: feat: implement LSP code action "Implement missing members" (#6020)

13 Sep 02:25
9bf2dcb
Compare
Choose a tag to compare
# Description

## Problem

Part of #1579

## Summary

Adds a code action to add missing trait impl methods and types. Default
methods are not includeded.

Here it's working for `Add`:

![lsp-implement-missing-members-add](https://github.com/user-attachments/assets/0b3b4afc-c1bf-4c1e-9c9e-44186c7bb01b)

Here for `BigField`:

![lsp-implement-missing-members-big-field](https://github.com/user-attachments/assets/22ec63b2-9fff-4824-b9c5-2aad85cc2fce)

Here for a complex type in Aztec-Packages:

![lsp-implement-missing-members-aztec](https://github.com/user-attachments/assets/de822bcc-1397-456a-8175-58613ffa1f0e)

## Additional Context

I found this code action in Rust very useful! It saves a lot of time,
plus there's no need to copy-paste :-)

## 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-09-12: chore: single install script for cargo-binstall (#5998)

12 Sep 02:25
21425de
Compare
Choose a tag to compare
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This PR just avoids us having multiple ways to install `cargo-binstall`
so everything goes through `cargo-binstall-install.sh`

## 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-09-11: feat: LSP completion function detail (#5993)

11 Sep 02:24
e84f7d2
Compare
Choose a tag to compare
# Description

## Problem

Just a tiny thing: when functions are suggested, Rust Analyzer shows the
full function signature above the documentation (this is a completion
item's `detail` property). It's useful because in the list the signature
is usually trimmed.

## Summary

Before:


![image](https://github.com/user-attachments/assets/173acca4-74fe-40ff-9c8c-6552296c05e4)

After:


![image](https://github.com/user-attachments/assets/520fc7df-bf01-4ef2-887a-b4e651f4035c)

## Additional Context

Also includes a bunch of small refactors to make it easier to test that
something is a function completion item regardless of whether it ends up
being a snippet completion or not, whether it triggers a command, etc.

## 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-09-10: fix: suggest trait attributes in LSP (#5972)

10 Sep 02:25
d6f60d7
Compare
Choose a tag to compare
# Description

## Problem

I noticed LSP didn't suggest trait attributes... because these weren't
visited. I also noticed when an attribute related to a function was
suggested, but the function only had one argument, the parentheses were
included in the suggestion but they aren't needed.

## Summary

Fixes the above problems.


![lsp-trait-attribute](https://github.com/user-attachments/assets/16cdd8ab-1d03-40d1-a1b1-19b26d88e322)

## 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-09-09: fix(mem2reg): Handle aliases in function last store cleanup and addit…

09 Sep 02:26
36756e8
Compare
Choose a tag to compare
…ional alias unit test (#5967)

# Description

## Problem\*

Partially
https://github.com/noir-lang/noir/pull/5925#issuecomment-2332383904 and
benefits other post mem2reg function cleanup work
https://github.com/noir-lang/noir/pull/5925. Want to add some more
aliasing cases.

Works towards making the alias testing surrounding mem2reg more robust.

## Summary\*

I have added a mem2reg unit test where the code is storing to an alias
inside of a loop. This triggered a failure that has been fixed in this
PR. I also confirmed that this unit test would have caught the error
triggered by #5935 in
https://github.com/AztecProtocol/aztec-packages/pull/8378.

We have a simple post-mem2reg process that operates over the final
mem2reg state to determine if there are any stores that were missed that
can be removed. The check currently does not look at whether the store
we are removing is an alias.

For now I simply block removing this store if it is an alias.

## Additional Context

In follow-ups we can work on handling of aliases in this per function
state to remove aliases we know we can simplify.

## 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-09-08: fix(mem2reg): Handle aliases in function last store cleanup and addit…

08 Sep 02:27
36756e8
Compare
Choose a tag to compare
…ional alias unit test (#5967)

# Description

## Problem\*

Partially
https://github.com/noir-lang/noir/pull/5925#issuecomment-2332383904 and
benefits other post mem2reg function cleanup work
https://github.com/noir-lang/noir/pull/5925. Want to add some more
aliasing cases.

Works towards making the alias testing surrounding mem2reg more robust.

## Summary\*

I have added a mem2reg unit test where the code is storing to an alias
inside of a loop. This triggered a failure that has been fixed in this
PR. I also confirmed that this unit test would have caught the error
triggered by #5935 in
https://github.com/AztecProtocol/aztec-packages/pull/8378.

We have a simple post-mem2reg process that operates over the final
mem2reg state to determine if there are any stores that were missed that
can be removed. The check currently does not look at whether the store
we are removing is an alias.

For now I simply block removing this store if it is an alias.

## Additional Context

In follow-ups we can work on handling of aliases in this per function
state to remove aliases we know we can simplify.

## 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.