emezeske/lein-cljsbuild — pull request #312 by ivan (2014-05-18 06:29:01+00:00)
Title: Warn instead of crash when ClojureScript dependency is a SNAPSHOT version

This fixes the crash (traceback below) that occurs when you have a `[org.clojure/clojurescript "0.0-SNAPSHOT"]` dependency.

I didn't opt to treat SNAPSHOT as a "99999" version because a SNAPSHOT can be too old, too new, or just plain broken. Hopefully the people depending on a SNAPSHOT version of ClojureScript know what they're doing and won't be surprised if lein-cljsbuild is not compatible with it. The warning should remind them, anyway.

```
java.lang.NumberFormatException: For input string: "SNAPSHOT"
at java.lang.NumberFormatException.forInputString (NumberFormatException.java:65)
java.lang.Long.parseLong (Long.java:589)
java.lang.Long.parseLong (Long.java:631)
cljsbuild.compat$parse_version.invoke (compat.clj:17)
clojure.core$map$fn__4245.invoke (core.clj:2557)
clojure.lang.LazySeq.sval (LazySeq.java:40)
clojure.lang.LazySeq.seq (LazySeq.java:49)
clojure.lang.RT.seq (RT.java:484)
clojure.lang.RT.nthFrom (RT.java:848)
clojure.lang.RT.nth (RT.java:807)
cljsbuild.compat$version_in_range_QMARK_.invoke (compat.clj:22)
leiningen.cljsbuild.subproject$merge_dependencies.invoke (subproject.clj:70)
leiningen.cljsbuild.subproject$make_subproject.invoke (subproject.clj:101)
leiningen.figwheel$run_local_project.invoke (figwheel.clj:25)
leiningen.figwheel$run_compiler.invoke (figwheel.clj:58)
leiningen.figwheel$figwheel.doInvoke (figwheel.clj:143)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.Var.invoke (Var.java:379)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invoke (core.clj:626)
leiningen.core.main$resolve_task$fn__1406.doInvoke (main.clj:221)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:626)
leiningen.core.main$apply_task.invoke (main.clj:262)
leiningen.core.main$resolve_and_apply.invoke (main.clj:266)
leiningen.core.main$_main$fn__1469.invoke (main.clj:336)
leiningen.core.main$_main.doInvoke (main.clj:323)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:379)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invoke (core.clj:624)
clojure.main$main_opt.invoke (main.clj:315)
clojure.main$main.doInvoke (main.clj:420)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)
```