Fork me on GitHub
#clojure-spec
<
2018-04-09
>
Oliver George01:04:17

I have an "on the fly spec generation in clojurescript" question.

Oliver George01:04:58

I'd like to generate and register new specs but clojure-spec has a macro based api and clojurescript doesn't have eval.

Oliver George01:04:28

Can someone point me at a sane approach please.

Oliver George01:04:37

It's possible a macro is the right way to do this but I get super confused about when macros evaluate in clojurescript.

Oliver George01:04:26

My spec generation looks at existing registered specs. That means my macro needs to consider the correct registry (presumably there's a CLJ one at compile time and a CLJS one at runtime).

Oliver George01:04:57

Pretty sure I'm lots in the weeds.