Is it expected that
st/instrument can be enabled for all fdef'ed functions (e.g.,
(st/instrument))? For example, say a library has a public API calling some internal functions that are spec'ed with fdef's. If the fdefs are included in the published library, is it expected that calls to those internal functions calls should pass their fdef'ed specs even though they are internal? Take the below example code.
[clojure.spec.alpha :as s]))
:args (s/cat :x number?))
[clojure.spec.alpha :as s]
[my-lib.impl :as impl]))
If I call the api function do-thing, I will get an instrumentation exception on the call to
impl/do-internal-thing. Should users of Spec's instrumentation be expected to filter out some set of fdef'ed functions and pass that filtered list to
st/instrument or is this something the library should be expected to maintain? Maybe libraries should not include fdefs on internal functions?