taoensso / faraday

Amazon DynamoDB client for Clojure
https://www.taoensso.com/faraday
Eclipse Public License 1.0
238 stars 84 forks source link

Adding faraday dependency causes very slow lein builds #27

Closed joelittlejohn closed 10 years ago

joelittlejohn commented 10 years ago

When adding faraday to a lein project, I've found that lein becomes very slow to resolve dependencies. With faraday present lein deps :tree takes around 5 minutes for me, without faraday present the same call returns instantly.

I tracked this down to the following transitive dependency:

[com.taoensso/faraday "1.1.1"] 
    -> [com.amazonaws/aws-java-sdk "1.7.1"]
        -> [joda-time "[2.2,)"]

It appears that lein/aether handles dependency ranges very badly. I found this post that sheds some light on things:

http://nelsonmorris.net/2012/07/31/do-not-use-version-ranges-in-project-clj.html

I've fixed this using an exclusion for joda-time on faraday (I use clj-time in my project and this has an explicit dependency on joda-time anyway):

[com.taoensso/faraday "1.1.1" :exclusions [joda-time]]

but other people here have hit the same problem as soon as they start using faraday.

This isn't a problem with this library, but it certainly feels like one when new users add this dependency to their project. I wonder if it would be worthwhile overriding this range with a specific joda-time version?

joelittlejohn commented 10 years ago

Note, this is a snippet from the output when running lein deps :tree on the faraday project:

WARNING!!! version ranges found for:
[com.amazonaws/aws-java-sdk "1.7.1"] -> [joda-time "[2.2,)"]
Consider using [com.amazonaws/aws-java-sdk "1.7.1" :exclusions [joda-time]].
ptaoussanis commented 10 years ago

Hi Joe, this is a good catch, thanks for bringing it up!

I wonder if it would be worthwhile overriding this range with a specific joda-time version?

Sounds good to me. For reference, clj-time uses 2.3. Can I leave you to make this change?

joelittlejohn commented 10 years ago

:thumbsup:

joelittlejohn commented 10 years ago

I guess Closes #27. only works on master :)

ptaoussanis commented 10 years ago

Great, thanks Joe!