It appears that closed spec checking doesn't work on select
in spec2. Is this something deliberate?
don't remember :) I think it should work? but could easily be buggy
Toy example:
(spec/def ::a string?)
(spec/def ::s (spec/schema [::a]))
(spec/valid? ::s {::a "hello" ::b "world"} {:closed #{::s}}) ;; => false
(spec/valid? (spec/select ::s [*]) {::a "hello" ::b "world"} {:closed #{::s}}) ;; => true
I read through the implementation of select
and it looks like it doesn't do anything with :closed
the things you "close" are schemas
select has some pending rework to make it build more on top of schema
when that's done it should start getting that effect
so without thinking more, this is probably in the category of wip
Ok, thanks for the clarification! Sounds also like it would not be fruitful for me to submit a patch, also, so I'll wait on it
nah, it's a non-trivial amount of work and bound into other things