boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
2019-01-15T02:50:39.168300Z

What do you do when a boot task plugin you depend on doesn’t run because of an older dependency? Can you override it somehow within your build.boot file?

micha 2019-01-15T02:58:23.168500Z

you can do boot show -p

2019-01-15T03:46:30.168900Z

Ok, I’ve already pinpointed it down

2019-01-15T03:57:44.169500Z

Sorry, was distracted when I wrote that. I know it’s from an older version of httpkit used by boot-livereload

micha 2019-01-15T04:15:39.169800Z

you can do those commands in a pod also if you need to

micha 2019-01-15T04:15:51.170100Z

like to debug deps in a pod

2019-01-15T06:06:32.171200Z

Is there an example of how to customize tasks or pipelines between dev and production env?

micha 2019-01-15T06:11:08.171700Z

@jayzawrotny you can do like

boot -e foo=bar repl

micha 2019-01-15T06:11:32.172200Z

and then in the repl

boot.user=> (get-env :foo)
"bar"

micha 2019-01-15T06:12:17.173Z

you can use this perhaps, like boot -e environment=production task1 task2 ...

micha 2019-01-15T06:12:45.173300Z

a cleaner way might be to use an environment variable

micha 2019-01-15T06:13:02.173700Z

like you'd set that environment variable in your CI configuration or whatever

micha 2019-01-15T06:13:11.174Z

and you'd look for it in your task

micha 2019-01-15T06:14:00.174800Z

(if (= (System/getenv "ENVIRONMENT") "production") ...)

2019-01-15T06:28:25.176300Z

The environment var makes a lot of sense. Thanks! I am still curious what a task implementation that responds to the env var would look like. Especially one that relies on composing a bunch of tasks together.

micha 2019-01-15T06:30:28.178200Z

(deftask foo
  []
  (comp 
    (case (get-env :foo) 
      "bar" (task1) 
      "baz" (task2) 
      (task3)) 
    (task4)))

micha 2019-01-15T06:30:31.178400Z

something like that?

micha 2019-01-15T06:30:50.178700Z

you can do anything in there of course

2019-01-15T06:34:59.179600Z

I see. That’s why no concrete examples are in the documentation 🙂 Thanks again.

micha 2019-01-15T06:36:13.179900Z

yeah i looked in the wiki and didn't see anything

2019-01-15T12:57:03.180300Z

FYI, boot-clj + rebl https://gist.github.com/jeroenvandijk/a7f802bb9105bdc617b475d5996ba86b

💯 1
2019-01-15T18:06:47.181100Z

I've updated the gist so that it uses nrepl-rebl middleware (much better experience)