-
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 (public_name -) equivalent to no public name (#7576)
* Make (public_name -) equivalent to no public name Fixes #5852 This brings consistency with `(public_names)` in `(executables)`: a plural stanza with only `-` in `(public_names)` installs nothing. Signed-off-by: Etienne Millon <me@emillon.org>
- Loading branch information
Showing
4 changed files
with
56 additions
and
5 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,40 @@ | ||
This test is about the semantics of `(public_name -)`. | ||
|
||
$ set_ver() { | ||
> cat > dune-project << EOF | ||
> (lang dune $1) | ||
> (package | ||
> (name e) | ||
> (allow_empty)) | ||
> EOF | ||
> } | ||
$ cat > dune << EOF | ||
> (executable | ||
> (public_name -) | ||
> (name e)) | ||
> EOF | ||
$ touch e.ml | ||
|
||
In 3.7, this declares a public name of "-": | ||
|
||
$ set_ver 3.7 | ||
$ dune build @install | ||
$ cat _build/default/e.install | ||
lib: [ | ||
"_build/install/default/lib/e/META" | ||
"_build/install/default/lib/e/dune-package" | ||
] | ||
bin: [ | ||
"_build/install/default/bin/-" | ||
] | ||
|
||
In 3.8, this is equivalent to no `(public_name)` field, consistently with what | ||
happens with `(executables)`. | ||
|
||
$ set_ver 3.8 | ||
$ dune build @install | ||
$ cat _build/default/e.install | ||
lib: [ | ||
"_build/install/default/lib/e/META" | ||
"_build/install/default/lib/e/dune-package" | ||
] |