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(parser)!: deprecate constrain keyword for assert #1286

Merged
merged 7 commits into from
May 4, 2023

Conversation

joss-aztec
Copy link
Contributor

@joss-aztec joss-aztec commented May 3, 2023

Related issue(s)

Resolves #1228

Description

Summary of changes

  • Add deprecation warning message for constrain keyword
  • Change parser error reason field to an enum for more convenient diagnostic conversion

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

I'll PR the performance focused refactor separately.

@joss-aztec
Copy link
Contributor Author

Blocked by: #1288

@kevaundray kevaundray changed the title chore(parser)!: deprecate constrain chore(parser)!: deprecate constrain keyword for assert May 4, 2023
@kevaundray
Copy link
Contributor

@joss-aztec error is because some test cases use constrain in the parser

@joss-aztec joss-aztec enabled auto-merge May 4, 2023 14:50
@joss-aztec
Copy link
Contributor Author

Fixing other failing tests...

Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I think this PR is another good reason why warnings should be enabled by default. Since the warnings generated here still result in a hard error for users if they don't have warnings enabled.

crates/noirc_frontend/src/parser/errors.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@joss-aztec joss-aztec added this pull request to the merge queue May 4, 2023
Merged via the queue into master with commit 9740f54 May 4, 2023
@joss-aztec joss-aztec deleted the joss/deprecate-constrain branch May 4, 2023 18:47
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
3 participants