Fork me on GitHub
#clojure-spec
<
2017-09-20
>
odinodin07:09:04

Is the JVM opt to disable spec asserts still -Dclojure.spec.compile-asserts=false or did this change with clojure.spec.alpha?

mpenet07:09:37

it's a compile time thing

mpenet07:09:49

so doing that at runtime with compiled asserts will do nothing I believe

mpenet07:09:58

otherwise you might be looking for clojure.spec.check-assertsif asserts were compiled

Alex Miller (Clojure team)12:09:33

I believe in both cases we did not put alpha in the property name, but you can check the source

mpenet12:09:26

no alpha yes

wagjo14:09:43

Hi, let's say I have a function that takes a nested map and adds a new key somewhere deep.

(defn add-bar
  [m]
  (assoc-in m [:model/foo :model/bar] 42))
Given the spec for the input argument (and its :model/foo key), what's the best practice to spec out the the return value with :model/bar as required key for :model/foo?