Skip to content
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

formatter breaks code #6333

Closed
olehmisar opened this issue Oct 24, 2024 · 2 comments
Closed

formatter breaks code #6333

olehmisar opened this issue Oct 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@olehmisar
Copy link

Aim

nargo fmt changes code behaviour
https://github.com/olehmisar/nodash/blob/e15265ec23be8686d89a20b60861c7f588ea5a47/src/array.nr#L44

let bytes_padded = bytes.pad_end::<(N / 31 + 1) * 31>(0);

It converts it to:

let bytes_padded = bytes.pad_end::<(N / 31 + 1) * 31>(N / 31 + 1) * 31>( 0);

Expected Behavior

Does not change code, but only formats it

Bug

^^

To Reproduce

  1. git clone https://github.com/olehmisar/nodash.git
  2. cd nodash
  3. nargo fmt

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

Nice-to-have

Blocker Context

No response

Nargo Version

nargo 0.34.0 and nargo 0.35.0

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@olehmisar olehmisar added the bug Something isn't working label Oct 24, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Oct 24, 2024
@TomAFrench
Copy link
Member

@asterite Can you take a look at this?

@asterite
Copy link
Collaborator

Sure! I just took a look, it seems to be a bug in the old formatter. In the new formatter it works fine 🙌

Fixed by #6300

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants