Fork me on GitHub
#clojure-spec
<
2020-05-26
>
wagjo19:05:47

Hi, using latest spec2 alpha, I get an exception, is this a known issue or am I doing something wrong?

(s/def :foo/a string?)
(s/def :foo/b :foo/a)
(s/def :foo/m (s/schema [:foo/a :foo/b]))
(s/valid? :foo/m {:foo/a "s" :foo/b "d"})
Unhandled java.lang.IllegalArgumentException
   No implementation of method: :conform* of protocol:
   #'clojure.alpha.spec.protocols/Spec found for class:
   clojure.lang.Keyword

Alex Miller (Clojure team)19:05:52

it's a known issue for aliased specs

Alex Miller (Clojure team)19:05:01

in that they don't work right

wagjo19:05:48

thanks, I'll use (s/def :foo/b (s/and :foo/a)) as a workaround for now