emezeske / lein-cljsbuild

Leiningen plugin to make ClojureScript development easy.
Other
1.1k stars 151 forks source link

lein-cljsbuild 1.0.3 blows up with NPE #304

Closed keeds closed 10 years ago

keeds commented 10 years ago

creating a fresh project with lein new mies .... and changing project.clj to:

(defproject cljsbuild-test "0.1.0-SNAPSHOT"
  :description "FIXME: write this!"
  :url "http://example.com/FIXME"

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-2199"]]

  :plugins [[lein-cljsbuild "1.0.3"]]

  :source-paths ["src"]

  :cljsbuild { 
    :builds [{:id "cljsbuild-test"
              :source-paths ["src"]
              :compiler {
                :output-to "cljsbuild_test.js"
                :output-dir "out"
                :optimizations :none
                :source-map true}}]})

lein cljsbuild once results in:

java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
        at java.util.regex.Matcher.reset(Matcher.java:308)
        at java.util.regex.Matcher.<init>(Matcher.java:228)
        at java.util.regex.Pattern.matcher(Pattern.java:1088)
        at clojure.core$re_matcher.invoke(core.clj:4386)
        at clojure.core$re_matches.invoke(core.clj:4423)
        at cljsbuild.compat$parse_version.invoke(compat.clj:16)
        at clojure.core$map$fn__4207.invoke(core.clj:2485)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.lang.RT.nthFrom(RT.java:848)
        at clojure.lang.RT.nth(RT.java:807)
        at cljsbuild.compat$version_in_range_QMARK_.invoke(compat.clj:22)
        at leiningen.cljsbuild.subproject$merge_dependencies.invoke(subproject.clj:70)
        at leiningen.cljsbuild.subproject$make_subproject.invoke(subproject.clj:101)
        at leiningen.cljsbuild$run_local_project.invoke(cljsbuild.clj:23)
        at leiningen.cljsbuild$run_compiler.invoke(cljsbuild.clj:56)
        at leiningen.cljsbuild$once.invoke(cljsbuild.clj:123)
        at leiningen.cljsbuild$cljsbuild.doInvoke(cljsbuild.clj:215)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
        at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
        at leiningen.core.main$_main.doInvoke(main.clj:290)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.main$main_opt.invoke(main.clj:335)
        at clojure.main$main.doInvoke(main.clj:440)
        at clojure.lang.RestFn.invoke(RestFn.java:457)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
cemerick commented 10 years ago

Yeah, known wrinkle with the cljs-compat stuff. It's a transient thing that will last only until lein downloads the latest cljs-compat SNAPSHOT. See #287 for the workaround.

cemerick commented 10 years ago

This is now resolved, fix available in 1.0.4-SNAPSHOT.