Skip to content

Commit

Permalink
Reproduce ocaml#3636
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Sep 4, 2020
1 parent 0cee329 commit d236537
Showing 1 changed file with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Reproduce bug in #3636.

The bug occurs when (include_subdirs unqualified) is used.

$ cat >dune-project <<EOF
> (lang dune 2.7)
> (package
> (name testpkg))
> EOF

$ mkdir vlib impl

$ cat >vlib/dune <<EOF
> (include_subdirs unqualified)
> (library
> (name vlib)
> (public_name testpkg.vlib)
> (virtual_modules greet))
> EOF
$ cat >vlib/greet.mli <<EOF
> val s : string
> EOF
$ cat >impl/dune <<EOF
> (library
> (name impl)
> (public_name testpkg.impl)
> (implements vlib))
> EOF
$ cat >impl/greet.ml <<EOF
> let s = "hello world"
> EOF
$ dune build @install
$ mkdir exe
$ cat >exe/dune-project <<EOF
> (lang dune 2.7)
> EOF
$ cat >exe/dune <<EOF
> (executable
> (name foo)
> (libraries testpkg.vlib testpkg.impl))
> EOF
$ cat >exe/foo.ml <<EOF
> print_endline Vlib.Greet.s
> EOF
$ OCAMLPATH=$PWD/_build/install/default/lib dune exec --root exe -- ./foo.exe
Entering directory 'exe'
Entering directory 'exe'
File "foo.ml", line 1, characters 14-26:
1 | print_endline Vlib.Greet.s
^^^^^^^^^^^^
Error: Unbound module Vlib
[1]

0 comments on commit d236537

Please sign in to comment.