This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-22
Channels
- # architecture (1)
- # aws (3)
- # beginners (78)
- # boot (33)
- # cider (49)
- # cljs-dev (3)
- # clojure (82)
- # clojure-berlin (2)
- # clojure-dusseldorf (14)
- # clojure-gamedev (75)
- # clojure-italy (15)
- # clojure-nl (2)
- # clojure-poland (9)
- # clojure-russia (1)
- # clojure-spec (11)
- # clojure-uk (91)
- # clojurescript (17)
- # core-async (2)
- # cursive (1)
- # data-science (3)
- # datascript (34)
- # datomic (13)
- # docs (2)
- # duct (32)
- # emacs (8)
- # fulcro (95)
- # instaparse (17)
- # jobs (2)
- # jobs-discuss (1)
- # jobs-rus (4)
- # leiningen (1)
- # luminus (1)
- # lumo (4)
- # mount (1)
- # nrepl (1)
- # off-topic (98)
- # onyx (13)
- # portkey (12)
- # re-frame (10)
- # reagent (11)
- # remote-jobs (4)
- # rum (3)
- # shadow-cljs (34)
- # specter (7)
- # sql (1)
- # tools-deps (8)
(Reposting in #nrepl and #cider as per recommendation from #beginners channel)
I am getting the following error while trying to load a buffer to my (remote) REPL:
Exception in thread "nREPL-worker-0" java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'clojure.tools.nrepl.transport/Transport found for class: clojure.tools.nrepl.middleware.load_file$wrap_load_file$fn$reify__668
Complete stack trace: https://pastebin.com/fafec0AV
My profiles.clj:
{:repl {:plugins [[cider/cider-nrepl "0.17.0-SNAPSHOT"]
[refactor-nrepl "2.4.0-SNAPSHOT"]]
:dependencies [[org.clojure/tools.nrepl "0.2.12"]]
}
}
Effectively none of my required namespaces are getting loaded.
Any help/pointers would be helpful. TIA.@rahulr92 Seems like some dependency issue. Why did you create a separate profile for the repl, btw?
@bozhidar I created the :repl profile to mitigate warnings of cider complaining about cider-nrepl versions as per http://cider.readthedocs.io/en/latest/troubleshooting/#cider-complains-of-the-cider-nrepl-version
I am booting my server as follows:
lein repl :headless :host <hostname>
Then I am connecting to that instance from my local emacs (Spacemacs) using cider-connect
.
@bozhidar This is the error if I remove the repl profile:
WARNING: CIDER's version (0.17.0-snapshot) does not match cider-nrepl's version (nil). Things will break!
More information.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.4.0-SNAPSHOT (package: 20180316.1000) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.
I’m puzzled by this error you’ve gotten. Have never seen it before and your setup seems correct.
I get the error without the repl profile too. On running lein deps :tree :
lein deps :tree
[clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
[org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
https://github.com/nrepl/drawbridge is now depending on the new nREPL 0.4 and I’ve patched reply as well https://github.com/trptcolin/reply/pull/182
Anyways, now the last bit is providing a boot and lein tasks in cider-nrepl
to use the new nREPL. @richiardiandrea @dominicm Interested in helping with those?
@bozhidar what should the boot task do? Sorry I was a bit out of the loop
@richiardiandrea Basically it needs to start the new nREPL (0.4+) instead of the one bundled with Boot. I think you’re also on Boot’s team, so you might be able to help with the nREPL update there.
question, is this task for boot core or it should go somewhere else?
which one first and where 😄
It should go to boot-core, but as not everyone will be on the latest boot, it might be good to have this as some task in cider-nrepl
as well.
I also wonder how we can make things painless for people stuck with some legacy middleware using boot-core
. Ideally there should be some param to choose whether you want to start the new nREPL server or the legacy one.
For a cider-nrepl
task - you just have to be able to start the new one and inject whatever deps/middleware is needed.
so usually I have a task called cider
(deftask cider "CIDER profile"
[]
(require 'boot.repl)
(swap! @(resolve 'boot.repl/*default-dependencies*)
concat '[[org.clojure/tools.nrepl "0.2.13"]
[cider/cider-nrepl "0.16.0"]
[refactor-nrepl "2.4.0-SNAPSHOT"]])
(swap! @(resolve 'boot.repl/*default-middleware*)
concat '[cider.nrepl/cider-middleware
refactor-nrepl.middleware/wrap-refactor])
identity)
I can expand on this
of course passing parameters in
so actually...I am checking https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/tasks.clj
so the only thing we need is a small wrapper to the new namespace
because then we can do boot add-middleware ..... new-nrepl
it is definitely deeper than just a task, because we use boot-cljs-repl
with boot
so I will have to continue another time 😉
I was thinking that upstream they can add an extra task to spin the new nREPL instead of the legacy one (the package names and the classes are different, so there can be no conflicts between them).
@richiardiandrea boot-cljs-repl needs updating too
Ok I will try my best
@richiardiandrea Much appreciated!
@benedek Certainly. The old namespace is gone, so the code has to be updated to use the new one - clojure.tools.nrepl.*
-> nrepl.*
.