Fork me on GitHub
#cider
<
2023-08-29
>
pez14:08:16

👋 I am having an issue in Calva, with output printed from a threads spawned in an evaluation not getting printed in the repl output. CIDER is doing the right thing, and I’d like to know how. • https://clojurians.slack.com/archives/C17JYSA3H/p1693209818386449#nrepl (among others) contain some of my observations so far https://clojurians.slack.com/archives/C17JYSA3H/p1693209818386449 • Calva issue tracking this: https://github.com/BetterThanTomorrow/calva/issues/2300 If some CIDER maintainer with knowledge about this could assist me, I’ll be forever grateful. 🙏

dpsutton14:08:05

been a bit. but there’s an op called “out-subscribe” or “subscribe-out”. This installs a forking printer as the system out which forwards all output back over the nrepl transport. is calva sending that operation?

pez14:08:14

Thanks! Will have a look. We are not using this. When should it be sent? CIDER is not sending it as part of an evaluation, afaict from the nrepl message log.

dpsutton14:08:41

it’s a message in the startup

pez14:08:36

Who-hoo! Success! Do you know if it should be done for all sessions? Or, do clones of the sessions inherit this?

dpsutton14:08:31

no idea on that. i imagine clones inherit but don’t know

🙏 2
pez15:08:43

Do you know if this is optional behaviour in CIDER? I’m an Emacs noob and get lost when trying to figure this out.

dpsutton15:08:07

There’s an option to prohibit it

dpsutton15:08:47

;; Redirect the nREPL's terminal output to a REPL buffer.
;; If we don't do this the server's output will end up
;; in the *nrepl-server* buffer.
(when (and cider-redirect-server-output-to-repl
           (cider-nrepl-op-supported-p "out-subscribe"))
  (cider--subscribe-repl-to-server-out))

dpsutton15:08:15

cider-redirect-server-output-to-repl is default true

pez15:08:34

Awesome. Makes sense. Both that it’s optional and defaults to enabled.

jpmonettas15:08:29

kind of late to the party but I was trying #C03KZ3XT0CF for this kind of bugs, and figured out you can easily compare both cider and calva initializations from the messages POV. So this is Cider

jpmonettas15:08:45

while this is calva

jpmonettas15:08:06

so yeah, no out-subscribe on calva

pez15:08:52

Very cool! I didn’t know this log was available in flow-storm.

jpmonettas15:08:40

> Very cool! I didn’t know this log was available in flow-storm. it is not an nrepl log or anything, is the printer tool, so you can record everything that is happening for nrepl and cider for example, and then print every call to this read bencode form to get that

🤯 2