This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
exes: empty list of names/public names
|
||||
$ cat >dune-project <<EOF
|
||||
> (lang dune 2.0)
|
||||
> EOF
|
||||
$ cat >dune <<EOF
|
||||
> (executables (names))
|
||||
> EOF
|
||||
$ dune build
|
||||
File "dune", line 1, characters 13-20:
|
||||
1 | (executables (names))
|
||||
^^^^^^^
|
||||
Error: Not enough arguments for "names"
|
||||
[1]
|
||||
$ cat >dune <<EOF
|
||||
> (executables (public_names))
|
||||
> EOF
|
||||
$ dune build
|
||||
File "dune", line 1, characters 13-27:
|
||||
1 | (executables (public_names))
|
||||
^^^^^^^^^^^^^^
|
||||
Error: Not enough arguments for "public_names"
|
||||
[1]
|
||||
$ cat >dune <<EOF
|
||||
> (tests (names))
|
||||
> EOF
|
||||
$ dune build
|
||||
File "dune", line 1, characters 7-14:
|
||||
1 | (tests (names))
|
||||
^^^^^^^
|
||||
Error: Not enough arguments for "names"
|
||||
[1]
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(executable
|
||||
(name a.b))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 2.6)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
exe: invalid name
|
||||
$ dune build
|
||||
File "dune", line 2, characters 7-10:
|
||||
2 | (name a.b))
|
||||
^^^
|
||||
Error: Module "A.b" doesn't exist.
|
||||
[1]
|
||||
|
|
@ -0,0 +1 @@
|
|||
Foo.run ();;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
(library
|
||||
(modules foo)
|
||||
(name foo.bar)
|
||||
(wrapped false))
|
||||
|
||||
(executable
|
||||
(modules bar)
|
||||
(name bar)
|
||||
(libraries foo.bar))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.1)
|
||||
|
|
@ -0,0 +1 @@
|
|||
let run () = print_endline "foo"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
lib: invalid name
|
||||
$ dune exec ./bar.exe
|
||||
File "dune", line 3, characters 7-14:
|
||||
3 | (name foo.bar)
|
||||
^^^^^^^
|
||||
Error: "foo.bar" is an invalid library name.
|
||||
Library names must be non-empty and composed only of the following
|
||||
characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'.
|
||||
Hint: foo_bar would be a correct library name
|
||||
[1]
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
(executables (public_names foo bar))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
$ dune build
|
||||
File "dune", line 1, characters 0-36:
|
||||
1 | (executables (public_names foo bar))
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Error: names field may not be omitted before dune version 1.1
|
||||
[1]
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.1)
|
||||
|
|
@ -0,0 +1 @@
|
|||
(executable (public_name foo))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(executables (public_names bar baz))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
executable(s) stanza works the same way
|
||||
|
||||
$ dune build
|
||||
|
|
@ -0,0 +1 @@
|
|||
(library (public_name foo))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 1.0)
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
this isn't possible for older syntax <= (1, 0)
|
||||
$ dune build
|
||||
File "dune", line 1, characters 22-25:
|
||||
1 | (library (public_name foo))
|
||||
^^^
|
||||
Error: name field cannot be omitted before version 1.1 of the dune language
|
||||
[1]
|
||||
|
|
@ -0,0 +1 @@
|
|||
(library (public_name foo))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.1)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
the name field can be omitted for libraries when public_name is present
|
||||
$ dune build
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(executable
|
||||
(public_name a.b))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 2.6)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
exe: invalid public-name
|
||||
$ dune build
|
||||
File "dune", line 2, characters 14-17:
|
||||
2 | (public_name a.b))
|
||||
^^^
|
||||
Error: Module "A.b" doesn't exist.
|
||||
[1]
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
(library (public_name c.find))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.1)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
there's only a public name but it's invalid as a name
|
||||
|
||||
$ dune build
|
||||
File "dune", line 1, characters 22-28:
|
||||
1 | (library (public_name c.find))
|
||||
^^^^^^
|
||||
Error: Invalid library name.
|
||||
Public library names don't have this restriction. You can either change this
|
||||
public name to be a valid library name or add a "name" field with a valid
|
||||
library name.
|
||||
Hint: Library names must be non-empty and composed only of the following
|
||||
characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'.
|
||||
Hint: c_find would be a correct library name
|
||||
[1]
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(wrapped false)
|
||||
(public_name foo.bar))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.2)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
there's only a public name which is invalid, and the library is unwrapped
|
||||
this is an error since 2.0.0, it was only a warning before
|
||||
|
||||
$ dune build
|
||||
File "dune", line 3, characters 14-21:
|
||||
3 | (public_name foo.bar))
|
||||
^^^^^^^
|
||||
Error: Invalid library name.
|
||||
Public library names don't have this restriction. You can either change this
|
||||
public name to be a valid library name or add a "name" field with a valid
|
||||
library name.
|
||||
Hint: Library names must be non-empty and composed only of the following
|
||||
characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'.
|
||||
Hint: foo_bar would be a correct library name
|
||||
[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue