Skip to content

Commit

Permalink
fix: do not run rules outside of Build_system.run
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Feb 8, 2022
1 parent 0bcf3a3 commit ef31f56
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bin/describe.ml
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,14 @@ let term : unit Term.t =
let* setup = Import.Main.setup () in
let* setup = Memo.Build.run setup in
let context = Import.Main.find_context_exn setup ~name:context_name in
let+ res = Memo.Build.run (What.describe what options setup context) in
match format with
| Csexp -> Csexp.to_channel stdout (Sexp.of_dyn res)
| Sexp -> print_as_sexp res)
let+ res =
Build_system.run (fun () -> What.describe what options setup context)
in
match res with
| Error `Already_reported -> ()
| Ok res -> (
match format with
| Csexp -> Csexp.to_channel stdout (Sexp.of_dyn res)
| Sexp -> print_as_sexp res))

let command : unit Term.t * Term.info = (term, info)

0 comments on commit ef31f56

Please sign in to comment.