Fork me on GitHub
#clojure-spec
<
2020-07-04
>
adam20:07:57

How do I refer a spec defined in another namespace? The usual :refer throws an exception

Alex Miller (Clojure team)20:07:07

you don't need to refer it, just use the fq name

Alex Miller (Clojure team)20:07:30

you do need to load the namespace defining the spec (w/ require)

adam20:07:12

Got it, thanks. Ring’s wrap-reload middleware got me confused because it is picking it up even without referring the namespace IF I make some changes to my spec file... it suddenly becomes available everywhere.

Alex Miller (Clojure team)20:07:31

specs are loaded into a global registry

🆗 6