-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Managed dependencies with :exclusions are not merge into actual project dependencies for lein :deps commands. #2698
Comments
Can confirm this issue. This also comes into play when For instance, if we have the transitive dependencies: A -> B -> C_1.0 This should be resolved if we add the following:
However, |
I had trouble reproducing the OP, so I'll offer another reproduction: (defproject deps-tree-bug "0.1.0-SNAPSHOT"
:managed-dependencies [[com.gfredericks/test.chuck "0.2.10"
:exclusions [com.andrewmcveigh/cljs-time]]]
:dependencies [[com.gfredericks/test.chuck]])
I noticed that by adding a top-level (defproject deps-tree-bug "0.1.0-SNAPSHOT"
:exclusions [com.andrewmcveigh/cljs-time]
:managed-dependencies [[com.gfredericks/test.chuck "0.2.10"
:exclusions [com.andrewmcveigh/cljs-time]]]
:dependencies [[com.gfredericks/test.chuck]])
|
This seems to be linked to this call to The result seems to inherit the dep options from (cemerick.pomegranate.aether/merge-versions-from-managed-coords
'([com.gfredericks/test.chuck nil])
'[[com.gfredericks/test.chuck "0.2.10" :exclusions [com.andrewmcveigh/cljs-time]]])
;=> [[com.gfredericks/test.chuck "0.2.10"]] This result gets passed as the first argument of (cemerick.pomegranate.aether/dependency-hierarchy
'[[com.gfredericks/test.chuck "0.2.10"] ;; THE BUG: no exclusions!
[nrepl/nrepl "0.8.3" :exclusions ([org.clojure/clojure])]
[clojure-complete/clojure-complete "0.2.5" :exclusions ([org.clojure/clojure])]]
'{[com.gfredericks/test.chuck "0.2.10" :exclusions [[com.andrewmcveigh/cljs-time]]]
#{[clj-time "0.10.0"] [instaparse "1.3.6"] [org.clojure/test.check "0.10.0-RC1"]},
[clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]] nil,
[clj-time "0.10.0"] #{[joda-time "2.7"]},
[org.clojure/clojure "1.9.0"] #{[org.clojure/core.specs.alpha "0.1.24"]
[org.clojure/spec.alpha "0.1.143"]},
[nrepl "0.8.3" :exclusions [[org.clojure/clojure]]] nil,
[org.clojure/core.specs.alpha "0.1.24"] nil,
[joda-time "2.7"] nil,
[instaparse "1.3.6"] nil,
[org.clojure/test.check "0.10.0-RC1"] #{[org.clojure/clojure "1.9.0"]},
[org.clojure/spec.alpha "0.1.143"] nil}))
;=> {[clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]] nil,
; [nrepl "0.8.3" :exclusions [[org.clojure/clojure]]] nil} |
Perhaps this is just how pomegranate works. I think this feature request covers what we want to achieve via leiningen: to manage more than just the version in |
I think that's correct; Leiningen doesn't really do anything with managed dependencies other than pass them thru to pomegranate. |
Describe the bug
Managed dependencies with :exclusions are not correctly processed for lein deps :tree.
To Reproduce
lein deps :tree
:exclusions [com.github...]
from the clojure-solr dependency.lein deps :tree
Actual behavior
Managed dependencies with :exclusions are not merged for lein deps.
Expected behavior
Managed dependencies with :exclusions should be merged for lein deps in the same manner as they are for generating actual dependencies for the runtime classpath (i.e., what one sees in a generated pom.xml from
lein pom
).Environment
The text was updated successfully, but these errors were encountered: