Like CLJS-1989, but for inter-ns s/fdef as opposed to intra-ns. When loading from cache, if an s/fdef specs a function in another namespace, the load can fail. The root cause is that analysis cache writing and reading is scoped by namespace, and one failure mode is as follows: When analysis cache is written for a given namespace A, specs set up by a different namespace B may not have yet been loaded. When that namespace B is subsequently loaded, if any cache is written for B, it will, due to the scoping, only write out information relevant to B.
To repro, the setup is similar to that in CLJS-1989, but involves splitting the defn and s/fdef across two namespaces:
Have src/foo/core.cljs with:
Have src/baz/core.cljs with:
Now this has been cached. If you exit and try again, (st/instrument) fails:
Note, the above was reproduced using ClojureScript 1.9.655 as well, where CLJS-1989 landed, to be sure that this wasn't a subsequent regression.
As an aside, the motivating example where this inter-ns pattern arises is porting of clojure.core.specs.alpha to cljs.core.specs.alpha (CLJS-2413) where in each case, the specs are in a separate *...specs namespace.