cljfmt
cljfmt copied to clipboard
Clojure dependency mismatch (1.8.0 VS 1.10.0)
Hi,
Looks like there is a conflict in the version of Clojure when using lein-cljfmt plugin. If I enable :pedantic? :abort on my project I have the following error:
[lein-cljfmt "0.7.0"] -> [cljfmt "0.7.0"] -> [org.clojure/clojure "1.8.0"]
overrides
[lein-cljfmt "0.7.0"] -> [cljfmt "0.7.0"] -> [rewrite-cljs "0.4.5"] -> [org.clojure/clojure "1.10.0"]
That shouldn't be an issue. Leiningen/Maven will pick the closer Clojure dependency.
Thanks for your reply & sorry for the sparse issue. While it makes inclusion of lein-cljfmt plugin more complex in projects where :pedantic? :abort is defined, I'm also wondering if this could end up with weird runtime issues if rewrite-cljs uses Clojure functions added in 1.9 or 1.10 :thinking: ? I feel this would be safer if both relied on the same Clojure version.
If any functions were used that didn't exist, the ClojureScript wouldn't compile. Also, does :pedantic? :abort do that even if you've specified an explicit Clojure version in your project?
Yes Clojure version is explicit in my project.
Here is a sample project.clj which exhibit this error
(defproject empty-project "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "https://www.eclipse.org/legal/epl-2.0/"}
:dependencies [[org.clojure/clojure "1.10.1"]]
:main ^:skip-aot empty-project.core
:target-path "target/%s"
:pedantic? :abort
:profiles {:uberjar {:aot :all}}
:plugins [[lein-cljfmt "0.7.0"]])
Somehow leiningen treats differently plugins dependencies. I'm wondering if it should discard the :pedantic? setting?