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