Fork me on GitHub
#cider
<
2023-11-19
>
Carsten Behring17:11:11

Can I get "logging" from enrich-classpath when using clojure.sh ? It can take a while and "DEBUG true" does not seem to work.

vemv17:11:18

Check the output=... part in that script we only use its last line for for the 'green path' via tail You could echo $output unconditionally. Probably I didn't want to do that as it's noisy and can potentially confuse other tools

vemv17:11:43

It might be reasonable to echo it depending on DEBUG

Carsten Behring17:11:56

And it would not stream, correct ?

vemv17:11:24

Yeah it wouldn't If you can figure out / gpt how to do it cleanly, I'd be willing to merge it in

vemv17:11:04

IDK, clojure and bash alike make it easy enough to redirect *out* / stdout

Carsten Behring18:11:44

I don't know enough about bash to suggest improvements, but it seems to me to be tricky to see a stream of "println" while at the same time capture the latest println in a bash variable (as this is the command to execute) Maybe there is some "tee" trickery to get this working.

Carsten Behring18:11:50

This does work:

output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.5"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@" | tee /tmp/progress.log)

Carsten Behring18:11:38

so it streams the output "downloads of jars" and "enrich-classpath` logging into /tmp/progress.log

👍 1