venantius / ultra

A Leiningen plugin for a superior development environment
Eclipse Public License 1.0
1.24k stars 35 forks source link

Java 7 is not supported #70

Closed barkanido closed 7 years ago

barkanido commented 7 years ago

using ultra 0.5.0, when running lein repl I get: Exception in thread "main" java.lang.UnsupportedClassVersionError: clj_antlr/ParseError : Unsupported major.minor version 52.0, compiling:(clj_antlr/common.clj:1:1) my ~/.lein/profile:

{:user  {:plugins  [[cider/cider-nrepl "0.14.0"]
                     [jonase/eastwood "0.2.3"]                                                                                  
                     [lein-ancient "0.6.10"]
                     [lein-kibit "0.1.2" :exclusions [org.clojure/clojure]]
                     [venantius/ultra "0.5.0"]
                     [com.jakemccrary/lein-test-refresh "0.18.0"]
                     [lein-cloverage "1.0.9"]]}}

java version "1.7.0_80" lein deps tree shows:

...
[venantius/ultra "0.5.0"]
   [grimradical/clj-semver "0.3.0" :exclusions [[org.clojure/clojure]]]
   [mvxcvi/puget "1.0.1"]
     [fipp "0.6.6"]
       [org.clojure/core.rrb-vector "0.0.11"]
     [mvxcvi/arrangement "1.1.0"]
   [mvxcvi/whidbey "1.3.0"]
     [org.clojure/data.codec "0.1.0"]
   [org.clojars.brenton/google-diff-match-patch "0.1"]
   [robert/hooke "1.3.0"]
   [venantius/glow "0.1.4" :exclusions [[hiccup] [garden]]]
     [clj-antlr "0.2.3"]
       [org.antlr/antlr4-runtime "4.5.3"]
       [org.antlr/antlr4 "4.5.3"]
...

commenting out the ultra dependency in profiles solves it.

venantius commented 7 years ago

Hmm. I think upgrading to JDK 8 should resolve this. I should probably update the README to require JDK 8, it's been out for a while now.

barkanido commented 7 years ago

Isn't it easy to support Java 7?

venantius commented 7 years ago

No.

Specifically, in this case the exception you've gotten indicates that an upstream dependency (clj-antlr or one of it's dependencies) was compiled with Java 8, which Java 7 won't be able to parse at runtime. This Java 8-compiled dependency was then uploaded to Clojars or one of the other public artifact repositories, which means it is not within Ultra's control.

If you wanted to, you could go and download the relevant source code locally and try to compile it with Java 7 and install it to your local Maven dependency cache, at which point you should be able to install and run Ultra without requiring Java 8. But the simplest thing to do would be just to move to Java 8.

venantius commented 7 years ago

Closing this issue now that I've updated the README.