-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow dash in dune init project name
Signed-off-by: ArthurW <[email protected]>
- Loading branch information
Showing
5 changed files
with
133 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Allow dash in dune init project name (#11402, @art-w, reported by @saroupille) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Dash are allowed in project names and should be accepted: | ||
|
||
$ dune init project dash-exe | ||
Entering directory 'dash-exe' | ||
Success: initialized project component named dash-exe | ||
Leaving directory 'dash-exe' | ||
$ cd dash-exe && dune build | ||
|
||
$ dune init project dash-lib --kind=library | ||
Entering directory 'dash-lib' | ||
Success: initialized project component named dash-lib | ||
Leaving directory 'dash-lib' | ||
$ cd dash-lib && dune build | ||
|
||
Invalid project names should still be rejected: | ||
|
||
$ dune init project invalid.name | ||
dune: NAME argument: invalid project name `invalid.name' | ||
Project names must start with a letter and be composed only of | ||
letters, | ||
numbers, '-' or '_' | ||
Usage: dune init project [OPTION]… NAME [PATH] | ||
Try 'dune init project --help' or 'dune --help' for more information. | ||
[1] | ||
$ ls invalid.name | ||
ls: cannot access 'invalid.name': No such file or directory | ||
[2] |