bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

Figwheel fails to recognize Java version - issues bad warning #732

Closed cloojure closed 5 years ago

cloojure commented 5 years ago

Running Figwheel with Java 12 produces:

> lein figwheel
Figwheel: Cutting some fruit, just a sec ...
Assert failed: Java >= 1.8.0 - Figwheel requires Java 1.8.0 at least. Current version  12
  Please install Java 1.8.0 at least.
  This may only be occuring in the Leiningen (bootstrapping) process but still something to be aware of.
  Especially if this message is immediately followed by an strange stack trace.

However lein reports the truth:

> lein version
Leiningen 2.9.1 on Java 12 Java HotSpot(TM) 64-Bit Server VM

Looks like a tweak is needed in Java version parsing.

danielcompton commented 5 years ago

Which version of Figwheel are you using? I thought this would have been fixed in https://github.com/bhauman/lein-figwheel/pull/721.

cloojure commented 5 years ago

> lein deps :tree |& grep figwheel [figwheel-sidecar "0.5.18" :exclusions [[selmer] [org.clojure/clojurescript] [org.clojure/clojure]]] [figwheel "0.5.18" :exclusions [[org.clojure/tools.reader]]]

> lein deps :plugin-tree |& grep figwheel [lein-figwheel "0.5.18"]

bhauman commented 5 years ago

yeah @danielcompton it fails for this case (compare-semver "12" "1.8.0")

bhauman commented 5 years ago

and (semver->map "12") => {:major nil, :minor nil, :patch nil} because we are requiring the 3 numbers but the error indicates that his version of java is only supplying 12

danielcompton commented 5 years ago

Thanks, I didn’t expect that case ☺️