Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example fails to compile when clojurescript and lein-cljsbuild versions are upgraded #2

Closed
kahunamoore opened this issue Jan 26, 2015 · 2 comments

Comments

@kahunamoore
Copy link

Steps to reproduce:

  1. Clone examples repo
  2. Change to the following dependencies:
:dependencies [ ...
[org.clojure/clojurescript "0.0-2371"] ;2156 - original
...]

:plugins [[lein-cljsbuild "1.0.3"]] ;1.0.0 - original
  1. Expected: Successful compile
  2. Observed: NullPointerException - see below

$ git clone https://github.com/rbrush/clara-examples.git
Cloning into 'clara-examples'...
remote: Counting objects: 151, done.
remote: Total 151 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (151/151), 20.12 KiB | 0 bytes/s, done.
Resolving deltas: 100% (50/50), done.
Checking connectivity... done.
$ cd clara-examples
$ lein cljsbuild once
Compiling ClojureScript.
Compiling "resources/public/js/examples.js" from ["src/main/clojurescript"]...
Jan 25, 2015 11:09:17 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/alanm/projects/clara-examples/target/cljsbuild-compiler-0/schema/core.js:853: WARNING - References to the global RegExp object prevents optimization of regular expressions.
schema.core.Regex = RegExp;
                    ^

Jan 25, 2015 11:09:17 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 1 warning(s)
Successfully compiled "resources/public/js/examples.js" in 40.734713 seconds.

$ lein clean
Deleting files generated by lein-cljsbuild.

$ echo changed project.clj
changed project.clj

$ lein cljsbuild once
Compiling ClojureScript.
Compiling "resources/public/js/examples.js" from ["src/main/clojurescript"]...
Compiling "resources/public/js/examples.js" failed.
clojure.lang.ExceptionInfo:  {:tag :cljs/analysis-error}
    at clojure.core$ex_info.invoke(core.clj:4327)
    at cljs.analyzer$error.invoke(analyzer.clj:287)
    at cljs.analyzer$analyze.invoke(analyzer.clj:1571)
    at cljs.analyzer$parse_ns$fn__1755$fn__1756.invoke(analyzer.clj:1642)
    at cljs.analyzer$parse_ns$fn__1755.invoke(analyzer.clj:1642)
    at cljs.analyzer$parse_ns.invoke(analyzer.clj:1637)
    at cljs.analyzer$parse_ns.invoke(analyzer.clj:1632)
    at cljs.compiler$compile_root.invoke(compiler.clj:1005)
    at cljs.closure$compile_dir.invoke(closure.clj:343)
    at cljs.closure$eval3071$fn__3072.invoke(closure.clj:383)
    at cljs.closure$eval3006$fn__3007$G__2997__3014.invoke(closure.clj:293)
    at cljs.closure$eval3058$fn__3059.invoke(closure.clj:397)
    at cljs.closure$eval3006$fn__3007$G__2997__3014.invoke(closure.clj:293)
    at cljsbuild.compiler.SourcePaths$fn__3269.invoke(compiler.clj:44)
    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.core$seq.invoke(core.clj:133)
    at clojure.core$apply.invoke(core.clj:617)
    at clojure.core$mapcat.doInvoke(core.clj:2514)
    at clojure.lang.RestFn.invoke(RestFn.java:423)
    at cljsbuild.compiler.SourcePaths._compile(compiler.clj:44)
    at cljs.closure$build.invoke(closure.clj:962)
    at cljs.closure$build.invoke(closure.clj:928)
    at cljsbuild.compiler$compile_cljs$fn__3280.invoke(compiler.clj:58)
    at cljsbuild.compiler$compile_cljs.invoke(compiler.clj:57)
    at cljsbuild.compiler$run_compiler.invoke(compiler.clj:159)
    at user$eval3406$iter__3424__3428$fn__3429$fn__3441.invoke(form-init1116806015832199295.clj:1)
    at user$eval3406$iter__3424__3428$fn__3429.invoke(form-init1116806015832199295.clj:1)
    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.core$seq.invoke(core.clj:133)
    at clojure.core$dorun.invoke(core.clj:2780)
    at clojure.core$doall.invoke(core.clj:2796)
    at user$eval3406.invoke(form-init1116806015832199295.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6619)
    at clojure.lang.Compiler.eval(Compiler.java:6609)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.Compiler.loadFile(Compiler.java:7020)
    at clojure.main$load_script.invoke(main.clj:294)
    at clojure.main$init_opt.invoke(main.clj:299)
    at clojure.main$initialize.invoke(main.clj:327)
    at clojure.main$null_opt.invoke(main.clj:362)
    at clojure.main$main.doInvoke(main.clj:440)
    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.main.main(main.java:37)
Caused by: java.lang.NullPointerException
    at cljs.core$import_macros$fn__3479.invoke(core.clj:49)
    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.core$seq.invoke(core.clj:133)
    at clojure.core$map$fn__4211.invoke(core.clj:2490)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:67)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$concat$cat__3925$fn__3926.invoke(core.clj:687)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.next(RT.java:598)
    at clojure.lang.Compiler.eval(Compiler.java:6606)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.RT.loadResourceScript(RT.java:370)
    at clojure.lang.RT.loadResourceScript(RT.java:361)
    at clojure.lang.RT.load(RT.java:440)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5018.invoke(core.clj:5530)
    at clojure.core$load.doInvoke(core.clj:5529)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at cljs.analyzer$load_core.invoke(analyzer.clj:229)
    at cljs.analyzer$analyze$fn__1738.invoke(analyzer.clj:1577)
    at cljs.analyzer$analyze.invoke(analyzer.clj:1573)
    ... 48 more
Subprocess failed
@rbrush
Copy link
Contributor

rbrush commented Jan 27, 2015

I think this is fixed in the commit below, and available on clara-rules-0.9.0-SNAPSHOT up on the Sonatype snapshot repository. I also updated clara-examples to pull in that version of clara-rules and a newer version of ClojureScript.

I didn't track down the above stack trace, but found that clara-rules broke when upgrading ClojureScript because of a small change ClojureScript had to some of its internal structure. The commit linked below fixed it and appears to fix the above problem as well.

oracle-samples/clara-rules@d3f08b6

@kahunamoore
Copy link
Author

Yes, this fixed it - thanks!

Closing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants