Fork me on GitHub
#nrepl
<
2019-05-14
>
markwoodhall12:05:56

Hi, has anyone come across this before? This setup was previously working fine but now I get the below error when trying to open any ClojureScript file in vim (vim-fireplace). I am using cider-nrepl 0.21.1 and piggieback 0.4.0. I imagine there might be a version mismatch or something but I am not sure where.

Exception in thread "nRepl-session-b1e1107c-001d-4433-8db7-e66291d821f2" java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'nrepl.transport/Transport found for class: nil
        at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583)
        at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575)
        at nrepl.transport$eval48462$fn__48463$G__48453__48470.invoke(transport.clj:16)
        at nrepl.middleware.print$replying_PrintWriter$fn__48919.invoke(print.clj:115)
        at nrepl.middleware.print.proxy$java.io.Writer$ff19274a.write(Unknown Source)
        at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
        at java.io.BufferedWriter.flush(BufferedWriter.java:253)
        at java.io.PrintWriter.newLine(PrintWriter.java:482)
        at java.io.PrintWriter.println(PrintWriter.java:629)
        at java.io.PrintWriter.println(PrintWriter.java:757)
        at java.lang.Throwable$WrappedPrintWriter.println(Throwable.java:764)
        at java.lang.Throwable.printStackTrace(Throwable.java:655)
        at java.lang.Throwable.printStackTrace(Throwable.java:721)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
        at cljs.repl$repl_caught.invokeStatic(repl.cljc:809)
        at cljs.repl$repl_caught.invoke(repl.cljc:795)
        at cider.piggieback$repl_caught.invokeStatic(piggieback.clj:105)
        at cider.piggieback$repl_caught.invoke(piggieback.clj:98)
        at cider.piggieback$do_eval.invokeStatic(piggieback.clj:265)
        at cider.piggieback$do_eval.invoke(piggieback.clj:227)
        at cider.piggieback$evaluate.invokeStatic(piggieback.clj:273)
        at cider.piggieback$evaluate.invoke(piggieback.clj:271)
        at clojure.lang.Var.invoke(Var.java:381)
        at cider.piggieback$wrap_cljs_repl$fn__49637$fn__49640$fn__49641.invoke(piggieback.clj:305)
        at cider.piggieback$enqueue$fn__49609.invoke(piggieback.clj:195)
        at clojure.lang.AFn.run(AFn.java:22)
        at nrepl.middleware.session$session_exec$main_loop__49154$fn__49158.invoke(session.clj:171)
        at nrepl.middleware.session$session_exec$main_loop__49154.invoke(session.clj:170)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:748)

bozhidar12:05:19

I think @pez mentioned a similar problem (take a look at this history).

pez12:05:28

Yes, I've seen it often with the dev build of Calva, which seems to provoke this thing often. I have failed to trace it down, though.

bozhidar12:05:30

I haven’t been able to reproduce it, though.

pez12:05:51

The history is eaten by the 10K monster.

bozhidar12:05:13

Ah, damn it. My best guess is that the problem happens only with a certain format of the evaluation requests, as no CIDER users have ever reported this.

dominicm12:05:17

@cichli helped me with this before

dominicm12:05:45

It might be fixed in snapshot piggieback?

bozhidar12:05:51

He hasn’t been around much lately, but he’s definitely the expert on this part of the code.

pez12:05:36

My theory has been that it is provoked by something that happens before the evaluation request.

bozhidar12:05:12

One thing that comes to mind is that CIDER uses streamed values by default. I wonder if the problem happens only without them.

bozhidar12:05:20

> It might be fixed in snapshot piggieback?

bozhidar12:05:55

Good idea. @cichli did some refactorings there, although I don’t think anything related to bug reports.

pez12:05:43

I shall see if it is still easy to get this with Calva, if so I can also check wether snapshot fixes it.

markwoodhall12:05:59

I am hitting the problem consistently, I have just tried with piggieback 0.4.1-SNAPSHOT and the issue went away. Will keep trying and see how I get on.

metal 1
markwoodhall12:05:54

I did look at the diff between 0.4.0 and 0.4.1-SNAPSHOT and it looked like nothing there could resolve it, it looks like it has though.

bozhidar12:05:33

@markwoodhall That’s an unexpected, but welcome development. I can cut a release for 0.4.1 is a day or two. Let’s just make sure that the problem goes away for good.

bozhidar13:05:45

In light of this revelation I’ve just released 0.4.1 right away. I’m just sorry poor @pez wasted a ton of time debugging this, before @dominicm saved us.

pez13:05:43

Haha, I learnt a lot in the process, shed no tears my way. ❤️

👌 1