-
Notifications
You must be signed in to change notification settings - Fork 53
Use open poly variant to cover the FUTURE case #19
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
Comments
Sorry for missing this! You mean instead of including the |
Yeah - exactly. I am hoping that with the poly variant + some PR like rescript-lang/rescript#3801 but for poly variant would allow for a 0 runtime version of SchemaAsset. This would mean you'd have the very large Reason file, but JS byte size would be unaffected. |
@rickyvetter I'm intrigued! And I agree that would be the best thing to do. However, I'd like to wait until that actually lands in BuckleScript before I change anything. Do you have any insight on ongoing work for that particular feature? At that point |
@rickyvetter likely starting work on this soon given that BS is approaching shipping that feature from what I can see. |
This is implemented here #90 although in a slightly different shape. Waiting a stable BS release with the feature, and it'll be merged after that. |
Fixed in e36948f 🎉 |
Right now the SchemaAsset generated file uses a marker to signify that additional values could be added to the schema later so it is unsafe to exhaustively match. Could we instead use an open poly variant like so:
The text was updated successfully, but these errors were encountered: