clojure-vim / vim-jack-in

cider-jack-in for vim
57 stars 8 forks source link

Use boot's -x option to exclude transitive org.clojure/clojure version dependency #1

Closed daveyarwood closed 6 years ago

daveyarwood commented 6 years ago

refactor-nrepl has numerous dependencies which, themselves, have transitive dependencies on specific versions of Clojure. This results in Boot giving warnings like:

Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading
version 1.4.0

when you start a REPL with refactor-nrepl injected, like we're doing here.

I saw that Boot has this option:

-x --exclude-clojure        Add org.clojure/clojure to the set of global exclusions.

I think this is exactly what we want to do. We don't want our middleware's dependencies' transitive dependencies on specific Clojure versions to interfere with the Clojure project we're actually working on.

In practice, I don't think it hurts anything to allow these transitive dependencies, because Boot is clearly NOT loading another version of Clojure after it's already been loaded, but I think it would be nice to use this flag so that we can avoid the warning appearing in the REPL every time.

NB: I tested this change locally and can confirm the warnings go away.

SevereOverfl0w commented 6 years ago

I appreciate the thorough checking you've done for this. I wasn't certain at first, but this seems fine, thanks!