Fork me on GitHub
#clojure-spec
<
2018-11-10
>
tianshu06:11:43

I have a question, is it s/conformer not work on s/map-of? is it designed?

schmee16:11:32

I’m very confused by the behavior of instrument and fspec

schmee16:11:57

long story short: how do I turn off generative checking of fspec?

schmee16:11:46

*fspec-iterations* doesn’t cut the mustard since it will try to create generators even though you set it to 0

schmee16:11:39

my workaround now is to copy-paste the spec in question and replace the fspecs with any? and pass that to the :spec arg to instrument, but that is not a viable solution

schmee17:11:13

is it an acceptable solution to never call validate-fn at all if *fspec-iterations* is zero or nil? https://github.com/clojure/spec.alpha/blob/master/src/main/clojure/clojure/spec/alpha.clj#L1756

didibus23:11:46

Are you saying a call to instrument forces the gen to be generated?

schmee23:11:46

that seems to be the case

didibus23:11:21

Hum, let me check if I have that behavior