<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged compile-clj</title>
<link>https://ask.clojure.org/index.php/tag/compile-clj</link>
<description></description>
<item>
<title>tools.build compile-clj capture out/err</title>
<link>https://ask.clojure.org/index.php/14648/tools-build-compile-clj-capture-out-err</link>
<description>&lt;p&gt;When calling &lt;code&gt;compile-clj&lt;/code&gt;, a user can pass in &lt;code&gt;:out&lt;/code&gt; and &lt;code&gt;:err&lt;/code&gt; to capture the output of the compilation call. However, if for some reason the sub-process exits with a non-0, &lt;code&gt;compile-clj&lt;/code&gt; throws without returning that output, making it hard to know what went wrong. (see here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.build/blob/2d2f1b05fd84c3cc756221c17fcfb98034b4d65c/src/main/clojure/clojure/tools/build/tasks/compile_clj.clj#L120&quot;&gt;https://github.com/clojure/tools.build/blob/2d2f1b05fd84c3cc756221c17fcfb98034b4d65c/src/main/clojure/clojure/tools/build/tasks/compile_clj.clj#L120&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I would find it helpful if the ex-data of the thrown exception included the &lt;code&gt;:out&lt;/code&gt; (variable &lt;code&gt;ps-out&lt;/code&gt; and &lt;code&gt;:err&lt;/code&gt; (variable &lt;code&gt;ps-err&lt;/code&gt;) from the &lt;code&gt;process/process&lt;/code&gt; call. Then I could have further insight into what went wrong.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14648/tools-build-compile-clj-capture-out-err</guid>
<pubDate>Mon, 28 Jul 2025 19:41:29 +0000</pubDate>
</item>
</channel>
</rss>