-
Notifications
You must be signed in to change notification settings - Fork 199
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!: Require package names in Nargo.toml
files
#2056
Conversation
4971987
to
5b51944
Compare
5b51944
to
551de53
Compare
This is going to break all of the existing
This doesn't really give much information on how to fix the issue. Can we display a message showing that the user should add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@kobyhallx Are you sure we want to merge like this? We're going to get a ton of issues in the Discord as a result. |
@TomAFrench this is marked breaking change and would affect the next release. What's the alternative to introduce this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will demonstrate in a few mins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kobyhallx We now display in the panic message what the user needs to do in order to make their toml file valid again.
Gonna let @phated pull the trigger on this one as he's gonna be up soon. |
Good catch @TomAFrench 🙏 We can merge this with your message and I'll open an issue to remove it in 0.12.0 |
Any doc needs for the PR? |
@Savio-Sou I scanned the noir-lang.org website and couldn't find any mention of the contents of nargo.toml, so I didn't mark it as needing documentation. |
Good point, we should probably document Nargo.toml in that case. Thanks! |
* master: (53 commits) chore: Update `noir-source-resolver` to v1.1.3 (#1912) chore: Document `GeneratedAcir::more_than_eq_comparison` (#2085) chore: refresh ACIR test artifacts (#2091) feat: Add `deprecated` attribute (#2041) chore(ssa refactor): Implement `acir_gen` errors (#2071) chore: use witnesses from the generated acir in the ABI (#2095) fix: Fix methods not mutating fields (#2087) chore(nargo): Use Display impl for InputValue (#1990) feat: Make arrays and slices polymorphic over each other (#2070) feat: Remove an unnecessary witness in `mul_with_witness` (#2078) chore: document truncate (#2082) fix: avoid potential panic in `two_complement` (#2081) chore: Cleanup integration tests (#2074) chore: replace `Type::TypeVariable`, `Type::PolymorphicInteger`, and … (#2065) chore!: Require package names in `Nargo.toml` files (#2056) fix: Avoid non-determinism in defunctionalization (#2069) chore: change 'unnecessary pub' error to a warning (#2064) feat!: Update to ACVM 0.21.0 (#2051) chore: Rename execute tests for an accurate description (#2063) chore: Restore lost integration test (#2062) ...
* master: (75 commits) fix: Mutating a variable no longer mutates its copy (#2057) fix: Implement `.len()` in Acir-Gen (#2077) chore: clippy fixes (#2101) chore: Update `noir-source-resolver` to v1.1.3 (#1912) chore: Document `GeneratedAcir::more_than_eq_comparison` (#2085) chore: refresh ACIR test artifacts (#2091) feat: Add `deprecated` attribute (#2041) chore(ssa refactor): Implement `acir_gen` errors (#2071) chore: use witnesses from the generated acir in the ABI (#2095) fix: Fix methods not mutating fields (#2087) chore(nargo): Use Display impl for InputValue (#1990) feat: Make arrays and slices polymorphic over each other (#2070) feat: Remove an unnecessary witness in `mul_with_witness` (#2078) chore: document truncate (#2082) fix: avoid potential panic in `two_complement` (#2081) chore: Cleanup integration tests (#2074) chore: replace `Type::TypeVariable`, `Type::PolymorphicInteger`, and … (#2065) chore!: Require package names in `Nargo.toml` files (#2056) fix: Avoid non-determinism in defunctionalization (#2069) chore: change 'unnecessary pub' error to a warning (#2064) ...
* master: (75 commits) fix: Mutating a variable no longer mutates its copy (#2057) fix: Implement `.len()` in Acir-Gen (#2077) chore: clippy fixes (#2101) chore: Update `noir-source-resolver` to v1.1.3 (#1912) chore: Document `GeneratedAcir::more_than_eq_comparison` (#2085) chore: refresh ACIR test artifacts (#2091) feat: Add `deprecated` attribute (#2041) chore(ssa refactor): Implement `acir_gen` errors (#2071) chore: use witnesses from the generated acir in the ABI (#2095) fix: Fix methods not mutating fields (#2087) chore(nargo): Use Display impl for InputValue (#1990) feat: Make arrays and slices polymorphic over each other (#2070) feat: Remove an unnecessary witness in `mul_with_witness` (#2078) chore: document truncate (#2082) fix: avoid potential panic in `two_complement` (#2081) chore: Cleanup integration tests (#2074) chore: replace `Type::TypeVariable`, `Type::PolymorphicInteger`, and … (#2065) chore!: Require package names in `Nargo.toml` files (#2056) fix: Avoid non-determinism in defunctionalization (#2069) chore: change 'unnecessary pub' error to a warning (#2064) ...
Description
Problem*
Resolves #2053
Summary*
This makes the
name
field in Nargo.toml required. By making this required, we can add a--package
flag to any command to select a package in a workspace. While updating the tests, I found that somename
fields in Nargo.toml were invalid package names, so I moved the name to adescription
field (which we now parse) and added a proper name.This is breaking because previous projects will have been generated without a name, but new projects generated by nargo will set the directory name as the package name.
This work fell out of #1992 but should be merged as a prerequisite.
Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.BEGIN_COMMIT_OVERRIDE
chore(nargo)!: Require package names in Nargo.toml files (#2056)
END_COMMIT_OVERRIDE