Fork me on GitHub
#malli
<
2019-12-05
>
rschmukler16:12:19

Sorry about that @ikitommi!!

roklenarcic17:12:55

Sequential schema doesn’t seem to be working correctly:

(m/encode [:sequential {:encode/string (constantly #(clojure.string/join "," %))}
           string?]
          ["A" "B" "C"]
          mt/string-transformer)
          
=> (\A \, \B \, \C)
instead of expected: "A,B,C"

roklenarcic17:12:40

the encode function correctly receives the input vector, and returns a string

roklenarcic17:12:48

the result should be a string

rschmukler22:12:51

@roklenarcic I actually just ran into the same bug in a different manifestation! @ikitommi PR incoming...

roklenarcic23:12:21

What is the use case for the “interceptors” in Malli? What use cases did it solve? Because all I see is things getting more complicated and yet it adds no features. The interceptor change smells like cargo cult programming to me. Because http request/response frameworks have switched to interceptors, people think they are applicable to every problem. I just don’t see what it adds to Malli

rschmukler23:12:20

You're right that in their current form they aren't that useful. The big draw to them would be if the :leave could execute in a more post-walk fashion. Right now, for simple use cases, they give an opportunity for a transformer to finalize a value after most things are done (ie. all :leave execute after all :enter have finished). I'm hoping that we can make it a true postwalk, in which case they become much more useful