This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-20
Channels
- # aws (1)
- # babashka (68)
- # beginners (68)
- # braveandtrue (6)
- # calva (4)
- # cider (10)
- # clj-kondo (26)
- # clojure (76)
- # clojure-dev (18)
- # clojure-europe (1)
- # clojure-norway (25)
- # clojure-spec (8)
- # clojure-sweden (7)
- # clojure-uk (3)
- # clojuredesign-podcast (1)
- # clojurescript (11)
- # conjure (29)
- # cursive (31)
- # datomic (29)
- # emacs (12)
- # fulcro (29)
- # graphql (3)
- # helix (2)
- # hoplon (39)
- # hugsql (4)
- # malli (3)
- # off-topic (62)
- # pedestal (8)
- # re-frame (23)
- # reagent (14)
- # rewrite-clj (10)
- # shadow-cljs (18)
- # spacemacs (3)
- # sql (13)
- # xtdb (32)
A month or so ago I used Malli for a project, and with recent changes to Malli, my code broke:
(def predicate-registry
(-> m/predicate-registry
(-register-var #'zoned-date-time?)
(-register-var #'local-date?)))
(def registry
(merge predicate-registry m/class-registry m/comparator-registry m/base-registry))
So now the -registry
is -schemas
, but then my -register-var
calls fail.
I'll keep working on this, but any ideas?OK, this worked:
(def registry
(merge (m/predicate-schemas)
(m/class-schemas)
(m/comparator-schemas)
(m/base-schemas)
{:zoned-date-time (m/fn-schema :zoned-date-time #'zoned-date-time?)
:local-date (m/fn-schema :local-date #'local-date?)}))
And then I changed my schema references from zoned-date-time?
to :zoned-date-time
, etc, and also changed the associated transformer encoder/decoder names@dcj we are doing final code polishing to get the non-pre-aloha out. The breaking changes are listed in https://github.com/metosin/malli/blob/master/CHANGELOG.md#unreleased. Also, if you are using custom schemas, you should read https://github.com/metosin/malli/blob/master/README.md#schema-registry. Lot of options, and supports properly dce on cljs now
👍 9