-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Can no longer jack-in to an inherited clojure version #1824
Comments
@benedekfazekas can you check this? |
had a look. Don't quite understand the reason behind this yet. What I can see that if I set Pinged a question to the leiningen devs about this as well. @jimrthy
|
I did the steps until $ lein update-in :dependencies conj '[org.clojure/tools.nrepl "0.2.12"]' -- deps :tree
Possibly confusing dependencies found:
[org.clojure/tools.nrepl "0.2.12"]
overrides
[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]
Consider using these exclusions:
[org.clojure/tools.nrepl "0.2.12"] -> [org.clojure/clojure "1.2.0"]
overrides
[cider-transitive-version "0.1.0-SNAPSHOT"] -> [org.clojure/clojure "1.9.0-alpha10"]
Consider using these exclusions:
[cider-transitive-version "0.1.0-SNAPSHOT" :exclusions [org.clojure/clojure]]
[cider-transitive-version "0.1.0-SNAPSHOT"]
[clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
[org.clojure/tools.nrepl "0.2.12"]
[org.clojure/clojure "1.2.0"] The first confusing dependency can be ignored, but note that, since tools.nrepl doesn't specify an exclusion, the clojure dependency used by tools.nrepl overrides the transitive dependency from cider-transitive-version. A good solution would be to inject |
I think I tried to inject But this was a long time ago so don't quite recall the details. I shall try again. |
It won't fix #1665 unfortunately (the proper fix there is technomancy/leiningen#2074), but it will at least resolve this issue. |
It looks like the tools.nrepl injection is definitely the culprit. Adding (setq cider-inject-dependencies-at-jack-in nil) to my .emacs.d seems like a perfectly valid work-around. I didn't have any luck figuring out how to inject a version of tools.nrepl with that exclusion to override the one that cider injects. Managed dependencies is the Right Thing(TM) for what I'm doing anyway. It seemed to work fine with CIDER. Thanks for pointing it out! I'll be happy convert the example to boot (I've been meaning to play with it anyway) to see what happens, but I doubt I'll have a chance tonight. It seems like it might be worth documenting the work-arounds somewhere (maybe in the same caveat that mentions #1665 ?), but this seems ready to close to me. Thanks for such a wonderful tool! |
you're (and hyPiRion is) right. I am working on a fix for this atm.
nice one! would love to see a working example if it is public and you can share.
would be very helpful, yes please. it seems that current stable boot release does not have support for defining exclusions on the command line but the their master already has such an option! So you migrating your example to boot would enable me to test my patch for boot too using their master.
as i am working on a fix this won't be necessary. |
Add option to define exclusions for injected dependecies. Add `org.cloure/clojure` exclusion to `org.clojure/tools.nrepl` to mitigate problem with tools.nrepl clojure dependency. Note about boot: the latest stable release does not support defining depedency exclusions on the command line. However, this feature is available in the upcoming 2.7.x release. This feature will be added for boot when 2.7.x is released.
Add option to define exclusions for injected dependecies. Add `org.cloure/clojure` exclusion to `org.clojure/tools.nrepl` to mitigate problem with tools.nrepl clojure dependency. Note about boot: the latest stable release does not support defining depedency exclusions on the command line. However, this feature is available in the upcoming 2.7.x release. This feature will be added for boot when 2.7.x is released.
Sorry about the delay. https://github.com/jimrthy/clojure-introduction/tree/cider/broken-transitive-versions has the original problem example. https://github.com/jimrthy/clojure-introduction/tree/cider/transitive-clojure-version switches it to use lein's managed-dependencies. https://github.com/jimrthy/clojure-introduction/tree/cider/transitive-boot converts it to boot, which seems to work fine. https://github.com/jimrthy/frereth-client is the real-world project where I first saw the problem. It (along with a couple of others, which is the point) should get a bunch of library dependencies from https://github.com/jimrthy/frereth-common. I'm not sure what kind of state either's in. The past week has been pretty frantic. Thanks again! |
thanks for the work around this @jimrthy. I will defo check out your boot example. There is also a PR going on to fix this for lein (#1844) which is ready from my part I think it is up to @bbatsov or/and @Malabarba to say yeah/nay. |
@jimrthy as you see this got merged so should be fine with leiningen now. re. managed dependencies: checked it out (being curious) looks cool. thx for putting it together. re. boot. it does work but both from cider and from CLI i get a repl with clojure 1.7.0. is not that a problem? |
Thanks very much! You're absolutely right about the version under boot. Until it works through their REPL, I don't think we can expect it to work with CIDER. :-) |
Expected behavior
Under 0.12.0 (and earlier), I could specify the clojure version in one library and then have other libraries/apps that depend on that one so I don't have to keep all the common library versions updated in various projects that use them.
This still seems to work fine under
lein repl
.Actual behavior
cider-jack-in results in a stack trace that basically starts with an error about nrepl-server-sentinel and "cider.nrepl.middleware.version: Too many arguments to def."
There are a bunch of "Unable to resolve symbol: some-> in this context" java.lang.Exceptions.
And then it ends with a "java.lang.Exception: Unable to resolve symbol: some? in this context."
The full stack trace is available at https://github.com/jimrthy/clojure-introduction/blob/cider/transitive-clojure-version/cider-transitive-version/README.md
Steps to reproduce the problem
Environment & Version information
CIDER version information
CIDER 0.13.0 (California), nREPL 0.2.12
Clojure 1.9.0-alpha10, Java 1.7.0_79
Lein version
2.6.1
Emacs version
GNU Emacs 24.3.1 (x86_64-px-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on lamiak, modified by Debian
Operating system
Ubuntu 14.04.3 LTS
The text was updated successfully, but these errors were encountered: