Fork me on GitHub
#boot
<
2018-03-13
>
Petrus Theron11:03:42

Probably a conditional reader macro that Parinfer moved around. Why won't it tell me which file this occurred in? I could solve the problem instantly if I knew where it was

minikomi11:03:01

Well, looking at https://github.com/boot-clj/boot-cljs/blob/master/src/adzerk/boot_cljs/impl.clj#L24 it's somewhere in your :require s .. as to why there's no try/catch or logging there, well, I guess no-one bumped up against it yet or deemed it wasn't common enough to add it. Let me know what caused it if you do find the problem!

Petrus Theron12:03:24

Managed to debug it by commenting out every require in my main app.cljs file. Then I turned on cljs compile with watch and manually added each line back one at a time until I found the error. The problem was a require from a cljc file that was commented out, so I suspect it didn't say "no such namespace" because the file existed, but I'm not sure. I just wish it would tell me the name of the text that it says isn't a symbol, because it's fast to debug in that case.

lsnape18:03:17

Having some trouble with task options of type [str]. Get an exception every time I provide it: e.g.

(deftask foo
  [x blah BLAH [str] ""]
  (prn blah))
running boot foo -x bar gives:
java.lang.Thread.run              Thread.java:  745
java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  617
 java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1142
               java.util.concurrent.FutureTask.run          FutureTask.java:  266
                                               ...                               
               clojure.core/binding-conveyor-fn/fn                 core.clj: 2022
                                 boot.core/boot/fn                 core.clj: 1032
                                               ...                               
                         boot.core/construct-tasks                 core.clj:  994
                                clojure.core/apply                 core.clj:  657
                                               ...                               
                boot.user$eval836$fn__837.doInvoke                         :   85
java.lang.IllegalArgumentException: option :blah must be of type [str]
        clojure.lang.ExceptionInfo: option :blah must be of type [str]

lsnape18:03:50

Is this broken, or am I just not using it correctly?

seancorfield19:03:08

That works for me

(! 595)-> boot foo -x bar
["bar"]

Tue Mar 13 12:42:29
(sean)-(jobs:0)-(~/clojure/lsnape)
(! 596)-> cat build.boot 
(deftask foo
  [x blah BLAH [str] ""]
  (prn blah))
(but tasks should return functions, in general)

seancorfield19:03:55

Looking at that error, I think maybe you're trying to invoke the foo task elsewhere in your build.boot @lsnape?

lsnape20:03:18

@seancorfield no other tasks named foo. I first saw the problem with boot-new -a which also takes [str]. Think it might be to do with the boot version.

seancorfield20:03:35

@lsnape I'm on 2.7.2 -- what are you using?

lsnape21:03:16

@seancorfield ah yes 2.7.2 works. I was unknowingly running 2.8.0-SNAPSHOT.

seancorfield21:03:04

Interesting... I'm surprised there would be a breakage moving up to that!

seancorfield22:03:47

FWIW, when I run with 2.8.0-SNAPSHOT, it still works

(! 605)-> BOOT_VERSION=2.8.0-SNAPSHOT boot foo -x bar
["bar"]

Tue Mar 13 15:00:10
(sean)-(jobs:0)-(~/clojure/lsnape)
(! 606)-> cat build.boot 
(deftask foo
  [x blah BLAH [str] ""]
  (prn blah))

seancorfield22:03:07

(and that does run the latest snapshot version as of today)