Skip to content

Commit

Permalink
test: modules_without_implementation and modules (#7022)
Browse files Browse the repository at this point in the history
demonstrate the behavior when a module is excluded by (modules ..) but
is written inside (modules_without_implementation ..)

Signed-off-by: Rudi Grinberg <[email protected]>

<!-- ps-id: 8075951a-3306-48db-ba8e-423bac14a4c9 -->
  • Loading branch information
rgrinberg authored Feb 8, 2023
1 parent 0c1bbed commit 808a0e0
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Specifying a module without implementation that isn't inside the (modules ..)
field

$ cat >dune-project <<EOF
> (lang dune 3.7)
> EOF
$ cat >dune <<EOF
> (library
> (name foo)
> (wrapped false)
> (modules_without_implementation x)
> (modules y))
> EOF

$ touch x.mli

$ cat >y.ml <<EOF
> module type F = X
> EOF

$ dune build --display short
ocamlc .foo.objs/byte/y.{cmi,cmo,cmt} (exit 2)
File "y.ml", line 1, characters 16-17:
1 | module type F = X
^
Error: Unbound module type X
[1]

0 comments on commit 808a0e0

Please sign in to comment.