One of my colleagues is connecting from IntelliJ/Cursive to an nrepl server run in the terminal. Print output is seen only in the server process. I know that there's an issue about this; https://github.com/nrepl/nrepl/issues/119 But does someone here maybe know a hack that currently works, to redirect print output to the client?
Sorry, I didn't check the link at the time, and the thread slipped away from me. Thank you for the heads up! I'll keep this thread in mind if my colleague and I return to the issue ๐
It depends on the type of print output - anything going through *out* (i.e. most Clojure I/O) will be relayed to the client, but directly using System.out/err will not (i.e. most Java output). There's no workaround to this that I'm aware of.
Thank you ๐ We'll have to look into where the output is going currently.
Did you check out the linked gist in the issue? https://gist.github.com/daviesian/4517859
I did a proof of concept for this at: https://github.com/ivarref/capture-sout-serr Details: https://github.com/nrepl/nrepl/issues/119#issuecomment-3141041830
If cursive uses nrepl.core/client-session in (a future release of) nrepl, I believe this (forwarding of System.out) should work there as well.