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

Treat warnings as warnings by default (rather than errors) #1382

Closed
jfecher opened this issue May 22, 2023 · 0 comments · Fixed by #1383
Closed

Treat warnings as warnings by default (rather than errors) #1382

jfecher opened this issue May 22, 2023 · 0 comments · Fixed by #1383
Labels
enhancement New feature or request

Comments

@jfecher
Copy link
Contributor

jfecher commented May 22, 2023

Problem

Currently nargo treats warnings as errors by default. This is not only opposite to how other compilers (notably rustc and clang/gcc) handle warnings, but also leads to a few issues:

  • Deprecation warnings are errors by default, which causes more friction than intended when deprecating features.
  • Unused variables prevent compilation by default.
  • There is no indication that the above two errors were originally warnings that were treated as errors. Thus, unless users are very familiar with the compiler they are usually lead to stop and fix the issues rather than passing the --allow-warnings flag.

Happy Case

Noir & Nargo should instead switch to enabling warnings by default and only treating them as errors when a new --deny-warnings flag is passed. The old --allow-warnings flag should be removed.

The name --deny-warnings was chosen to match the name of the same flag in rustc.

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

Yes

Support Needs

No response

@jfecher jfecher added the enhancement New feature or request label May 22, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 22, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant