Hello,
is it possible to get a "closed" generator from a `s/select` form
and/or make it the default in Spec 2?
From the example in the Wiki:
(ns user
(:require [clojure.alpha.spec :as s]))
(s/def ::id int?)
(s/def ::first string?)
(s/def ::last string?)
(s/def ::user (s/schema [::id ::first ::last ::addr]))
(s/def ::my-user (s/select ::user [::id]))
(s/exercise ::my-user)
This generates users that have more keys than what I selected:
([#:user{:id 0} #:user{:id 0}]
[#:user{:addr #:user{:city "1"}, :first "O", :id 0}
#:user{:addr #:user{:city "1"}, :first "O", :id 0}])
I believe it is the same data which the `s/schema` for the `::user`
spec generates. My guess is this just hasn't been implemented yet.
Would it be possible to support this?