This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-03
Channels
- # aleph (1)
- # announcements (3)
- # aws (36)
- # babashka (35)
- # beginners (25)
- # cider (14)
- # clj-kondo (3)
- # clojure (154)
- # clojure-europe (8)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-serbia (1)
- # clojure-uk (133)
- # clojurescript (36)
- # cursive (15)
- # data-science (7)
- # datomic (16)
- # fulcro (34)
- # immutant (9)
- # jackdaw (5)
- # jobs (1)
- # leiningen (39)
- # off-topic (25)
- # pathom (42)
- # planck (13)
- # play-clj (1)
- # re-frame (18)
- # reagent (6)
- # reitit (3)
- # remote-jobs (1)
- # ring-swagger (16)
- # shadow-cljs (67)
- # sql (22)
- # testing (1)
- # uncomplicate (2)
- # vim (21)
- # vscode (6)
https://github.com/metosin/spec-tools/blob/master/src/spec_tools/parse.cljc#L236 throws when spec is defined through a symbol
☝️ 4
(s/def ::bar string?)
(s/def ::qix string?)
(s/def ::foo (s/keys :req-un [::bar]))
(s/def ::baz (s/keys :req-un [::qix]))
(spec-tools/merge ::foo ::bar)
;; works fine
(def bar ::bar)
(spec-tools/merge ::foo bar)
;; throws
(defmethod parse-form 'spec-tools.core/merge [_ form]
(let [type-priority #({:map 1
:multi-spec 0} (:type %) 0)]
(apply impl/deep-merge (->> (rest form)
(map parse-spec)
(sort-by type-priority)))))
btw, would anyone be intersted in having a #malli coercion module for c-api? #reitit has that.