Fix #567
The alias module needs an implementation for non-jbuilder users.
This commit is contained in:
parent
7790d6bd4c
commit
2e7f881d4c
|
@ -318,18 +318,16 @@ module Gen(P : Install_rules.Params) = struct
|
|||
String_map.mem modules main_module_name) then
|
||||
None
|
||||
else if String_map.mem modules main_module_name then
|
||||
let file ext =
|
||||
Some { Module.File.
|
||||
name = sprintf "%s__%s-gen" lib.name ext
|
||||
; syntax = OCaml
|
||||
}
|
||||
in
|
||||
(* The tests don't pass with 4.02 if we don't do that *)
|
||||
let needs_impl = ctx.version < (4, 03, 0) in
|
||||
(* This module needs an implementaion for non-jbuilder
|
||||
users of the library:
|
||||
|
||||
https://github.com/ocaml/dune/issues/567 *)
|
||||
Some
|
||||
{ Module.name = main_module_name ^ "__"
|
||||
; impl = if needs_impl then file ".ml" else None
|
||||
; intf = if not needs_impl then file ".mli" else None
|
||||
; intf = None
|
||||
; impl = Some { name = sprintf "%s__.ml-gen" lib.name
|
||||
; syntax = OCaml
|
||||
}
|
||||
; obj_name = lib.name ^ "__"
|
||||
}
|
||||
else
|
||||
|
|
|
@ -3,8 +3,9 @@ Successes:
|
|||
$ $JBUILDER build --display short --root foo -j1 --debug-dep 2>&1 | grep -v Entering
|
||||
ocamldep test/bar.ml.d
|
||||
ocamldep foo.ml.d
|
||||
ocamlc .foo.objs/foo__.{cmi,cmti}
|
||||
ocamlc .foo.objs/foo__.{cmi,cmo,cmt}
|
||||
ocamldep intf.mli.d
|
||||
ocamlopt .foo.objs/foo__.{cmx,o}
|
||||
ocamlc .foo.objs/foo__Intf.{cmi,cmti}
|
||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
||||
ocamlopt .foo.objs/foo.{cmx,o}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
$ $JBUILDER build -j1 --display short --root . --dev bin/technologic.bc.js @install lib/x.cma.js lib/x__Y.cmo.js bin/z.cmo.js
|
||||
ocamlc lib/stubs.o
|
||||
ocamlopt .ppx/js_of_ocaml-ppx/ppx.exe
|
||||
ocamlc lib/.x.objs/x__.{cmi,cmti}
|
||||
ocamlc lib/.x.objs/x__.{cmi,cmo,cmt}
|
||||
ocamlmklib lib/dllx_stubs.so,lib/libx_stubs.a
|
||||
ppx lib/x.pp.ml
|
||||
ppx lib/y.pp.ml
|
||||
ppx bin/technologic.pp.ml
|
||||
ppx bin/z.pp.ml
|
||||
ocamlopt lib/.x.objs/x__.{cmx,o}
|
||||
ocamldep lib/x.pp.ml.d
|
||||
ocamldep lib/y.pp.ml.d
|
||||
ocamldep bin/technologic.pp.ml.d
|
||||
|
@ -34,8 +35,9 @@
|
|||
break it
|
||||
fix it
|
||||
$ $JBUILDER build -j1 --display short --root . bin/technologic.bc.js @install
|
||||
ocamlc lib/.x.objs/x__.{cmi,cmti}
|
||||
ocamlc lib/.x.objs/x__.{cmi,cmo,cmt}
|
||||
ocamlc lib/.x.objs/x__Y.{cmi,cmo,cmt}
|
||||
ocamlopt lib/.x.objs/x__.{cmx,o}
|
||||
ocamlc lib/.x.objs/x.{cmi,cmo,cmt}
|
||||
ocamlopt lib/.x.objs/x__Y.{cmx,o}
|
||||
ocamlc lib/x.cma
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
$ $JBUILDER build -j1 --display short --root . @install
|
||||
ocamldep alib/alib.ml.d
|
||||
ocamldep alib/main.ml.d
|
||||
ocamlc alib/.alib.objs/alib__.{cmi,cmti}
|
||||
ocamlc alib/.alib.objs/alib__.{cmi,cmo,cmt}
|
||||
ocamldep blib/blib.ml.d
|
||||
ocamldep blib/sub/sub.ml.d
|
||||
ocamlopt alib/.alib.objs/alib__.{cmx,o}
|
||||
ocamlc blib/sub/.sub.objs/sub.{cmi,cmo,cmt}
|
||||
ocamlopt blib/sub/.sub.objs/sub.{cmx,o}
|
||||
ocamlc blib/.blib.objs/blib.{cmi,cmo,cmt}
|
||||
|
|
Loading…
Reference in New Issue