Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIDER's version (0.12.0) does not match cider-nrepl's version (nil) #1728

Closed
naipmoro opened this issue May 2, 2016 · 17 comments
Closed

CIDER's version (0.12.0) does not match cider-nrepl's version (nil) #1728

naipmoro opened this issue May 2, 2016 · 17 comments

Comments

@naipmoro
Copy link

naipmoro commented May 2, 2016

I am using the latest melpa-stable release of cider on a clean install
of emacs 24.5.1 on ubuntu 16.04.

When I cider-jack-in I get:
;; CIDER 0.12.0 (Seattle), nREPL 0.2.12
;; Clojure 1.7.0, Java 1.8.0_03-Ubuntu
WARNING: CIDER's version (0.12.0) does not match cider-nrepl's version (nil). Things will break!

So I figured I'd do this manually (following the docs):
(setq cider-inject-dependencies-at-jack-in nil)
then add
{:repl {:plugins [[cider/cider-nrepl "0.12.0"]]}} to ~/.lein/profiles.clj

No, that doesn't work either. Same warning.

But if I add the plugin to :user instead of :repl (which the docs say
I shouldn't do "as this way CIDER's middleware will always get loaded,
causing lein to start slower), I avoid the warning.

If the plugin is in :user, it doesn't matter whether cider-inject-dependencies-at-jack-in
is nil or not, the warning is gone.

I should also note that the same happens on windows 7-64 bit, but I don't really care.

@Malabarba
Copy link
Member

Do you have any other plugin under the user profile?

@naipmoro
Copy link
Author

naipmoro commented May 3, 2016

Yes, here they are:
{:user {:plugins
[[lein-pprint "1.1.2"]
[lein-newnew "0.3.7"]
[lein-ancient "0.6.10"]
[lein-localrepo "0.5.3"]
[lein-grep "0.1.1"]
[lein-clojars "0.9.1"]
[lein-midje "3.2"]
[lein-difftest "2.0.0"]
[codox "0.9.4"]
[lein-gorilla "0.3.6"]
[com.jakemccrary/lein-test-refresh "0.14.0"]
[lein-collisions "0.1.4"]
[venantius/yagni "0.1.4"]
[cider/cider-nrepl "0.12.0"]]}}

@Malabarba
Copy link
Member

Just exploring the possibilities here. Could you try removing your profiles.clj file completely?
Does cider-jack-in work automatically if you do that? (don't forget to leave cider-inject-dependencies-at-jack-in as t.)

@naipmoro
Copy link
Author

naipmoro commented May 3, 2016

Thank you for your help. The problem turned out to be the [lein-gorilla "0.3.6"] plugin.
Unfortunately that's the most up-to-date version. I now recall previous conflicts between
gorilla and cider.

@bbatsov
Copy link
Member

bbatsov commented May 3, 2016

They used to bundle some version of cider-nrepl with the gorilla plugin. Not sure what's the state of things today.

@limist
Copy link

limist commented May 12, 2016

I'm seeing the same error message upon M-x cider-connect, but with different starting conditions: I'm using boot, and after upgrading cider in emacs to 0.12.0, and cider-nrepl to 0.12.0, have this in my profile.boot,

(deftask cider "CIDER profile"
  []
  (require 'boot.repl)
  (swap! @(resolve 'boot.repl/*default-dependencies*)
         concat '[[org.clojure/tools.nrepl "0.2.12"]
                  [cider/cider-nrepl "0.12.0"]
                  [refactor-nrepl "2.2.0"]])
  (swap! @(resolve 'boot.repl/*default-middleware*)
         concat '[cider.nrepl/cider-middleware
                  refactor-nrepl.middleware/wrap-refactor])
  identity)

Looking into refactor-nrepl it's pulling in cider-nrepl 0.10, could that be causing the problem? If so, will refactor-nrepl dependencies get bumped up anytime soon? Thanks!

@limist
Copy link

limist commented May 12, 2016

Update: i tried removing refactor-nrepl references in the above, and still get the same error message. Any suggestions for fixing this please? Thanks in advance.

@Malabarba
Copy link
Member

How are you starting the repl? Are there any other tasks being used? What's the content of your *nrepl-messages ...* buffer immeditaly afterconecting?

@limist
Copy link

limist commented May 12, 2016

Hi @Malabarba,

  • Starting the repl at the command line with boot dev-repl which is just boot repl and setting some app-specific environment vars.
  • Other tasks: not that i know of.
  • *nrepl-messages...* looks like,
(--> 
  op  "clone"
  id  "1"
)
(<-- 
  id  "1"
  new-session  "11031d29-d16d-4053-b378-8f63f06151c1"
  session  "10ce5b17-a442-480d-89a8-9548ae440e70"
  status  ("done")
)
(--> 
  op  "clone"
  id  "2"
)
(<-- 
  id  "2"
  new-session  "76cd5629-e50d-4e3f-8b10-98c952a36b85"
  session  "ea6e57d8-dfef-4823-a909-4d18393366f1"
  status  ("done")
)
(--> 
  op  "describe"
  session  "11031d29-d16d-4053-b378-8f63f06151c1"
  id  "3"
)
(<-- 
  id  "3"
  ops  (dict 
         apropos  (dict)
         cider-version  (dict)
         classpath  (dict)
         clone  (dict)
         close  (dict)
         complete  (dict)
         complete-doc  (dict)
         debug-input  (dict)
         debug-instrumented-defs  (dict)
         debug-middleware  (dict)
         describe  (dict)
         eldoc  (dict)
         eval  (dict)
         format-code  (dict)
         format-edn  (dict)
         info  (dict)
         init-debugger  (dict)
         inspect-next-page  (dict)
         inspect-pop  (dict)
         inspect-prev-page  (dict)
         inspect-push  (dict)
         inspect-refresh  (dict)
         inspect-set-page-size  (dict)
         interrupt  (dict)
         load-file  (dict)
         ls-sessions  (dict)
         macroexpand  (dict)
         ns-list  (dict)
         ns-list-vars-by-name  (dict)
         ns-load-all  (dict)
         ns-path  (dict)
         ns-vars  (dict)
         out-subscribe  (dict)
         out-unsubscribe  (dict)
         pprint-middleware  (dict)
         refresh  (dict)
         refresh-all  (dict)
         refresh-clear  (dict)
         resource  (dict)
         resources-list  (dict)
         retest  (dict)
         stacktrace  (dict)
         stdin  (dict)
         test  (dict)
         test-all  (dict)
         test-stacktrace  (dict)
         toggle-trace-ns  (dict)
         toggle-trace-var  (dict)
         track-state-middleware  (dict)
         undef  (dict))
  session  "11031d29-d16d-4053-b378-8f63f06151c1"
  status  ("done")
  versions  (dict 
              clojure  (dict 
                         incremental  0
                         major  1
                         minor  7)
              nrepl  (dict 
                       incremental  "3"
                       major  "0"
                       minor  "2"
                       qualifier  ""
                       version-string  "0.2.3"))
)
(--> 
  op  "eval"
  session  "11031d29-d16d-4053-b378-8f63f06151c1"
  code  "(str *ns*)"
  id  "4"
)
(<-- 
  id  "4"
  ns  "foo.repl"
  session  "11031d29-d16d-4053-b378-8f63f06151c1"
  value  "\"foo.repl\""
)
(<-- 
  id  "4"
  session  "11031d29-d16d-4053-b378-8f63f06151c1"
  status  ("done")
)
(--> 
  op  "eval"
  session  "11031d29-d16d-4053-b378-8f63f06151c1"
  code  "(when (clojure.core/resolve 'clojure.main/repl-requires)\n      (clojure.core/map clojure.core/require clojure.main/repl-requires))"
  id  "5"
)

...plus a lot more stuff, too long to put here (unless you think it would help).

@Malabarba
Copy link
Member

Here's the problem:

nrepl  (dict 
        incremental  "3"
        major  "0"
        minor  "2"
        qualifier  ""
        version-string  "0.2.3")

nrepl version should be 0.2.12. It's possible one of your other tasks is conflicting here.

@Malabarba
Copy link
Member

Or, better, just make sure you have [org.clojure/tools.nrepl "0.2.12" :scope "test"] in your project's dependencies.

@limist
Copy link

limist commented May 12, 2016

@Malabarba Thanks a lot for the quick help, doing boot show -d showed a library pulling in an old version of tools.nrepl that was shadowing the version specified in my profile.boot. All good for now ::-)

@echeran
Copy link

echeran commented May 19, 2016

Fwiw, I had the same problem when using Leiningen. Running lein deps :tree showed that I had the recommended versions of org.clojure/tools.nrepl and cider/cider-nrepl, but I got these warnings:

Warning: cider-nrepl requires Clojure 1.7 or greater.
Warning: cider-nrepl will not be included in your project.

Bumping Clojure from 1.6.0 to 1.8.0 in my project.clj did the trick. I don't get those error messages from Cider after cider-jack-in anymore.

@Malabarba
Copy link
Member

Thanks. Glad that the message helped you solve the problem.

@abhi18av
Copy link

abhi18av commented Aug 7, 2017

Hi everyone,

Google led me here since I seem to be having a similar problem.

The message that my cider env throws is

CIDER's version (0.15.1-snapshot) does not match cider-nrepl's version (nil) 

Here are the relevant contents of my build.boot

NOTE : the error message is thrown once I include core.typed - otherwise, it does work fine.

          :dependencies   '[[org.clojure/clojure "1.9.0-alpha17"]
                            [adzerk/boot-test "RELEASE" :scope "test"]
                            ;; Matrix stuff
                            [net.mikera/core.matrix "0.60.3"]
                            [net.mikera/vectorz-clj "0.47.0"]

                            ;; Asynchronous stuff
                            [org.clojure/core.async "0.3.443"]

                            ;; Pattern matching in clojure
                            [org.clojure/core.match "0.3.0-alpha5"]



                            ;; Typed clojure
                            ;; TODO Creates an issue with cider's nrepl - probably transitive dependency
                            ;[org.clojure/core.typed "0.4.0"]

                            ;; TODO Middleware - might help to mitige the cider error caused by core.typed
                            ;[org.clojure/tools.nrepl "0.2.12" :scope "test"]




                            ;; MiniKanren
                            [org.clojure/core.logic "0.8.11"]

                            ;; Clojure reader in clojure
                            [org.clojure/tools.reader "1.0.5"]

                            ;; Shell library
                            [me.raynes/conch "0.8.0"]])

I've tried to remedy it with a ~/.boot/profile.boot

 (require 'boot.repl)
  
   (swap! boot.repl/*default-dependencies*
          concat '[[cider/cider-nrepl "0.15.1-SNAPSHOT"]])
  
   (swap! boot.repl/*default-middleware*
          conj 'cider.nrepl/cider-middleware)

Sadly, this doesn't seem to be working 😞

@jmckitrick
Copy link
Contributor

I'm seeing the same thing using leiningen. When I remove my dependency on core.typed from the project, everything is fine. Otherwise, I see the same error from CIDER.

@bbatsov
Copy link
Member

bbatsov commented Dec 18, 2017

@jmckitrick Likely some bad interaction with core.typed that deserves a dedicated issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants