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

feat(cli)!: Add --unstable-features to gate unstable features #7449

Merged
merged 17 commits into from
Feb 21, 2025

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Feb 19, 2025

Description

Problem*

Resolves #7423

Summary*

Adds the CLI flag --unstable-features (or -Z) to nargo for all compile sub-commands which accepts a list of unstable features to enable. Without this, usage of these features is now a hard error (previously a warning), making this a breaking change. The list of features to accept can be separated by commas: -Zenums,array-ownership or by specifying the same flag multiple times: -Zenums -Zarray-ownership.

Currently the only unstable features are:

  • Enums
  • Array ownership (reserved for future experimentation with & and move semantics for arrays)

Additional Context

I'm using the name "unstable features" to match rust a bit more closely although previously we used "experimental features." I'm open to naming debates since this is a public facing flag we shouldn't change once it is stabilized.

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@jfecher jfecher requested a review from a team February 19, 2025 18:38
@jfecher jfecher changed the title feat(cli)!: Add --unstable-features item1,item2,item3,.. or -Zfeature to gate unstable features feat(cli)!: Add --unstable-features to gate unstable features Feb 19, 2025
@jfecher
Copy link
Contributor Author

jfecher commented Feb 19, 2025

Hmm looks like CI is broken for some reason because I added a new workspace package. I'll resolve it after lunch but the PR should still be ready for review.

Edit: Completely missed the new crate in git since it was in utils instead of compiler 🤦‍♂️.

Copy link
Contributor

@michaeljklein michaeljklein left a comment

Choose a reason for hiding this comment

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

LGTM

@jfecher jfecher enabled auto-merge February 20, 2025 20:23
@jfecher jfecher added this pull request to the merge queue Feb 21, 2025
Merged via the queue into master with commit fd213f6 Feb 21, 2025
102 checks passed
@jfecher jfecher deleted the jf/unstable-features branch February 21, 2025 15:45
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 the ability to have unstable features
4 participants