Fork me on GitHub
#shadow-cljs
<
2019-08-31
>
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
{:source-paths
 ["src"]

 :dependencies
 [[instaparse "1.4.10"]]

 :builds
 {:app
  {: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

thheller07:08:45

@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:

thheller07:08:53

there is nrepl and cider-nrepl

thheller07:08:00

cider-nrepl is the thing causing trouble

thheller07:08:24

cider-nrepl always needs the version matching cider AFAICT

thheller08:08:46

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

thheller08:08:51

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

thheller08:08:21

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

thheller08:08:31

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"

Olical09:08:24

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.

thheller10:08:27

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

rafaeldelboni18:09:21

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

thheller18:09:10

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

thheller18:09:22

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

rafaeldelboni18:09:02

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

thheller10:08:17

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

thheller10:08:59

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

thheller10:08:28

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

thheller10:08:38

so might as well just use a socket per REPL

Olical10:08:25

Yeah, I do socket per repl

Olical10:08:30

I think it's kind of expected

hayley16:08:42

@thheller is issue #508 the appropriate thing to subscribe to to be notified when socket prepl support gets included? https://github.com/thheller/shadow-cljs/issues/508