Fork me on GitHub
#malli
<
2021-04-28
>
pithyless11:04:52

I’m reworking some error handling - especially dev vs prod. What’s the story with virhe? Is there a version of that coming soon? Or perhaps even some reflections and retrospectives that we could apply to our own work?

ikitommi16:04:39

@pithyless there is a unpublished copy of reitit-error-pretty-printer in malli. should extract the common parts of malli + reitit and push out to virhe. to be honest, might be better if virhe was a community owned clj-commons library, not ours. there would be a lot to do with colors, themes, cljs-support etc, which needs work, which needs time, which we don’t have that much extra. happy to contribute code, ideas and requirements to that. For now: just copy the existing reitit thing if you want the looks.

pithyless17:04:36

are you referring to this? https://github.com/metosin/reitit/blob/master/modules/reitit-dev/src/reitit/dev/pretty.cljc It'd be great to read about the ideas and lessons learned on the virhe README if you find some free time to catch your breath. Either way, thanks for all the ceaseless work and FOSS publishing! 🙂

👍 2
ikitommi16:04:31

I’ll write the ideas and lessons learned to virhe README, soon. Might have time to push out first version before summer vacations.

🙏 2
ikitommi17:04:24

🥳 pushed just out [metosin/malli "0.5.0"] - small fixes & improvements and the ability to describe Malli Schema Syntaxes with Malli. Small breaking changes for library extenders, more info in the CHANGELOG: https://github.com/metosin/malli/blob/master/CHANGELOG.md#050-2021-04-28

🎉 3
metal 4
2
eoliphant21:04:49

Hi, dunno if I’m doing something wrong, but I’m having issues with local/custom registries and qualified keyword entries. Validation works fine, but getting properties, the original form back, etc don’t seem to work

(def registry*
  (merge
    (m/default-schemas)
    {:testfoo [:string {:a :b}]
     :test/bar [:string {:c :d}]
     ::testbaz [:string {:a :b}]}))
(m/properties :testfoo {:registry registry*})
; => {:a :b}
(m/properties ::testbaz {:registry registry*})
; => nil