This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,11 @@
(melange.emit
(target output)
(emit_stdlib false)
(libraries bar impl2)
(modules foo))
(library
(name bar)
(libraries impl1)
(modes melange)
(modules))

View file

@ -0,0 +1,3 @@
(lang dune 3.8)
(using melange 0.1)

View file

@ -0,0 +1 @@
let () = print_endline "should not run"

View file

@ -0,0 +1,4 @@
(library
(name impl1)
(modes melange)
(implements vlib))

View file

@ -0,0 +1 @@
let run () = print_endline "impl1"

View file

@ -0,0 +1,4 @@
(library
(name impl2)
(modes melange)
(implements vlib))

View file

@ -0,0 +1 @@
let run () = print_endline "impl1"

View file

@ -0,0 +1,21 @@
`melange.emit` that tries to use two implementations for the same virtual lib
$ dune build @melange
Error: Conflicting implementations for virtual library "vlib" in
_build/default/vlib:
- "impl1" in _build/default/impl1
-> required by library "bar" in _build/default
- "impl2" in _build/default/impl2
This cannot work.
-> required by melange target output
-> required by alias melange
Error: Conflicting implementations for virtual library "vlib" in
_build/default/vlib:
- "impl1" in _build/default/impl1
-> required by library "bar" in _build/default
- "impl2" in _build/default/impl2
This cannot work.
-> required by melange target output
-> required by _build/default/output/foo.js
-> required by alias melange
[1]

View file

@ -0,0 +1,4 @@
(library
(name vlib)
(modes melange)
(virtual_modules vlib))