Fork me on GitHub
#malli
<
2019-11-28
>
eskos07:11:42

@ikitommi As morning chore I made a Makefile for Malli 😛 mainly meant to replace the bin/kaocha and to make sure deps are installed. Since no one even asked for this, should I push this out or just keep to myself?

eskos06:11:02

@ikitommi So I made a PR of this anyway, feel free to reject it if you disagree with my reasoning :)

ikitommi06:11:44

There are smarter on Metosin like @U1NDXLDUG doing our OS tooling stuff, looking forward to comments too.

miikka06:11:56

bin/kaocha should not be replaced, it’s essential part of the Kaocha interface

💯 4
eskos06:11:01

Please elaborate 🙂

eskos06:11:16

I’m replacing the literal bash file, not kaocha itself.

miikka06:11:03

Yes, but Kaocha is supposed to be used from command-line

miikka06:11:22

You can do stuff like bin/kaocha --watch and bin/kaocha --focus test-symbol and stuff like that

miikka06:11:47

That said, I wouldn't be against something like make test which would install the npm deps and then run the tests with bin/kaocha

eskos06:11:01

Ah, I see.

eskos06:11:23

Well, that’s not a big adjustment 🙂

eskos06:11:04

There. I did the unfashionable and hid my crimes 😉

miikka07:11:15

I'm honestly not feeling very positive about your PR, but I'll try to review it at some point.

eskos08:11:14

That’s totally fine 🙂 Just wanted to push it out to clarify your stance on it.

ikitommi19:11:45

@rschmukler Merged the interceptor-branch, thanks! Wanted to test myself if/how that works and re-formatted the code: https://github.com/metosin/malli/pull/124/files?w=1

ikitommi20:11:28

(is (= [24 48 8 10]
       (m/decode
         [:tuple
          {:decode/string (constantly {:enter (partial mapv inc), :leave (partial mapv (partial * 2))})}
          [int? {:decode/string (constantly {:enter (partial + 2), :leave (partial * 3)})}]
          [int? {:decode/string (constantly {:enter (partial + 3), :leave (partial * 4)})}]]
         [1 2 3 4] mt/string-transformer)))

ikitommi20:11:04

did an issue about the defn syntax, labelled “for discussion”.

rschmukler20:11:29

@ikitommi Woo! Looks great 🍻

rschmukler20:11:45

I was just recently thinking that there are probably some interesting behaviors we should add for multi schemas. Eg. should we have a :dispatch/leave option? and then assume :dispatch and :dispatch/enter to be the same?