This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-11
Channels
- # beginners (18)
- # boot (1)
- # cider (48)
- # cljs-dev (5)
- # cljsrn (2)
- # clojure (34)
- # clojure-greece (1)
- # clojure-mexico (3)
- # clojure-spec (6)
- # clojure-uk (3)
- # clojurescript (67)
- # cursive (1)
- # data-science (2)
- # defnpodcast (2)
- # fulcro (10)
- # jobs (3)
- # klipse (14)
- # off-topic (9)
- # pedestal (2)
- # re-frame (8)
- # spacemacs (2)
- # specter (2)
- # vim (2)
- # yada (1)
the problem with two specs is that in the case of maps, the key is used to pic, the spec for the value
@qqq But that's exactly the point: with two separate specs you control whether the keys are deep or shallow -- assuming you have unqualified keys in the map and can use different namespace-qualifiers for shallow vs deep.
@seancorfield: but I want to determine whether to make a shallo/dep check at the function call, not at the point when I construct the data
I want a single piece of svg data in some functions, I want to make an expensive deep check taht it's an valid svg tree ikn other functions, I want to make a shallow check that "current node is good; we know nothing abut chiklren"
I need just 1 running one call to the function to check at a time. Inside the function, there is a db call, so I need to run checking in single-thread, so (check 'test-many)
doesn't work. I tried to use check-fn, but this doesn't even start calling the function. (stest/check-fn 'test-many (s/fspec :args (s/cat :samples (s/coll-of :hashdb.db.commands/data)) :ret nil?))
(I changed backquote to quote when publishing to slack.