Skip to content

Commit 9203caf

Browse files
committed
test: reproduce #3636
Signed-off-by: Rudi Grinberg <me@rgrinberg.com> ps-id: 8C67C2BC-9A74-4CBC-A529-FF41DAD8A4F1
1 parent 04167da commit 9203caf

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
(lang dune 1.7)
1+
(lang dune 1.7)
2+
3+
(package (name dune-vlib))
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
(library
22
(name impl)
3-
(implements vlib))
3+
(public_name dune-vlib.impl)
4+
(implements vlib))

test/blackbox-tests/test-cases/virtual-libraries/implements-external.t/run.t

+23-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ First we create an external library
55
Entering directory 'vlib'
66

77
Then we make sure that we can implement it
8-
$ env OCAMLPATH=vlib/_build/install/default/lib dune build --root impl --debug-dependency-path
8+
$ env OCAMLPATH=vlib/_build/install/default/lib dune build @default @install --root impl
99
Entering directory 'impl'
1010
bar from vlib
1111
Foo.run implemented
@@ -25,3 +25,25 @@ Implement external virtual libraries with private modules
2525
$ env OCAMLPATH=vlib/_build/install/default/lib dune build --root impl-private-module --debug-dependency-path
2626
Entering directory 'impl-private-module'
2727
Name: implement virtual module. Magic number: 42
28+
29+
Now we install an implementation, and make sure that it remains usable
30+
$ export OCAMLPATH=$PWD/vlib/_build/install/default/lib:$PWD/impl/_build/install/default/lib
31+
$ mkdir use-external-impl && cd use-external-impl
32+
$ cat >dune-project <<EOF
33+
> (lang dune 3.0)
34+
> EOF
35+
$ cat >dune <<EOF
36+
> (executable
37+
> (name blah)
38+
> (libraries dune-vlib.impl))
39+
> EOF
40+
$ cat >blah.ml <<EOF
41+
> Vlib.Foo.run ()
42+
> EOF
43+
$ dune exec ./blah.exe
44+
File "blah.ml", line 1, characters 0-12:
45+
1 | Vlib.Foo.run ()
46+
^^^^^^^^^^^^
47+
Error: Unbound module Vlib
48+
[1]
49+
$ cd ..

0 commit comments

Comments
 (0)