Something I just had to hack around in tools.build; I'm making use of clojure.tools.build.api/uber and clojure.tools.build.api/compile-clj. These commands do some work, and start a sub-process to do the heavy lifting. However, they don't provide any way to inject anything about the process that gets started.
In my case, I have an overseer command line process that is running a lot of these steps in parallel; I redirect stdout and stderr to a file when they run. This requires changing the options passed to clojure.tools.build.tasks.process/process. uber and compile-clj don't make this possible.
My solution involved a with-redefs on process to intecept those calls and add in the necessary options. This feels a bit brittle.
I thought I'd discuss this here before opening an issue or even creating a patch.
seems like a reasonable request. I don't think uber forks a process, that's only compile-clj as far as I recall?
Sounds right; I just have a function that calls compile-clj then uber. I'm thinking in terms of adding a :process-opts option that can be merged in.
sounds good - if there is something already in the process or java-cmd args, try to copy the arg name/semantics to let it flow through
btw clojure itself has a dynamic var in clojure.java.deps (or near) to control the process flow I believe
(saying this as a random data point that might be relevant)
I remember it wrong. there was one dynamic function, let me look it up
oh it was this one: https://github.com/borkdude/deps.add-lib/blob/93775641d1923cd4c7af0ec8c797c78f5a0fb9b3/src/borkdude/deps/add_lib.clj#L38 not relevant at all, sorry