nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
bozhidar 2018-11-20T10:34:55.165500Z

@pez What’s the failure?

bozhidar 2018-11-20T10:35:09.165700Z

> Exception in thread "nREPL-worker-2" java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'clojure.tools.nrepl.transport/Transport found for class: nrepl.transport.FnTransport

bozhidar 2018-11-20T10:35:33.166200Z

According to this stacktrace you’ve got a mixture of tools.nrepl and nrepl in your project.

bozhidar 2018-11-20T10:36:24.166900Z

Are you sure you don’t have tools.nrepl somewhere in its dependency tree?

pez 2018-11-20T10:56:15.168100Z

@bozhidar The failure related to the :repl-options map in the project file?

pez 2018-11-20T11:00:41.171Z

You're right, it says tools.nrepl right there. I'll print out the dependency tree and see if I can see it lurking around there. But I really shouldn't have that. I used the broomstick to chase everything like that out!

bozhidar 2018-11-20T13:21:50.171400Z

It must be there, otherwise you can’t get such a stacktrace.

bozhidar 2018-11-20T13:22:00.171700Z

As for the :repl-options problem - I don’t know.

bozhidar 2018-11-20T13:23:05.172500Z

I don’t have time to play with lein master myself. I just use the lein-nrepl plugin instead.

pez 2018-11-20T13:55:52.174400Z

When using that plugin my user namespace didn't load as it does with a ”normal” repl.

pez 2018-11-20T14:01:04.178600Z

I got in a hurry since I had been thinking Calva was ready for 0.4.5 and now when you made me see that I hadn't even tested that, I want to make it as painless as possible for the users when leiningen upgrades and 0.4.5 starts to be used.

bozhidar 2018-11-20T14:10:08.178900Z

What’s in your user.clj, btw?

bozhidar 2018-11-20T14:10:23.179300Z

That’s often the reason for problems like yours.

pez 2018-11-20T14:32:48.180300Z

In the project I tried the plugin with, user.clj contains just this:

(ns routing-example.user
  (:use [figwheel-sidecar.repl-api :as ra]))

(defn start []
  (ra/start-figwheel!)
  (ra/cljs-repl "dev"))

(defn stop []
  (ra/stop-figwheel!))

bozhidar 2018-11-20T16:21:40.181200Z

I’ll have to check figwheel-sidecar deps then. Likely it’s pulling the wrong version of nREPL.

bozhidar 2018-11-20T16:23:10.182100Z

Yep, that’s messing everything up. If you remove this file all will be good.

bozhidar 2018-11-20T16:23:45.182900Z

This loads tools.nrepl, which makes cider-nrepl believe you’re using tools.nrepl (as it checks if it’s loaded to decide which nREPL version to use).

bozhidar 2018-11-20T16:24:53.183500Z

I’m pretty sure everything will work fine for you without this file.