← Back to home

ClojureScript nREPL Diary — 7

Together with a colleague I’ve found a wrong assumption in my nREPL middleware thingy: Cursive won’t attach :ns and :file to the message it sends to the nREPL server. Atom’s ProtoREPL does it, and I assumed it’s a requirement (I’m very unfamiliar with nREPL’s codebase still, so I poke at it mostly like at a blackbox).

I don’t have a solution yet how to do it. The main problem I’m trying to solve: I’d like to call Reagent’s render function only when a line of ClojureScript has been evaluated. Or at least a line of code within a ClojureScript REPL. But I can’t figure out yet how to determine within an nREPL middleware if there’s an active ClojureScript session.

I’ve been looking into the implementation of wrap-cljs-repl. What’s weird is that the session, which arrives via the message, is an atom. While I’m seeing only strings (identifiers).

Will keep digging further.

Last edited on May 22, 2019