clojure-emacs / squiggly-clojure

Flycheck checker for Clojure, using eastwood and core.typed.
GNU General Public License v3.0
204 stars 25 forks source link

Dependency issue: CIDER warning: "version x.y.z does not match cider-nrepl's version" #45

Closed mrroman closed 7 years ago

mrroman commented 7 years ago

When I install squiggly-clojure and flycheck-clojure in the Emacs, CIDER reports a warning:

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

I've tried sending with CIDER a request by (nrepl-send-sync-request '("op" "describe") (current-buffer)) and it doesn’t return aux dictionary.

I have Leiningen 2.7.1 and I use cider-stable. It has to be a dependency issue, because after removing squiggly dependencies, CIDER doesn't report error.

mrroman commented 7 years ago

Hi,

I don't have profiles.clj file. CIDER runs leiningen with this command:

/usr/local/bin/lein update-in :dependencies conj [acyclic/squiggly-clojure "0.1.7"] -- update-in :dependencies conj [org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]] -- update-in :plugins conj [refactor-nrepl "2.3.0-SNAPSHOT"] -- update-in :plugins conj [cider/cider-nrepl "0.15.0-SNAPSHOT"] -- repl :headless

I've tried to isolate the issue and you can reproduce the issue with:

lein new some-project

My emacs settings are available here: https://github.com/mrroman/emacs.d.

PS. I don't see your comment added to github issue.

śr., 15 lut 2017 o 11:57 użytkownik Lars Andersen notifications@github.com napisał:

When I install squiggly-clojure and flycheck-clojure

This is the same project. Squiggly-clojure was the old name for the project.

How are you installing it? What does your profiles.clj look like? Is it broken in a lein new test project or just the project you're working on now? If so, what's that's project project.clj

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/45#issuecomment-279980419, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGAhs3hDfHYSTJTv7voODX7lgrTLaRwks5rctoVgaJpZM4MBkST .

pnf commented 7 years ago

Could you try removing the (use-package flycheck-clojure ...) and verifying that you can now cider-jack-in without error?

mrroman commented 7 years ago

Yes. I did that and the warning disappeared.

pnf commented 7 years ago

Odd. Could you try running, outside of emacs

/usr/local/bin/lein update-in :dependencies conj [acyclic/squiggly-clojure "0.1.7"] -- update-in :dependencies conj [org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]] -- update-in :plugins conj [refactor-nrepl "2.3.0-SNAPSHOT"] -- update-in :plugins conj [cider/cider-nrepl "0.15.0-SNAPSHOT"] -- deps :tree

On Feb 16, 2017, at 3:58 PM, Konrad Mrożek notifications@github.com wrote:

Yes. I did that and the warning disappeared.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

mrroman commented 7 years ago

Here is the output:

Possibly confusing dependencies found:
[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]
 overrides
[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]

Consider using these exclusions:

 [acyclic/squiggly-clojure "0.1.7"]
   [environ "1.0.0"]
   [jonase/eastwood "0.2.3" :exclusions [[org.clojure/clojure]]]
     [org.clojars.brenton/google-diff-match-patch "0.1"]
     [org.ow2.asm/asm-all "4.2"]
   [jonase/kibit "0.1.3"]
     [org.clojure/core.logic "0.8.11"]
     [org.clojure/tools.cli "0.3.5"]
   [org.clojure/core.typed "0.3.26" :exclusions [[org.clojure/clojure]]]
     [org.clojure/core.cache "0.6.4"]
       [org.clojure/data.priority-map "0.0.4"]
     [org.clojure/core.typed.rt "0.3.26"]
     [org.clojure/math.combinatorics "0.1.3" :exclusions [[org.clojure/clojure]]]
     [org.clojure/tools.analyzer.jvm "0.6.8"]
       [org.clojure/core.memoize "0.5.7"]
       [org.clojure/tools.analyzer "0.6.7"]
     [org.clojure/tools.namespace "0.3.0-alpha3"]
       [org.clojure/java.classpath "0.2.3"]
     [org.clojure/tools.reader "1.0.0-beta3"]
   [org.clojure/data.json "0.2.6"]
 [cider/cider-nrepl "0.15.0-20170207.071608-9"]
   [org.tcrawley/dynapath "0.2.5" :exclusions [[org.clojure/clojure]]]
 [clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
 [org.clojure/clojure "1.8.0"]
 [org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
 [refactor-nrepl "2.3.0-20170210.162113-13"]
mrroman commented 7 years ago

The same without squiggly:

Possibly confusing dependencies found:
[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]
 overrides
[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]

Consider using these exclusions:

 [cider/cider-nrepl "0.15.0-20170207.071608-9"]
   [org.tcrawley/dynapath "0.2.5" :exclusions [[org.clojure/clojure]]]
 [clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
 [org.clojure/clojure "1.8.0"]
 [org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
 [refactor-nrepl "2.3.0-20170210.162113-13"]
pnf commented 7 years ago

I can replicate this now. For some reason, the error does not occur when I specify dependencies in an equivalent profiles.clj, and since that's how I usually operate, I wouldn't normally encounter this. Since the version of cider-nrepl as reported by lein deps is in fact correct, I don't know that the cider warning is correct, and in fact I haven't seen any indication myself that "things will break".

Have you noticed any problems beyond the frightening warning from cider?

mrroman commented 7 years ago

I don't write those dependencies in the profiles.clj, because it causes longer lein startup. I didn't check that thorough the consequences. I'm trying to investigate now, why "describe" opcode doesn't return the :aux section :).

pnf commented 7 years ago

Put the dependencies in the :repl profile, and they won't affect lein startup for other uses.

mrroman commented 7 years ago

I wanted to use lein repl without loading cider-nrepl etc. :). I've isolated the problem. The issue is caused by core.typed "0.3.26". When I downgraded it to core.typed "0.3.7", the warning was gone.

I've isolated it further and it seems that it broke between core.typed 0.3.25 and 0.3.26.

pnf commented 7 years ago

Did you see anything broken other than the "things will break" message?

pnf commented 7 years ago

This seems to be related to AOT jars introduced with 0.3.26 @frenchy64 suggested adding :classifier "slim" after the "0.3.32" and indeed that "fixes" the problem (though I still don't know why).

pnf commented 7 years ago

Latest update to squiggly 0.1.9-SNAPSHOT contains this and a few other changes.