lein

Managing dependencies in clojure

clojure lein code

Today I was having a hard time to load a nice lib for managing excel files (https://github.com/mjul/docjure). I was having some weird problems at loading them in cider (btw, if you don’t use it, start now!).

I gave some search into it, and lein has a nice feature to handle dependencies. The command that saved me this time was:

lein deps :tree

It gave me a quick report on what was strange with the dependencies. Some examples:

1Possibly confusing dependencies found:
2[metosin/compojure-api "2.0.0-alpha30"] -> [com.fasterxml.jackson.datatype/jackson-datatype-joda "2.9.8"] -> [joda-time "2.7"]
3 overrides
4[midje "1.9.9"] -> [clj-time "0.15.1" :exclusions [org.clojure/clojure]] -> [joda-time "2.10"]
5
6Consider using these exclusions:
7[midje "1.9.9" :exclusions [joda-time]]
Possibly confusing dependencies found:
[metosin/compojure-api "2.0.0-alpha30"] -> [com.fasterxml.jackson.datatype/jackson-datatype-joda "2.9.8"] -> [joda-time "2.7"]
 overrides
[midje "1.9.9"] -> [clj-time "0.15.1" :exclusions [org.clojure/clojure]] -> [joda-time "2.10"]

Consider using these exclusions:
[midje "1.9.9" :exclusions [joda-time]]

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Managing dependencies in clojure