malli

https://github.com/metosin/malli :malli:
2020-06-20T19:23:16.104200Z

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?

2020-06-20T20:03:54.106400Z

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

ikitommi 2020-06-20T20:30:37.110400Z

@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

👍 3