From 7268622cdfc998eaee507804607b9718c18ee9d8 Mon Sep 17 00:00:00 2001 From: gitoleg Date: Tue, 2 Apr 2019 13:53:33 -0400 Subject: [PATCH] fixes a dependency bug in primus lisp docs (#941) --- plugins/primus_lisp/primus_lisp_main.ml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/primus_lisp/primus_lisp_main.ml b/plugins/primus_lisp/primus_lisp_main.ml index 3a390010b..c0fc01a63 100644 --- a/plugins/primus_lisp/primus_lisp_main.ml +++ b/plugins/primus_lisp/primus_lisp_main.ml @@ -42,7 +42,12 @@ module Documentation = struct let print = Doc.generate_index >>| fun index -> printf "%a@\n%!" pp_index index in - ignore (Main.run proj print) + match Main.run proj print with + | Normal, _ -> () + | Exn e, _ -> + eprintf "Failed to generate documentation: %s\n" + (Primus.Exn.to_string e); + exit 1 end module Signals(Machine : Primus.Machine.S) = struct @@ -201,7 +206,7 @@ let () = Config.when_ready (fun {Config.get=(!)} -> if !documentation then - Project.register_pass' ~autorun:true Documentation.print; + Project.register_pass' ~deps:["api"] ~autorun:true Documentation.print; let paths = [Filename.current_dir_name] @ !libs @ [Lisp_config.library] in let features = "init" :: !features in Primus.Machine.add_component (module LispCore);