Closed eneroth closed 1 year ago
Please make sure you are using nrepl
version 0.8
or later.
I faced this issue when I used a very old version of nrepl
.
Ah, I have no idea which REPL is included in Shadow-CLJS. It might be an old one, I guess.
Edit: it seems that Shadow-CLJS is using 0.8.3
.
I have never tested with CLJS. There are a few middlewares which are clojure-native, not sure how it goes with CLJS REPL. If you can figure out what’s going on and what’s needed to make CLJS tick, it would be a great help. See also #31
Shadow-CLJS exposes a normal CLJ socket REPL as well as an NREPL, so I'm not connecting to CLJS. I've never bothered running a socket or NREPL separately, seeing as Shadow provides one: https://shadow-cljs.github.io/docs/UsersGuide.html#_clojure_repl
Once connected to the CLJ REPL, it's possible to tunnel into the CLJS one.
I'm also suffering from the same issue
TL;DR shadow-cljs implements nrepl protocol for v0.4. Clojure Sublimed expects at least 0.8.
I encountered the same issue. After I turned the debug: True
, I noticed that shadow-cljs's nrepl replies with unknown-op
A few hours later, I found out that shadow-cljs redefines middlewares for nrepl and requires them one by one here This piece of code was introduced for nrepl version 0.4, and after comparing to the list in v1.0.0, I found four middlewares are missing. One of them is a middleware to add middlewares that Clojure Sublimed wants to use. I tried patching shadow-cljs, but no luck so far - I am stuck on this error.
I will post an update if I resolve this, but I wanted to share my findings anyway to save time for the next person trying to figure it out.
Thanks @alekzvik! Another angle of attack might be for Clojure Sublimed to not require extra middlewares for CLJS
@tonsky, or they can be optional. A describe op can return a list of supported operations from the nREPL server. This approach might also be helpful in #29
Should work in 2.8.0 via Connect shadow-cljs command
I'm attempting to connect to a server hosted by Shadow-CLJS:
There are no error messages in the log, as I can see.