-
Notifications
You must be signed in to change notification settings - Fork 462
Closed
ocaml/opam-repository
#28437Labels
Description
Expected Behavior
I have a simple js_of_ocaml executable which uses a (module_without_implementation interface). This compiled fine with dune 3.19.1 (on OCaml 4.14.1 and 5.2.0).
Actual Behavior
After updating to dune 3.20.0, I now have a compilation error:
File "bin/.main.eobjs/jsoo/_unknown_", line 1, characters 0-0:
Error: No rule found for bin/.main.eobjs/jsoo/dune__exe__Interface.cmo.js
Reproduction
I have a minimal example with the following setup (also as a ZIP Archive):
.
├── bin
│ ├── dune
│ ├── interface.mli
│ └── main.ml
└── dune-project
dunefile:(executable (modes js) (modules_without_implementation interface) (name main))
interface.mlitype t = Foo
main.mllet _ = Interface.Foo
dune-project(lang dune 3.19) (name minjs) (package (name minjs) (depends ocaml dune js_of_ocaml) (allow_empty))
To reproduce the bug, attempt to build in a switch with ocaml 4.14.1 (or 5.2.0). It fails with dune 3.20.0 but passes with 3.19.1:
opam switch create test ocaml-base-compiler.4.14.1
eval $(opam env --switch=test)
opam install dune.3.20.0 js_of_ocaml
dune build # error
opam install dune.3.19.1
eval $(opam env)
dune clean
dune build # no errorSpecifications
- Version of
dune(output ofdune --version): 3.20.0 - Version of
ocaml(output ofocamlc --version): 4.14.1 (also tested on 5.2.0) - Operating system (distribution and version): Kubuntu 25.04 x86_64
- js_of_ocaml version 6.2.0
Additional information
dune build --verbose output:
Shared cache: enabled-except-user-rules
Shared cache location: /home/dorian/.cache/dune/db
Workspace root: /home/dorian/Documents/Github/minjs
Auto-detected concurrency: 20
Dune context:
{ name = "default"
; kind = "default"
; profile = Dev
; merlin = true
; fdo_target_exe = None
; build_dir = In_build_dir "default"
; instrument_with = []
}
Actual targets:
- alias @@default
File "bin/.main.eobjs/jsoo/_unknown_", line 1, characters 0-0:
Error: No rule found for bin/.main.eobjs/jsoo/dune__exe__Interface.cmo.js
Reactions are currently unavailable