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

ReScript 12 compatibility #78

Open
cknitt opened this issue Jul 15, 2024 · 4 comments
Open

ReScript 12 compatibility #78

cknitt opened this issue Jul 15, 2024 · 4 comments

Comments

@cknitt
Copy link
Contributor

cknitt commented Jul 15, 2024

This may be a bit early as there is not even a first alpha version of ReScript 12 out yet, but I wanted to give you a heads-up already.

It seems something broke with rescript-lang/rescript#6611.

E.g., if I have a simple union schema

type x = A | B

let schema = S.union([S.literal(A), S.literal(B)])

then S.parseOrRaiseWith(JSON.String("B"), schema) gives me the error

Failed parsing at root. Reason: Expected "A", received "B"

on latest (ReScript) master.

@DZakh
Copy link
Owner

DZakh commented Jul 15, 2024

It seems something broke with rescript-lang/rescript#6611.

Oh, nice that it was merged. Yeah, that's probably the reason, since I do a dirty thing, to make RescriptSchemaError a valid Error instance and ReScript exception at the same time. I'll do a fix closer to the V12 release.

@cknitt
Copy link
Contributor Author

cknitt commented Jul 27, 2024

12.0.0-alpha.1 is out now! 🎉

@cknitt
Copy link
Contributor Author

cknitt commented Jul 27, 2024

I am also seeing the following error (without a line number) when using the PPX with 12.0.0-alpha.1:

  This uncurried function has type 'a => 'b
  It is applied with 2 arguments but it requires 1.

@DZakh
Copy link
Owner

DZakh commented Aug 3, 2024

Started the migration. I'm currently blocked by this rescript-lang/rescript#6929

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

2 participants