git.annexia.org
/
goals.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
run: Improve error message if a predicate script fails.
[goals.git]
/
src
/
run.ml
diff --git
a/src/run.ml
b/src/run.ml
index
5aad484
..
3a04256
100644
(file)
--- a/
src/run.ml
+++ b/
src/run.ml
@@
-122,9
+122,12
@@
and needs_rebuild ?(final_check = false) env loc deps extra_deps pattern =
let r = Eval.run_code env loc code in
if r = 99 (* means "needs rebuild" *) then true
else if r = 0 (* means "doesn't need rebuild" *) then false
let r = Eval.run_code env loc code in
if r = 99 (* means "needs rebuild" *) then true
else if r = 0 (* means "doesn't need rebuild" *) then false
- else
- failwithf "%a: predicate ā%sā failed with exit code %d"
- Ast.string_loc loc pred r
+ else (
+ let targs = List.map (Ast.string_expr ()) targs in
+ let targs = String.concat ", " targs in
+ failwithf "%a: predicate ā%s (%s)ā failed with exit code %d"
+ Ast.string_loc loc pred targs r
+ )
and exists_runner env loc p debug_pred =
Cmdline.debug "%a: running implicit existence rule for predicate %s"
and exists_runner env loc p debug_pred =
Cmdline.debug "%a: running implicit existence rule for predicate %s"