Fork me on GitHub

@alexmiller is there anywhere to look to find out which core functions are spec'd / will be spec'd?


actually there's an obvious answer to that, just grep for fdef in master, doh


@bfabry check out , specially the browse-spec functionality


does anyone know of existing code which produces fully resolved spec descriptions with respect to the namespace from whence they came?


e.g. (spec/describe some-spec) => (clojure.spec.alpha/coll-of not (`(coll-of bean-sprout?)`)


i’m asking before i embark on the journey.


if I understood correctly (spec/form some-spec) is what you are looking for


also check if you want to pretty print it


@noprompt I did some stuff that does reflection on the specs, I would be interesting to know if you can figure that out. afaik, this can be tricky, because to correctly resolve that you need to know the namespace definitions for the place where the spec was defined (which can be different from the spec namespace itself), so I'm not sure if that is even possible, given that you might not be able to disambiguate the non-qualified names (or even the qualified, considering aliases can change). but anyway, please let me know if you figure it slightly_smiling_face


@noprompt @wilkerlucio but isn't (spec/form ...) just that?


@jpmonettas that returns the original form as data, but it doesn't give you the context about, so imagine that I have a spec like (s/def ::some-spec my-pred?), just by reading the form, how can you tell from where my-pred? comes from?


maybe by getting the var from the function reference, might be possible there, but then I have no idea on how to do that on CLJS


@wilkerlucio sorry still don't get it, s/form returns everything qualified, I think the idea is you can serialize, deserialize specs


@jpmonettas ha, you are right, hahha, man, I was assuming it didn't because of what noprompt said, but I did the test now and you are right, it returns with the full name 😅