This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-12
Channels
- # announcements (1)
- # architecture (112)
- # asami (22)
- # babashka (74)
- # beginners (189)
- # chlorine-clover (4)
- # cider (105)
- # clj-kondo (21)
- # clojure (45)
- # clojure-australia (1)
- # clojure-europe (26)
- # clojure-losangeles (4)
- # clojure-nl (3)
- # clojure-spec (5)
- # clojure-uk (8)
- # clojurescript (16)
- # conjure (1)
- # cursive (29)
- # datascript (21)
- # datomic (35)
- # events (1)
- # fulcro (12)
- # graalvm (3)
- # graphql (31)
- # kaocha (13)
- # malli (14)
- # meander (3)
- # mount (3)
- # off-topic (73)
- # pathom (9)
- # pedestal (5)
- # portal (2)
- # re-frame (4)
- # reagent (8)
- # reitit (3)
- # rum (1)
- # shadow-cljs (26)
- # spacemacs (3)
- # sql (6)
Folks, I have a begginer's question. I would like to test Malli, so I created a new lein project and included malli in the dependencies. I was able to run lein repl, but was unable to follow the examples on the doc page. (see image below) Am I missing something? Some pre-requisite? I tested on these two versions "0.0.1-SNAPSHOT", "0.2.1".
Oh oh. I think maybe I know the answer. My project is also named "malli":man-facepalming:
#inception
Thank you very much. Keep up the good work. I will run some tests. The project seems really interesting!
@maciej.falski oh, that’s bad, didn’t realize that unregistered Schemas can’t be walked with the current impl of m/schema-walker
, as it tries to recreate the schmas using m/type
, which in this case is :user/over6
and not found in the registry.
good thing is, that a per-schema -copy
is most likely near to no-op, which makes Schema walking easily order(s) of magnitude faster.
Not sure if it’s about the registry, ie:
(mr/set-default-registry!
{:string (m/-string-schema)
:over6 Over6})
=> #object[malli.registry$simple_registry$reify__4072 0x1f74f3fd "malli.registry$simple_registry$reify__4072@1f74f3fd"]
(mu/closed-schema :string)
=> :string
(mu/closed-schema :over6)
Execution error (ExceptionInfo) at malli.core/-fail! (core.cljc:79).
:malli.core/invalid-schema {:schema :user/over6}
@maciej.falski you should register it with :user/over6
so it matches the Schema definition