Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: reproduce 10460 #10580

Merged
merged 1 commit into from
May 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions test/blackbox-tests/test-cases/virtual-libraries/github10460.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Virtual library implementations are not correctly recorded when pulled through
other implementations.

Reproduces the issue reported in #10460

$ cat >dune-project <<EOF
> (lang dune 3.15)
> EOF

$ cat >dune <<EOF
> (executable
> (name main)
> (libraries impl2 impl1))
> EOF
$ touch main.ml

$ mkdir vlib1 vlib2 impl1 impl2 lib

$ cat >vlib1/dune <<EOF
> (library
> (name vlib1)
> (virtual_modules vlib1))
> EOF
$ touch vlib1/vlib1.mli

$ cat >impl1/dune <<EOF
> (library
> (name impl1)
> (implements vlib1))
> EOF
$ touch impl1/vlib1.ml

$ cat >vlib2/dune <<EOF
> (library
> (name vlib2)
> (virtual_modules vlib2))
> EOF
$ touch vlib2/vlib2.mli

$ cat >impl2/dune <<EOF
> (library
> (name impl2)
> (implements vlib2)
> (libraries lib))
> EOF
$ touch impl2/vlib2.ml

$ cat >lib/dune <<EOF
> (library
> (name lib)
> (libraries vlib1))
> EOF

$ dune build main.exe
Error: No implementation found for virtual library "vlib1" in
_build/default/vlib1.
-> required by library "lib" in _build/default/lib
-> required by library "impl2" in _build/default/impl2
-> required by executable main in dune:2
-> required by _build/default/.main.eobjs/byte/dune__exe__Main.cmi
-> required by _build/default/.main.eobjs/native/dune__exe__Main.cmx
-> required by _build/default/main.exe
[1]
Loading