clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
adam 2020-07-04T20:01:57.437600Z

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

alexmiller 2020-07-04T20:03:07.437900Z

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

alexmiller 2020-07-04T20:03:30.438400Z

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

adam 2020-07-04T20:09:12.440100Z

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.

alexmiller 2020-07-04T20:10:31.440500Z

specs are loaded into a global registry

🆗 2