This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-29
Channels
- # aws (1)
- # aws-lambda (2)
- # bangalore-clj (3)
- # beginners (26)
- # boot (25)
- # braveandtrue (1)
- # cider (5)
- # cljsrn (7)
- # clojure (144)
- # clojure-android (2)
- # clojure-czech (1)
- # clojure-greece (3)
- # clojure-italy (17)
- # clojure-poland (5)
- # clojure-russia (25)
- # clojure-spec (9)
- # clojure-uk (100)
- # clojurescript (85)
- # core-async (42)
- # cursive (11)
- # datascript (2)
- # datomic (25)
- # duct (3)
- # emacs (5)
- # figwheel (2)
- # fulcro (49)
- # graphql (16)
- # hoplon (8)
- # klipse (10)
- # leiningen (10)
- # lumo (9)
- # off-topic (12)
- # om (14)
- # onyx (25)
- # planck (34)
- # portkey (6)
- # re-frame (43)
- # reagent (4)
- # remote-jobs (2)
- # ring (36)
- # ring-swagger (1)
- # rum (1)
- # shadow-cljs (187)
- # specter (25)
- # sql (5)
- # unrepl (75)
Re spec, should Clojure ensure that keys referenced in s/keys
are registered? I just noticed an unregistered key in one of mine as was surprised I hadn't been made aware by the compiler
it allows that so that you can define key sets before the key specs themselves, most of the stuff in spec in wrapped in delays
You can use this to find those errors https://gist.github.com/stuarthalloway/f4c4297d344651c99827769e1c3d34e9
is there a good example of a generator, which generates map (record) where values of 2 fields are dependent? multispec solves opposite problem: conform/validate records with 2+ dependent fields, can it be leveraged for generating generator?
the nuance in a data model I have, is that :type key on record determines not presence/absence of an attribute, but shape of a particular attribute:
{:type :string :val "foo"}
;;vs.
{:type :media :val {:url "" :content-type"image/jpg"}}
so I am already jumping some hoops to create multispec for this (extra level of spec indirection between data shape and attribute name)