Fork me on GitHub
#boot
<
2019-01-15
>
jaide02:01:39

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?

micha02:01:23

you can do boot show -p

jaide03:01:30

Ok, I’ve already pinpointed it down

jaide03:01:44

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

micha04:01:39

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

micha04:01:51

like to debug deps in a pod

jaide06:01:32

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

micha06:01:08

@jayzawrotny you can do like

boot -e foo=bar repl

micha06:01:32

and then in the repl

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

micha06:01:17

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

micha06:01:45

a cleaner way might be to use an environment variable

micha06:01:02

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

micha06:01:11

and you'd look for it in your task

micha06:01:00

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

jaide06:01:25

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.

micha06:01:28

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

micha06:01:31

something like that?

micha06:01:50

you can do anything in there of course

jaide06:01:59

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

micha06:01:13

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

jeroenvandijk18:01:47

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