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

chore!(noir): deprecation warning for constrain #1275

Closed
wants to merge 2 commits into from

Conversation

joss-aztec
Copy link
Contributor

Related issue(s)

Resolves #1228

Description

Summary of changes

Emit a depreciation warning when encountering the constrain keyword, plus a tip on how to resolve. It was convenient to emit this warning during HIR resolution, hence the distinction between assert/constrain was propagated beyond the parser.

Stdlib usages of constrain are now also replaced with assert. The nargo new template now also uses assert instead of constrain.

Dependency additions / changes

Test additions / changes

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Documentation needs

  • This PR requires documentation updates when merged.

Additional context

joss-aztec added 2 commits May 2, 2023 13:58
- Propagate distinction between assert/constrain into hir resolution
- Also replace stdlib usages of constrain with assert
- `cargo new` uses assert in template
@joss-aztec
Copy link
Contributor Author

Blocked by: #1251

@kevaundray
Copy link
Contributor

The PR is failing due to the integration examples using constrain. I have re-assigned #1251 to you, lets open up a separate PR which changes the examples and stdlib to using assert resolving 1251

@kevaundray kevaundray changed the title chore!(noir): depreciation warning for constrain chore!(noir): deprecation warning for constrain May 2, 2023
@joss-aztec
Copy link
Contributor Author

Closed in favour of #1286

@joss-aztec joss-aztec closed this May 3, 2023
@TomAFrench TomAFrench deleted the joss/depreciate-constrain branch November 20, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add deprecation warning for constrain
2 participants