bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

java.lang.NullPointerException #103

Closed sooheon closed 8 years ago

sooheon commented 8 years ago

Similar to, but with different stacktrace from #91.

WARNING: Replacing ClojureScript compiler option :main with automatically set value.
• output.js
Running cljs tests...java.lang.NullPointerException: 
                                        ...                          
                             doo.shell/exec!           shell.clj:   46
                                doo.shell/sh           shell.clj:   71
                         doo.core/run-script            core.clj:  253
                         doo.core/run-script            core.clj:  244
                                         ...                          
crisptrutski.boot-cljs-test/eval764/fn/fn/fn  boot_cljs_test.clj:  102
           adzerk.boot-cljs/eval389/fn/fn/fn       boot_cljs.clj:  201
           adzerk.boot-cljs/eval338/fn/fn/fn       boot_cljs.clj:  135
crisptrutski.boot-cljs-test/eval725/fn/fn/fn  boot_cljs_test.clj:   78
        boot.task.built-in/fn/fn/fn/fn/fn/fn        built_in.clj:  264
           boot.task.built-in/fn/fn/fn/fn/fn        built_in.clj:  264
              boot.task.built-in/fn/fn/fn/fn        built_in.clj:  261
                         boot.core/run-tasks            core.clj:  794
                           boot.core/boot/fn            core.clj:  804
         clojure.core/binding-conveyor-fn/fn            core.clj: 1916
                                         ...                          

Of note, I'm using boot, not lein. build.boot.

Specifically, adding the [cljs-ajax "0.5.4"] to :dependencies and :requiring ajax.core causes the NullPointerException while testing; I can confirm that it doesn't occur without those steps.

bensu commented 8 years ago

Hi @sooheon,

91 is a lein-doo issue where the plugin passes a bad :output-to to the script runner. While solving that, I left the assert at the plugin level but it might be more sensible to add it also inside of doo.core/run-script as to guard for your case as well.

As for the underlying cause of your problem, it is probably related to boot-cljs, boot-cljs-test, and your configuration rather than doo itself:

WARNING: Replacing ClojureScript compiler option :main with automatically set value. • output.js

Would you mind reporting the issue in boot-cljs-test and getting help with your config? If you find the problem is at the doo level, we can take review this issue and correct the problem.