Fork me on GitHub
#clojure-spec
<
2018-08-14
>
triss16:08:35

is it just me or does spec cause me to end up with circular dependencies in namespaces? what’s the workaround?

guy17:08:28

instead of using ::my-spec i create fake ns’s (s/def :guy-project/user (s/keys :req-un [:guy-project/name]))

guy17:08:57

Then u can store those spec wherever u want

guy17:08:08

spec/user.clj

guy17:08:24

and import it where u need it

guy17:08:36

if that makes sense? 👀

manutter5117:08:49

That’s how I do it too. I think it makes for more fine-grained namespacing.

Ethan18:08:39

I am working on a project to rewrite error messages and I was wondering if anyone knows any libraries that are well specced so I can test my spec error rewriting on more than just my specced functions and the specs in clojure.spec.alpha

bbrinck15:08:48

The libraries I test against in expound are: ring/ring-spec and org.onyxplatform/onyx-spec. I also have a partial spec for specs that can generate some specs … but it’s not quite reliable enough for me to depend on it. https://github.com/bhb/expound/blob/master/test/expound/alpha_test.cljc#L2877-L3124

bbrinck15:08:25

Feel free to use that spec, or frankly you can use any tests in the test suite and update it for your library 🙂