leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
enn 2019-08-28T15:41:25.002200Z

Do version numbers specified in managed dependencies apply to transitive dependencies? That is, if I specify [foo "0.2.0"] in :managed-dependencies in my project, and also have a dependency on a third-party library bar which depends on [foo "0.1.0"], will Leiningen/Maven use 0.1.0 or 0.2.0?

2019-08-28T15:58:35.002500Z

@enn I believe that is the case, but have to dig a bit to see that

2019-08-28T15:58:41.002700Z

should be a really easy test case to try out though

2019-08-28T16:06:59.003500Z

@enn

(defproject mikerod/demo-it "0.1.0-SNAPSHOT"
  :managed-dependencies [[commons-codec "1.13"]] ;; clj-http uses `[commons-codec "1.10"]` transitively
  :dependencies [[clj-http "3.7.0"]])
lein deps :tree
[clj-http "3.7.0"]
   [commons-codec "1.13" :exclusions [[org.clojure/clojure]]]
(defproject mikerod/demo-it "0.1.0-SNAPSHOT"
  ;;:managed-dependencies [[commons-codec "1.13"]] ;; <---- commented this out to show diff

  :dependencies [[clj-http "3.7.0"]])
lein deps :tree
[clj-http "3.7.0"]
   [commons-codec "1.10" :exclusions [[org.clojure/clojure]]]
lein -v
Leiningen 2.8.3 on Java 1.8.0_112 Java HotSpot(TM) 64-Bit Server VM
I don’t think this has changed any time recently either.

2019-08-28T16:08:00.004Z

it mostly comes down to the com.cemerick/pomegranate impl’s use of the underlying org.eclipse.aether/aether lib

2019-08-28T16:09:09.004300Z

I do wish this was documented more clearly

2019-08-28T16:09:21.004600Z

or had a test case in leiningen-core tests, but I don’t see one

enn 2019-08-28T16:44:09.005Z

Nice, thank you. That's what I was hoping.

🎉 1