Closed arichiardi closed 5 years ago
I have also tried in a vanilla REPL against latest ClojureScript and I get the same behavior
cljs.user=> (s/valid?
#_=> ::person
#_=> {::age 63
#_=> :boss true
#_=> :name "Liisa"
#_=> :languages #{:clj :cljs}
#_=> :aliases [{:alias "Lissu"} "Liisu"]
#_=> :orders [{:id 1, :description "cola"}
#_=> {:id 2, :description "kebab"}]
#_=> :description "Liisa is a valid boss"
#_=> :address {:street "Amurinkatu 2"
#_=> :zip "33210"}})
Error: Unable to resolve spec: :cljs.user/person
cljs$spec$alpha$reg_resolve_BANG_ (.cljs_nashorn_repl/cljs/spec/alpha.cljs:71:11)
cljs$spec$alpha$Specize$specize_STAR_$arity$1 (.cljs_nashorn_repl/cljs/spec/alpha.cljs:136:18)
cljs$core$IFn$_invoke$arity$1 (.cljs_nashorn_repl/cljs/spec/alpha.cljs:131:1)
cljs$spec$alpha$specize_STAR_ (.cljs_nashorn_repl/cljs/spec/alpha.cljs:131:1)
cljs$core$IFn$_invoke$arity$1 (.cljs_nashorn_repl/cljs/spec/alpha.cljs:160:24)
cljs$spec$alpha$specize (.cljs_nashorn_repl/cljs/spec/alpha.cljs:159:1)
cljs$core$IFn$_invoke$arity$2 (.cljs_nashorn_repl/cljs/spec/alpha.cljs:374:4)
cljs$spec$alpha$valid_QMARK_ (.cljs_nashorn_repl/cljs/spec/alpha.cljs:371:1)
(<NO_SOURCE_FILE> <eval>:1:0)
(<NO_SOURCE_FILE> <eval>:1:0)
(<NO_SOURCE_FILE> <eval>:1:0)
Hi. This is intentional, ds/spec
works like s/spec
and doesn't register the spec. See: https://github.com/metosin/spec-tools/issues/66#issuecomment-313330951.
End goal is to allow fully anonymous data-specs, see #55.
Oh that's too bad but I see the point, thanks for redirecting to the right issue!
Hello folks!
It seems like the registration of data spec with
ds/spec
has stopped working, will write the versions I am using at the bottom and I am open to try things out.Example:
In the registry I see only the following but not the top level specified by
::name
:Versions:
Thanks folks!