You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLJS-1720: Qualify symbols and namespaced keywords in spec macros
There are currently a few symbols and namespaced keywords in the
cljs.spec macros namespace that either need to be qualified for
proper operation, or should be.
The symbols fall into the category of calls to runtime functions in
the cljs.spec namespace, and need qualification in order to avoid
the $macros suffix. These comprise with-gen and gen.
In terms of keywords, an example that causes a failure is ::kvs->map
in keys*: It resolves to :cljs.spec$macros/kvs->map which doesn't
match the :cljs.spec/kvs->map spec registered near the bottom of the
cljs.spec runtime namespace.
An example that doesn't cause an outright failure, but arguably
inhibits its proper use by client code is ::nil and ::pred in the
nilable macro. Ideally these would resolve to :cljs.spec/nil and
:cljs.spec/pred so that client code can rely on these namespaced
symbols identifying the branches.
Given the nilable example, you could argue that the intent is that
all namespaced keywords in the cljs.spec macro namespace that employ
:: resolve in :cljs.spec so that they can be used not simply as
unique identifiers (the intent is not simply to avoid potential
collisions), but so that they can be used as stable identifiers.
The set of keywords that should be qualified comprises: ::kind-form,
::kfn, ::conform-all, ::kvs->map, ::nil, and ::pred
0 commit comments