Search code examples
clojureciderluminusnrepl

Cider version does not match cider-nrepl version in new luminus project


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?


Solution

  • 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]]]