This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-01
Channels
- # announcements (6)
- # atom-editor (4)
- # babashka (59)
- # beginners (51)
- # bristol-clojurians (6)
- # calva (5)
- # cider (22)
- # clara (6)
- # cljfx (28)
- # clojure (182)
- # clojure-australia (1)
- # clojure-berlin (1)
- # clojure-dev (21)
- # clojure-europe (12)
- # clojure-italy (8)
- # clojure-nl (7)
- # clojure-norway (13)
- # clojure-uk (20)
- # clojurescript (2)
- # code-reviews (24)
- # conjure (9)
- # cursive (9)
- # datomic (35)
- # defnpodcast (45)
- # fulcro (18)
- # graalvm (3)
- # graphql (1)
- # hugsql (1)
- # jobs (3)
- # jobs-discuss (2)
- # klipse (1)
- # leiningen (1)
- # malli (5)
- # membrane (4)
- # off-topic (7)
- # portal (2)
- # reitit (30)
- # remote-jobs (1)
- # rewrite-clj (5)
- # ring (2)
- # shadow-cljs (25)
- # test-check (2)
- # tools-deps (5)
- # vrac (26)
- # xtdb (17)
Have recursive schemas been implemented now? I know there was a ticket (which I cant find right now) where various versions were being discussed.
@shaunxcode It looks like this might be the discussion: https://github.com/metosin/malli/pull/117 and maybe this is the implementation?: https://github.com/metosin/malli/pull/209 but I’m just getting familiar with malli
thanks that is it exactly!
@shaunxcode I just saw this section in the readme: https://github.com/metosin/malli#recursive-schemas which might be helpful too
I was following along with this code from the README.md:
;; regexs work too
(mg/generate
[:re #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$"]
{:seed 42, :size 10})
; => "[email protected]"
In order for it to work I needed to explicitly add test.chuck
as a dependency, or else I would get this error:
Execution error (IllegalStateException) at malli.generator/eval20132$fn (generator.cljc:135).
Attempting to call unbound fn: #'malli.generator/-re-gen
If that’s the expected behavior (and I didn’t mess something up), maybe it would be good to add a note to the README.md under https://github.com/metosin/malli#value-generation about adding test.chuck
as a dependency?