I use tools-build to compile clojure code with something like this
(b/compile-clj {:basis basis
:src-dirs (mapv #(str dir-prefix %) ["src"])
:class-dir class-dir})
However, when it fails, it doesn't provide much information apart from throwing an exception in this place
(throw (ex-info (str "Clojure compilation failed, working dir preserved: " (.toString working-dir)) {}))
Is there a way to get more details?
I could only do so by manually augmenting process-args here
https://github.com/clojure/tools.build/blob/master/src/main/clojure/clojure/tools/build/tasks/compile_clj.clj#L106
process (process/process (assoc process-args
:out :write
:out-file "compile.out"
:err :write
:err-file "compile.err"))
and then inspecting the compile.err file.the process default behavior is to inherit the streams from the compile process to the parent process so you should already be seeing any output
I didn't see any details, weird. I'll see if I can reproduce it - trying on a minimal reproducer now, it does produce output as expected.