Fallback to implementation if there is no mli

This commit is contained in:
Etienne Millon 2018-04-12 16:50:44 +02:00 committed by Jérémie Dimino
parent 40624e744b
commit ec9ff813ad
2 changed files with 9 additions and 6 deletions

View File

@ -139,9 +139,13 @@ let rules ~(ml_kind:Ml_kind.t) ~dir ~modules
); );
let build_paths dependencies = let build_paths dependencies =
let dependency_file_path m = let dependency_file_path m =
Option.map let path =
(Module.file ~dir m Ml_kind.Intf) match Module.file ~dir m Ml_kind.Intf with
~f:all_deps_path | Some _ as x -> x
| None when Option.is_some alias_module -> None
| None -> Module.file ~dir m Ml_kind.Impl
in
Option.map path ~f:all_deps_path
in in
List.filter_map dependencies ~f:dependency_file_path List.filter_map dependencies ~f:dependency_file_path
in in

View File

@ -16,6 +16,5 @@ to rely on these.
hello hello
$ echo 'let x = 1' >> no-interfaces/lib_sub.ml $ echo 'let x = 1' >> no-interfaces/lib_sub.ml
$ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt $ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt
File "_none_", line 1: main alias runtest
Error: Files .main.eobjs/main.cmx and .main.eobjs/lib_sub.cmx hello
make inconsistent assumptions over interface Lib_sub