boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
2018-07-26T15:42:21.000024Z

Hi all, running into another issue. I have a boot task that downloads a js lib to the fileset, and then compiles it as a foreign lib. Here is a simplified version of the task:

(comp (download :url "package-url"
                :target "package.js")
      (watch)
      (reload)
      (sass :output-style :compressed)
      (cljs :optimizations :advanced
            :compiler-options
            {:foreign-libs [{:file "package.js"
                             :provides ["package"]}]})
      (sift)
      (target))
The issue I'm seeing is that it compiles great the first time, but when the code reloads, it throws a java.io.FileNotFoundException for package.js. Have I structured the task correctly? I would have though the download puts the file in the fileset once, and then it's there for every iteration of watch.

borkdude 2018-07-26T16:06:45.000085Z

How does this work again?

(deftask foo
    [r records int "number of records"]
    *opts*)

(boot.core/boot "foo" "-r" "100")
;;=> No such task (100)

borkdude 2018-07-26T16:13:19.000341Z

And (foo "-r" "100") works, but returns {:records 1} :thinking_face:

borkdude 2018-07-26T16:14:59.000372Z

ok, I should probably insert VAL

2018-07-26T16:16:00.000199Z

@borkdude I believe if you want to pass in a value along with -r you need an extra arg in the task def. See here, https://github.com/boot-clj/boot/wiki/Task-Options-DSL#anatomy, the 3. Optarg. It indicates that option is not just a flag.