-
Notifications
You must be signed in to change notification settings - Fork 215
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
schema inference from source code #181
Comments
Tools like clj-kondo and core.typed are both actively developed, I think this falls into scope of those libs. Plan is to integrate malli with clj-kondo later anyway. |
clj-kondo integration might be quite a killer feature! |
Apparently Typed Clojure can automagically infer Specs. |
|
Unfortunately, Typed Clojure can only infer specs from data (not code), like malli does :) It instruments your code and then runs your tests. It does some fancy things around deciding whether something is a multispec, but that's about it. |
Schema providers can take sample input and generate a schema. How magical would it be if one could infer a schema from code?
I think this could be done by code-walking or something similar. If done right I think this would be invaluable, we'd get type-inference-like capabilities in the language :)
The text was updated successfully, but these errors were encountered: