Fork me on GitHub

is clojure spec still in alpha?


But lots of people are using it heavily in production.


@seancorfield is it still in development? it seems ike there hasn’t been a single commit to the source code in 6 months?


@hmaurer apparently Rich has some changes planned. There are some things which not yet work smoothly.


looks like docs are still pre-1.9 how do I use spec in 1.9? any good 1.9 getting started?


do I really need to

(:require [clojure.spec.alpha :as s])

Alex Miller (Clojure team)13:04:51

where do you see pre-1.9 docs?

Alex Miller (Clojure team)14:04:23

why do think that’s pre-1.9?


okay, so the namespace remains alpha, got it 🙂


good guide BTW! 🙂


but don't need to explicitly require it anymore with clojure 1.9 do we?

Alex Miller (Clojure team)14:04:56

require just loads the code into the clojure runtime, as you need to do with any namespace


it's not part of core that's why


@hmaurer That says it's very stable in its 'alpha' state! 🙂


I gather that some changes to make specs easier to work with programmatically are on the roadmap @gklijs but it's been great for us to use as-is in our production code. We're very happy with it. And we were using it early on in the 1.9 prerelease cycle, before it became .alpha and was moved out of core (so, yeah, there were some code changes needed along the way -- but overall Clojure doesn't require many of those over the years).


That's fine and even if there are changes it will probably not change the main use. However I use it to store and retrieve data with the option to use a backward compatible spec to get the full data back, and I'm a bit scared changes might break it.


Oh, also --- if I'm incorporating generative tests into a library, is the idea that I run stest/check inside a deftest?