-
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.
Make name and names fields optional when public_name or public_names …
…are present (#1041) Make name field optional when public_name is specified When name is omitted, it will be defaulted to public_name This feature is 1.1 only.
- Loading branch information
Showing
25 changed files
with
150 additions
and
36 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
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
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/no-name-field/no-name-exes-syntax-1-0/dune
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 @@ | ||
(executables (public_names foo bar)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/no-name-field/no-name-exes-syntax-1-0/dune-project
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 @@ | ||
(lang dune 1.0) |
Empty file.
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/no-name-field/no-name-exes/dune-project
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 @@ | ||
(lang dune 1.1) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/no-name-field/no-name-exes/exe/dune
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 @@ | ||
(executable (public_name foo)) |
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/no-name-field/no-name-exes/exes/dune
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 @@ | ||
(executables (public_names bar baz)) |
Empty file.
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/no-name-field/no-name-lib-syntax-1-0/dune
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 @@ | ||
(library (public_name foo)) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/no-name-field/no-name-lib-syntax-1-0/dune-project
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,2 @@ | ||
(lang dune 1.0) | ||
|
Empty file.
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 @@ | ||
(library (public_name foo)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/no-name-field/no-name-lib/dune-project
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 @@ | ||
(lang dune 1.1) |
Empty file.
Empty file.
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,19 @@ | ||
the name field can be omitted for libraries when public_name is present | ||
$ dune build --root no-name-lib | ||
Entering directory 'no-name-lib' | ||
|
||
this isn't possible for older syntax <= (1, 0) | ||
$ dune build --root no-name-lib-syntax-1-0 | ||
File "dune", line 1, characters 0-27: | ||
Error: name field cannot be omitted before version 1.1 of the dune language | ||
[1] | ||
|
||
executable(s) stanza works the same way | ||
|
||
$ dune build --root no-name-exes | ||
Entering directory 'no-name-exes' | ||
|
||
$ dune build --root no-name-exes-syntax-1-0 | ||
File "dune", line 1, characters 0-36: | ||
Error: name field may not be omitted before dune version 1.1 | ||
[1] |