nrepl 2025-06-27

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 ๐Ÿ™‚

๐Ÿ‘ 1
๐Ÿงก 1

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

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.