Fork me on GitHub
#boot
<
2018-01-04
>
grzm03:01:12

well, one thing: once again bit by the "fake.class.path" not "java.class.path" issue in boot. So, updating cider-boot-parameters does work as expected

grzm05:01:11

Looks like I'll be making .dir-locals.el files to specify cider-boot-parameters and add the appropriate deps there.

richiardiandrea06:01:53

@grzm didn't follow the issue so I apologise, but that is what I do all the time

grzm06:01:37

np. I needed the reminder

Petrus Theron14:01:02

How can I debug a Cljs error like this being thrown by boot-cljs when it makes no reference to any source files:

Compiling ClojureScript...
• js/main.js
                                       java.lang.Thread.run                  Thread.java:  748
         java.util.concurrent.ThreadPoolExecutor$Worker.run      ThreadPoolExecutor.java:  624
          java.util.concurrent.ThreadPoolExecutor.runWorker      ThreadPoolExecutor.java: 1149
                        java.util.concurrent.FutureTask.run              FutureTask.java:  266
                                                        ...                                   
                        clojure.core/binding-conveyor-fn/fn                     core.clj: 2022
                              adzerk.boot-cljs/compile-1/fn                boot_cljs.clj:  160
                                   adzerk.boot-cljs/compile                boot_cljs.clj:   72
                                          boot.pod/call-in*                      pod.clj:  413
                                                        ...                                   
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke  ClojureRuntimeShimImpl.java:  102
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke  ClojureRuntimeShimImpl.java:  109
                                                        ...                                   
                                          boot.pod/call-in*                      pod.clj:  410
                                      boot.pod/eval-fn-call                      pod.clj:  359
                                         clojure.core/apply                     core.clj:  657
                                                        ...                                   
                         adzerk.boot-cljs.impl/compile-cljs                     impl.clj:  159
                            adzerk.boot-cljs.impl/dep-order                     impl.clj:   37
               adzerk.boot-cljs.impl/cljs-depdendency-graph                     impl.clj:   30
                                        clojure.core/reduce                     core.clj: 6748
                                clojure.core.protocols/fn/G                protocols.clj:   13
                                  clojure.core.protocols/fn                protocols.clj:   75
                         clojure.core.protocols/iter-reduce                protocols.clj:   49
            adzerk.boot-cljs.impl/cljs-depdendency-graph/fn                     impl.clj:   31
                      adzerk.boot-cljs.impl/ns-dependencies                     impl.clj:   24
                                  cljs.analyzer.api/find-ns                     api.cljc:  163
java.lang.AssertionError: Assert failed: (symbol? sym)
Elapsed time: 0.990 sec

qqq14:01:22

in the past, I had some very cryptic looking (symbol? sym) errors when something was wrong in the (ns ...)` section of the code

Petrus Theron14:01:26

You legend @qqq. Has to do with CLJC conditionals in ns. See that weird #[email protected](:cljs ...)` at https://github.com/clojure/clojurescript/wiki/Using-cljc#general-considerations I had this:

#?(:clj [abc.core :as core]
       :cljs [abc.core :as core :refer [xyz]])
instead of
[abc.core :as core #[email protected](:cljs [:refer [xyz]])]

Petrus Theron14:01:35

hmm I'm still getting the error but it's definitely gotten further (took way longer, some new warnings). suspect I still have some ns issues

mynomoto20:01:02

I'm getting this when running boot-cljs-test on a project. It works on lein using doo. Any pointers on how to debug it?

$ boot test
Adding: ([doo "0.1.7"]) to :dependencies
Compiling ClojureScript...
• cljs_test/generated_test_suite.js

;; ======================================================================
;; Testing with Slimer:

SyntaxError: illegal character
                              java.lang.Thread.run              Thread.java:  748
java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  624
 java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1149
               java.util.concurrent.FutureTask.run          FutureTask.java:  266
                                               ...
               clojure.core/binding-conveyor-fn/fn                 core.clj: 2022
                                 boot.core/boot/fn                 core.clj: 1029
                               boot.core/run-tasks                 core.clj: 1019
     crisptrutski.boot-cljs-test/eval1053/fn/fn/fn       boot_cljs_test.clj:   96
                 adzerk.boot-cljs/eval479/fn/fn/fn            boot_cljs.clj:  137
                 adzerk.boot-cljs/eval536/fn/fn/fn            boot_cljs.clj:  217
     crisptrutski.boot-cljs-test/eval1125/fn/fn/fn       boot_cljs_test.clj:  166
            crisptrutski.boot-cljs-test/run-tests!       boot_cljs_test.clj:  147
         crisptrutski.boot-cljs-test/run-tests!/fn       boot_cljs_test.clj:  122
java.lang.RuntimeException: SyntaxError: illegal character
clojure.lang.ExceptionInfo: SyntaxError: illegal character
    file: "/tmp/boot.user8497445533223769151.clj"
    line: 41

alandipert21:01:22

mynomoto it looks like a syntax error in your build.boot, you can look at the script it's running and see where it's encountering error with boot -b | cat -n

qqq21:01:48

@petrus: these particular "errors without line numbers/ file names" are really tough to debug; I think I ended up either: (1) moving all files out of src, putting them back in one by one to see if they went right [to get the file name] another thing that I tried -- was calling the cljs / clj compilation process OUTSIDE of boot -- i.e. I think cljs actuallygives a useful line number / file name somewhere, but then boot gobbles it up