fix: better package name validation and error messages for nargo new/init#8978
Conversation
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: c535ba8 | Previous: 8a7046b | Ratio |
|---|---|---|---|
private-kernel-inner |
2.774 s |
2.304 s |
1.20 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 19190ff | Previous: 2cfc786 | Ratio |
|---|---|---|---|
rollup-merge |
0.004 s |
0.003 s |
1.33 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
aakoshh
left a comment
There was a problem hiding this comment.
Looks good!
FWIW I agree with not allowing - in the name. It takes out some of the guesswork when adding dependencies.
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: increment reference counts when deduplicating calls which return arrays (noir-lang/noir#8757) fix: Add a aliased check for last stores (noir-lang/noir#8955) fix(LICM): Consider negative loop bounds before hoisting `div <const> <induction-var>` (noir-lang/noir#8986) fix: check "negate with overflow" in comptime code + allow u1 to be used in comptime code (noir-lang/noir#8969) fix: better package name validation and error messages for nargo new/init (noir-lang/noir#8978) feat(fuzz): Add comptime_vs_brillig_direct target (noir-lang/noir#8924) fix(expand): show references to ModuleDefId recursing on parents (noir-lang/noir#8977) feat(ssa_fuzzer): loops + signed (noir-lang/noir#8881) fix(fuzz): Do not take a mutable reference over immutable vars which contain a mutable ref (noir-lang/noir#8971) fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile (noir-lang/noir#8972) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: Tom French <[email protected]>
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: increment reference counts when deduplicating calls which return arrays (noir-lang/noir#8757) fix: Add a aliased check for last stores (noir-lang/noir#8955) fix(LICM): Consider negative loop bounds before hoisting `div <const> <induction-var>` (noir-lang/noir#8986) fix: check "negate with overflow" in comptime code + allow u1 to be used in comptime code (noir-lang/noir#8969) fix: better package name validation and error messages for nargo new/init (noir-lang/noir#8978) feat(fuzz): Add comptime_vs_brillig_direct target (noir-lang/noir#8924) fix(expand): show references to ModuleDefId recursing on parents (noir-lang/noir#8977) feat(ssa_fuzzer): loops + signed (noir-lang/noir#8881) fix(fuzz): Do not take a mutable reference over immutable vars which contain a mutable ref (noir-lang/noir#8971) fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile (noir-lang/noir#8972) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: Tom French <[email protected]>
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: increment reference counts when deduplicating calls which return arrays (noir-lang/noir#8757) fix: Add a aliased check for last stores (noir-lang/noir#8955) fix(LICM): Consider negative loop bounds before hoisting `div <const> <induction-var>` (noir-lang/noir#8986) fix: check "negate with overflow" in comptime code + allow u1 to be used in comptime code (noir-lang/noir#8969) fix: better package name validation and error messages for nargo new/init (noir-lang/noir#8978) feat(fuzz): Add comptime_vs_brillig_direct target (noir-lang/noir#8924) fix(expand): show references to ModuleDefId recursing on parents (noir-lang/noir#8977) feat(ssa_fuzzer): loops + signed (noir-lang/noir#8881) fix(fuzz): Do not take a mutable reference over immutable vars which contain a mutable ref (noir-lang/noir#8971) fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile (noir-lang/noir#8972) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: Tom French <[email protected]>
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: increment reference counts when deduplicating calls which return arrays (noir-lang/noir#8757) fix: Add a aliased check for last stores (noir-lang/noir#8955) fix(LICM): Consider negative loop bounds before hoisting `div <const> <induction-var>` (noir-lang/noir#8986) fix: check "negate with overflow" in comptime code + allow u1 to be used in comptime code (noir-lang/noir#8969) fix: better package name validation and error messages for nargo new/init (noir-lang/noir#8978) feat(fuzz): Add comptime_vs_brillig_direct target (noir-lang/noir#8924) fix(expand): show references to ModuleDefId recursing on parents (noir-lang/noir#8977) feat(ssa_fuzzer): loops + signed (noir-lang/noir#8881) fix(fuzz): Do not take a mutable reference over immutable vars which contain a mutable ref (noir-lang/noir#8971) fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile (noir-lang/noir#8972) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: Tom French <[email protected]>
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: increment reference counts when deduplicating calls which return arrays (noir-lang/noir#8757) fix: Add a aliased check for last stores (noir-lang/noir#8955) fix(LICM): Consider negative loop bounds before hoisting `div <const> <induction-var>` (noir-lang/noir#8986) fix: check "negate with overflow" in comptime code + allow u1 to be used in comptime code (noir-lang/noir#8969) fix: better package name validation and error messages for nargo new/init (noir-lang/noir#8978) feat(fuzz): Add comptime_vs_brillig_direct target (noir-lang/noir#8924) fix(expand): show references to ModuleDefId recursing on parents (noir-lang/noir#8977) feat(ssa_fuzzer): loops + signed (noir-lang/noir#8881) fix(fuzz): Do not take a mutable reference over immutable vars which contain a mutable ref (noir-lang/noir#8971) fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile (noir-lang/noir#8972) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: Tom French <[email protected]>
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: increment reference counts when deduplicating calls which return arrays (noir-lang/noir#8757) fix: Add a aliased check for last stores (noir-lang/noir#8955) fix(LICM): Consider negative loop bounds before hoisting `div <const> <induction-var>` (noir-lang/noir#8986) fix: check "negate with overflow" in comptime code + allow u1 to be used in comptime code (noir-lang/noir#8969) fix: better package name validation and error messages for nargo new/init (noir-lang/noir#8978) feat(fuzz): Add comptime_vs_brillig_direct target (noir-lang/noir#8924) fix(expand): show references to ModuleDefId recursing on parents (noir-lang/noir#8977) feat(ssa_fuzzer): loops + signed (noir-lang/noir#8881) fix(fuzz): Do not take a mutable reference over immutable vars which contain a mutable ref (noir-lang/noir#8971) fix(fuzz): Avoid negating `i8::MIN` into `i8::MAX+1` which won't compile (noir-lang/noir#8972) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: Tom French <[email protected]>
Description
Problem
Resolves #8919
Resolves #4189
Summary
Also, since it was in the same codebase, now running
nargo initon a directory that has aNargo.tomlfile will not overwrite that file and give a proper error (likecargo initdoes).The error messages are now similar to those used by
cargo new/init, though I changed some minor things (they always surround chars and name with backticks, but I think it's more common to use single and double quotes respectively).Some examples:
Additional Context
Documentation
Check one:
PR Checklist
cargo fmton default settings.