Fork me on GitHub
#nrepl
<
2019-07-08
>
mkarp20:07:32

Hey everyone! I've got a newcomer question. In an nREPL middleware, is there a way to determine if a message came from an nREPL client with an active ClojureScript session? What I'm trying to do: every time I evaluate ClojureScript code in an editor, I would like to call Reagent's reload function. Here's the trick I came up with https://github.com/mkarp/cljs-nrepl-exercise/blob/master/src/cljs_test/nrepl_middleware.clj#L8. It works in my case, however some nREPL clients do not provide :file in the message they send. Any ideas how to improve it are appreciated 🙏