Do not silently ignore closure errors

cc @diml

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-06-07 12:20:48 +07:00
parent a70ccb6d8b
commit acac3e29b3
1 changed files with 3 additions and 11 deletions

View File

@ -327,17 +327,9 @@ module Gen (S : sig val sctx : SC.t end) = struct
:: (List.map libs ~f:(fun lib -> odocs (Lib lib)))
) in
let html_files =
let closure =
match Lib.closure libs with
| Ok closure -> closure
| Error _ ->
(* CR diml for rgrinberg: this branch needs a comment, I
don't understand why we fallback to not taking the
transitive closure in case of error. *)
libs
in
let deps = Dep.deps (Ok closure) in
List.map odocs ~f:(to_html ~deps ~requires:(Ok closure)) in
let closure = Lib.closure libs in
let deps = Dep.deps closure in
List.map odocs ~f:(to_html ~deps ~requires:closure) in
List.iter (
Dep.html_alias (Pkg pkg)
:: List.map ~f:(fun lib -> Dep.html_alias (Lib lib)) libs