We're updating the issue view to help you get more done. 

Port core.specs.alpha to ClojureScript


Port https://github.com/clojure/core.specs.alpha to ClojureScript, adding a cljs.core.specs.alpha namespace that has the specs in the Clojure version, modified as needed for ClojureScript. (We would ideally make minimal revisions, preserving as much original structure as reasonable, so that future upstream changes can be more easily ported. Additionally, tests should be ported over.)

The specs should be usable from both JVM-based and self-hosted ClojureScript. (This likely implies a design making clever use of cljc and reader-conditionals so that macro specs work for both ClojureScript variants.}

This would essentially be an experimental feature which, while shipping with ClojureScript, can be explicitly opted into by end-users who wish to make use of that namespace. In other words, it would not be required by any existing production code in the ClojureScript tree, at least initially. If it ships with ClojureScript, this can facilitate more broad experimentation and rooting out any fine tuning that may be needed in the specs.

We could add checks for the require and require-macros macros, heavily based on the support that exists in that namespace for the Clojure ns macro, but of course heavily modified to reflect ClojureScript's constraints and special features (string require, etc.)

We might also be able to use this work to to provide inspiration what to do about the subject of specing the ns special form. (Do we turn ns into a macro that expands to some other special form, or do we revise the compiler's macroexpand check to also be able to do special form checks?)





Mike Fikes


Mike Fikes






Affects versions