Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fallback to implementation if there is no mli
Browse files Browse the repository at this point in the history
emillon committed Apr 17, 2018
1 parent d26c69f commit a142e22
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/ocamldep.ml
Original file line number Diff line number Diff line change
@@ -139,9 +139,13 @@ let rules ~(ml_kind:Ml_kind.t) ~dir ~modules
);
let build_paths dependencies =
let dependency_file_path m =
Option.map
(Module.file ~dir m Ml_kind.Intf)
~f:all_deps_path
let path =
match Module.file ~dir m Ml_kind.Intf with
| 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
List.filter_map dependencies ~f:dependency_file_path
in
5 changes: 2 additions & 3 deletions test/blackbox-tests/test-cases/github660/run.t
Original file line number Diff line number Diff line change
@@ -16,6 +16,5 @@ to rely on these.
hello
$ 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
File "_none_", line 1:
Error: Files .main.eobjs/main.cmx and .main.eobjs/lib_sub.cmx
make inconsistent assumptions over interface Lib_sub
main alias runtest
hello

0 comments on commit a142e22

Please sign in to comment.