Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specs for CLJS is possible #9

Open
polygloton opened this issue May 31, 2017 · 0 comments
Open

Specs for CLJS is possible #9

polygloton opened this issue May 31, 2017 · 0 comments

Comments

@polygloton
Copy link
Contributor

Currently the specs that are generated by flanders is for CLJ only because we use eval, and because I was thinking that we'd create the specs at runtime (which requires macros). CLJS has no reader nor does it have runtime macros.

However, I think that we can define the specs at compile time (still based on flanders definitions). As long as we got rid of eval, that should work in CLJS. We could have a flanders.spec-sexprs NS that creates sexpr srings for defining the specs. The consuming CLJS code could use a macro (in a CLJ NS) to create and def the spec sexprs at compile time.

If we did this, we might have both flanders.spec and flanders.spec-sexprs outputs. The .spec NS could reuse a lot of the code in spec-sexprs, and it would work just like it does now. The .spec-sexprs would never def any spec, it would just return the code to do so as a seq of strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant