Fork me on GitHub
Karol Wójcik06:08:55

I'm receiving strange error while connected to node-repl. Everytime I want to autocomplete a symbol I receive:

No implementation of method: :-evaluate of protocol:
   #'cljs.repl/IJavaScriptEnv found for class: nil
I don't know whether it's some sort of cider internal issue or I'm doing something wrong. Steps to reproduce: 1. shadow-cljs.edn configuration
;; shadow-cljs configuration

 [[instaparse "1.4.10"]]

  {:target           :npm-module
   :entry            forg.parser.core
   :output-dir       "target"
   :compiler-options {:infer-externs :auto}
   :devtools         {:autoload      true
                      :loader-mode   :eval
                      :repl-pprint   true
                      :async-require true}}}}
2. cider-jack-in-cljs 3. start node-repl via shadow-cljs start node-repl 4. choose node-repl from cider 5. try to autocomplete and error'll occur


@karol.wojcik thats nrepl stuff. it appears there were some changes.

Karol Wójcik07:08:49

I see. Shadow-cljs support nrepl 21.0. Am I right? Ok wait. Even when I change the nrepl dependency it will still doesn't work since the emacs bindings has been changed as well. :thinking_face:


there is nrepl and cider-nrepl


cider-nrepl is the thing causing trouble


cider-nrepl always needs the version matching cider AFAICT


well yeah they added clj-suitable which assumes it is working with figwheel


ah ok there is some conditional code so it isn't used with shadow-cljs


@karol.wojcik which shadow-cljs version are you on? guessing one before the nrepl changes


also btw :async-require in your build config does nothing. you can remove it

David Pham08:08:59

Cider-Nrepl is annoying because they keep breaking it lol

Karol Wójcik09:08:27

@thheller I'm using shadow-cljs "2.8.52"


Hello! I was wondering if anyone's ever had to get the compiler environment out of shadow cljs to pass to something else? There's someone in #conjure wondering how to hook shadow up to a prepl server which I know requires the compiler environment. I'm not a shadow user though 😬 so I'm not sure what to advise.


@olical I'm currently doing some REPL work. Might get around to implementing prepl support too.


Hey @thheller do you have any update about this, is there anywhere I can follow this development? Sorry to disturb


well the implementation is ready. I just don't like it. it makes the same "sacrifices" that the other REPL implementations do and doesn't account for the differences CLJS REPLs have from clojure


so tired from the "make it look like clojure" compromises


Thanks a lot, subscribed. There some tooling using prepl now, this would help a lot people playing around with that. Again, sorry for disturbing


getting the compiler env it relatively easy but since only the worker is supposed to modify it you couldn't do anything with it except read from it


well I already have a working impl in a branch. I just wanted to solve the "upgrade" issue so that you don't need a separate socket for each build etc


but that isn't solvable without substantial changes to prepl itself which is never gonna happen


so might as well just use a socket per REPL


Yeah, I do socket per repl


I think it's kind of expected


@thheller is issue #508 the appropriate thing to subscribe to to be notified when socket prepl support gets included?