Fork me on GitHub
#clojure-spec
<
2018-04-14
>
hmaurer00:04:07

is clojure spec still in alpha?

seancorfield00:04:58

But lots of people are using it heavily in production.

hmaurer11:04:16

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

gklijs11:04:40

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

matan13:04:35

looks like docs are still pre-1.9 how do I use spec in 1.9? any good 1.9 getting started? https://clojure.org/guides/spec

matan13:04:03

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?

matan14:04:55

okay, so the namespace remains alpha, got it 🙂

matan14:04:01

good guide BTW! 🙂

matan14:04:26

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

matan14:04:40

it's not part of core that's why

seancorfield21:04:01

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

seancorfield21:04:31

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).

gklijs22:04:41

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.

mathpunk23:04:59

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