Fork me on GitHub
#clojure-spec
<
2019-11-18
>
colinkahn21:11:52

I’ve used with-redefs around an st/check in ClojureScript code and it has worked fine, but trying in Clojure code it doesn’t. I had to redefine a my-function-with-redefs and spec that with the redefs inside the body. Is that expected? I’m assuming it’s something to do with multiple threads vs single thread in JS

Alex Miller (Clojure team)21:11:50

might be - st/check uses pmap which is multi-threaded in Clojure (or possibly it's really the laziness of pmap)

Alex Miller (Clojure team)21:11:38

make sure you realize the result of pmap with doall or something inside the lexical scope of the with-redefs