1

I'm experimenting with luminus, and all new luminus projects are giving me the cider version/ cider-nrepl version mismatch error when I connect to the repl started by lein run using emacs M-x cider-connect:

WARNING: CIDER's version (0.14.0) does not match cider-nrepl's version (nil). Things will break!

If I ignore the automatically started nrepl and use M-x cider-jack-in to start a new repl I don't see the error. This is what I would normally use for a clojure project but there appear to be certain things that don't work as well using luminus (starting and stopping an h2 database if I recall correctly, but that is another issue).

I have removed my ~/.lein/profiles.clj file and replaced it with one containing just the cider-nrepl plugin, ie:

{:user
  {:plugins
    [[cider/cider-nrepl "0.14.0"]]}}

I have also tried adding the plugin via the project.clj file but I still get the error.

lein deps :tree gives me a few possible conflicts and suggests exclusions, but none of them involve nrepl or cider.

What am I missing here?

Iain
  • 300
  • 2
  • 13

1 Answers1

1

I seems you are not using ciders nrepl but luminus-nrepl - therefor you get

not match cider-nrepl's version (nil)

if you create a luminus project like so

lein new luminus <project-name> +cider

the warning should disappear.


addendum, lein deps :tree (which was a good approach to analyse the problem)

without +cider

[luminus-nrepl "0.1.4"]
[org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]

with +cider

[cider/cider-nrepl "0.15.0-20170626.002218-19"]
[luminus-nrepl "0.1.4"]
[org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
birdspider
  • 3,034
  • 1
  • 16
  • 25
  • Although this fixed it for me (thanks @birdspider) It might be useful to add what the +cider option actually does so that it can be added by hand to an established project. I created 2 new projects and ran a diff on them to see. The only changes are in the project file where `cider/cider-nrepl` is added to the dependancies and `cider-nrepl/cider-middleware` is added to the `:nrepl-middleware` – Iain Jun 27 '17 at 00:51
  • @Iain, true - but at that point I assumed you consulted/would consult 1) the [doc](https://github.com/luminus-framework/luminus-template#misc) and 2) the [source](https://github.com/luminus-framework/luminus-template/blob/master/src/leiningen/new/cider.clj) – birdspider Jun 27 '17 at 11:19