Fork me on GitHub
#clojure-spec
<
2017-05-29
>
tianshu12:05:10

why spec become spec.alpha?

robert-stuttaford13:05:20

@doglooksgood there’s a post about it in the google group

tianshu14:05:29

but is there any problems with current version of clojure.spec? any feature is missing or critical bug?

mpenet14:05:48

it depends

mpenet14:05:00

I don't think there are "critical" bugs, but there are a few bugs left to fix. missing features: certainly, but that's quite subjective, depends on what you need

bbss16:05:09

I don't understand why generating this gives stack overflows:

(s/def ::thing string?)

(s/def ::test (s/+ (s/cat :thing (s/* ::thing))))

bbss16:05:55

my use case is something like this:

(s/def ::thing string?)
(s/def ::other-thing string?)

(s/def ::test (s/+ (s/cat :thing (s/* ::thing)
                          :other (s/* ::other-thing))))

wilkerlucio16:05:04

@bbss when using a s/cat inside of another you must wrap it with s/spec

wilkerlucio16:05:19

(s/def ::thing string?)
(s/def ::other-thing string?)

(s/def ::test (s/+ (s/spec (s/cat :thing (s/* ::thing)
                                  :other (s/* ::other-thing)))))

(s/exercise ::test)

bbss17:05:06

@wilkerlucio thank you, missed that from the docs!