This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-06
Channels
- # aleph (1)
- # announcements (2)
- # beginners (109)
- # calva (48)
- # cider (25)
- # clj-kondo (38)
- # cljdoc (13)
- # clojure (203)
- # clojure-europe (23)
- # clojure-gamedev (3)
- # clojure-nl (3)
- # clojure-uk (7)
- # conjure (2)
- # data-science (1)
- # datalog (2)
- # datomic (7)
- # deps-new (16)
- # depstar (2)
- # docker (2)
- # fulcro (67)
- # graalvm (58)
- # honeysql (16)
- # java (2)
- # jobs (2)
- # jobs-discuss (2)
- # kaocha (4)
- # lsp (82)
- # malli (23)
- # off-topic (35)
- # polylith (18)
- # practicalli (5)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (15)
- # sql (17)
- # timbre (1)
- # tools-deps (24)
- # vim (20)
- # xtdb (9)
Hello there, I know this is not the right channel but I have a question about spec-tools
Is there out there a library for creating graphviz svg from a spec by any chance?
ok thanks I'll google it better, could not find it
Ah yeah I tried that one, no dice, I thought I saw a spec-tools
specific one...however Malli looks super cool and I should try it out 😄
Thanks for the link anyways!
Humanized errors might finally work as expected. Fixes all known issues and is much simpler implementation. If someone can still crash it with some input, I’m all 👂s. Maybe we can now remove the safe-humanize
from projects 🙂 https://github.com/metosin/malli/pull/502
big change is that the humanized form is taken from the first failure. e.g.
(-> [:map [:x [:and [:map [:y :any]] seq?]]]
(m/explain {:x {}})
(me/humanize))
;{:x {:y ["missing required key"]
; :malli/error ["should be a seq"]}}
(-> [:map [:x [:and seq? [:map [:y :any]]]]]
(m/explain {:x {}})
(me/humanize))
; {:x ["should be a seq"]}
does humanize work with records now?
well, i guess i should say that that’s part of explain
, not humanize so nvm lol
nope:
actual: java.lang.UnsupportedOperationException: Can't create empty: malli.error_test.Horror
at malli.error_test.Horror.empty (error_test.cljc:549)
clojure.core$empty.invokeStatic (core.clj:5236)
malli.error$_assoc_in.invokeStatic (error.cljc:147)
a simple (into {} rec)
works for me right now
i don’t believe you can, lol
that’s for spec but discusses the issue
https://github.com/metosin/malli/pull/502/commits/19c3bbe34d2d0831ba6d4a3138debd36f3642267
the humanized for doesn’t preserve the Records, but then again, it forces all sequences to vectors. it’s for… humans.
hell yeah, thank you so much