Fork me on GitHub
#boot
<
2015-11-26
>
martinklepsch12:11:16

@micha: passing anonymous functions into pods would also be nice. Have some api that takes report functions which can then print stuff or similar. now I can’t pass partials down there that carry args like verbose:

(pod/with-call-in cpod
  (confetti.report/report-stack-events
    {:stack-id (:stack-id ran)
     :report-cb #(confetti.util/print-ev % ~verbose)}))

jaen12:11:12

Hmm, I wanted to try out 2.5.0-SNAPSHOT and it seems to complain if the first option in a task doesn't have an OPTARG. Is this something that changed?

dm312:11:32

@martinklepsch: do you think that's possible? you are passing code to the macro which is only evaled "on the other side" where verbose isn't defined

jaen12:11:08

By "it seems" I meant that it errors out with malformed cli option: guide for boot-immutant where first option looks like _ guide bool or for boot notifier for option n notifier sym. I didn't yet investigate further why that happens, because I just can comment those tasks out for now, but it didn't happen with 2.4.2

martinklepsch12:11:41

the notifier thing needs an OPTARG

martinklepsch12:11:12

that’s an improvement in error handling, see https://github.com/boot-clj/boot/issues/285

martinklepsch12:11:51

the guide one should be fine I think — maybe theres another option missing an optarg?

jaen12:11:37

Ok, so more strict option validation. Adding optargs for notify task helped with it, let's see about boot-immutant then.

martinklepsch12:11:14

if you get it working and it was not related to the guide option please file an issue that the exceptions can be misleading

martinklepsch12:11:37

@dm3: possible to get working? not sure I understand the question

dm312:11:20

I meant anonymous fns in pods

jaen12:11:20

Here are boot tasks if anything, they look good to me as I understand the DSL - https://github.com/immutant/boot-immutant/blob/master/src/boot/immutant.clj#L71-L138

jaen12:11:50

@martinklepsch: it seems it doesn't like wildcards

jaen12:11:56

When I changed _ to a letter

jaen12:11:59

It stops complaining

martinklepsch12:11:12

when you change the _ for guide does it complain about nrepl-start?

jaen12:11:10

When I give letters to all it starts working.

martinklepsch12:11:19

solglas.repl=> (def _ :x)
#'solglas.repl/_
solglas.repl=> (symbol? _)
false

jaen12:11:42

huh, _ is not a symbol

martinklepsch12:11:53

err, ignore that

martinklepsch12:11:08

should have been (symbol? ‘_) which correctly returns true

jaen12:11:18

Right, just checked that

martinklepsch13:11:31

@jaen: can you file an issue? simple_smile

jaen13:11:25

@martinklepsch: sure, no problem

jaen13:11:11

Is this clear enough?

martinklepsch14:11:35

@jaen: perfect 👍

jaen17:11:13

Oh, I see you can't use a function as boot task argument, is that right?

martinklepsch17:11:37

@jaen: you can. see perun on github. it’s trickier to pass from CLI though, haven’t really tested what works and what doesn’t there

jaen17:11:21

But that's as a string, right?

jaen17:11:05

I can't do (taks :fn-arg (fn [] ...)) or do I misunderstand the description in the DSL?

jaen17:11:33

I kind of missed it when looking at it, because I was expecting something liek fn '

jaen17:11:27

Yes, but code (comp eval read-string) suggest I can't pass in a form, but a string. Or maybe I'm reading this wrong?