You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been doing a little digging into a simple piggieback nREPL server. I've found that messages to out and err have the message ID of the call that started piggieback in the first place, not the message that triggered the output. For example.
I eval to start piggieback in my nREPL session (id: foo)
I get a response saying I can use :cljs/quit to exit (id: foo)
I eval (println "hey") (id: bar)
I see the output of "hey", (id: foo)
Then I see the return value of the eval (id: bar, as expected)
I had a dig into the source trying to fix it myself and realised output-bindings doesn't seem to do anything.
You can take it out completely and get the exact same result, so I think these bindings aren't being used and they're falling through to the outer environment which still has the original message ID from when piggieback started.
I also discovered that if I reconnect to the nREPL server and assume the same session I won't see any out or err whatsoever. I think this is to do with the same issue, I'm pretty sure they'd both be fixed by the same change.
My theory is the bindings just need to go elsewhere, where CLJS can hook into the pre-defined out and err handlers, I just can't work out where. If anyone knows where those bindings should be (or what their vars should be called?) I'll happily make the change.
The text was updated successfully, but these errors were encountered:
I've been doing a little digging into a simple piggieback nREPL server. I've found that messages to out and err have the message ID of the call that started piggieback in the first place, not the message that triggered the output. For example.
:cljs/quit
to exit (id: foo)(println "hey")
(id: bar)I had a dig into the source trying to fix it myself and realised
output-bindings
doesn't seem to do anything.piggieback/src/cider/piggieback_impl.clj
Lines 214 to 235 in 417efae
You can take it out completely and get the exact same result, so I think these bindings aren't being used and they're falling through to the outer environment which still has the original message ID from when piggieback started.
I also discovered that if I reconnect to the nREPL server and assume the same session I won't see any out or err whatsoever. I think this is to do with the same issue, I'm pretty sure they'd both be fixed by the same change.
My theory is the bindings just need to go elsewhere, where CLJS can hook into the pre-defined out and err handlers, I just can't work out where. If anyone knows where those bindings should be (or what their vars should be called?) I'll happily make the change.
The text was updated successfully, but these errors were encountered: