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

Build fails with rescript 11.1.4 #84

Open
rizo opened this issue Dec 3, 2024 · 4 comments
Open

Build fails with rescript 11.1.4 #84

rizo opened this issue Dec 3, 2024 · 4 comments

Comments

@rizo
Copy link

rizo commented Dec 3, 2024

Getting the following build error when compiling rescript sources:

rescript: [6/6] src/rescript/Spice.cmj
FAILED: src/rescript/Spice.cmj

  We've found a bug for you!
  /home/rizo/Work/FCL/Code/fcl-app/node_modules/@greenlabs/ppx-spice/src/rescript/Spice.res:27:50-62

  25 │   }
  26 │ 
  27 │ let intToJson = (i): Js.Json.t => Js.Json.Number(Float.fromInt(i))
  28 │ let intFromJson = j =>
  29 │   switch (j: Js.Json.t) {

  The module or file Float can't be found.

This seems to be related to the implicit usage of the Float module, which is not in scope. I suspect this has to do with the fact that the latest rescript version doesn't automatically expose some builtin modules.

@mununki
Copy link
Member

mununki commented Dec 4, 2024

Thank you for reporting the issue.
Can you inform me of what version of ppx_spice you are using?

@rizo
Copy link
Author

rizo commented Dec 4, 2024

This error was produced with v0.2.3. I've downgraded to v0.2.2, which works fine.

I tried altering Spice.res to add some opens: open Belt worked for the Float case, but BigInt wasn't in scope.

@rizo rizo closed this as completed Dec 4, 2024
@rizo rizo reopened this Dec 4, 2024
@mununki
Copy link
Member

mununki commented Dec 4, 2024

This error was produced with v0.2.3. I've downgraded to v0.2.2, which works fine.

I tried altering Spice.res to add some opens: open Belt worked for the Float case, but BigInt wasn't in scope.

Correct.

@mununki
Copy link
Member

mununki commented Dec 4, 2024

I've added this section for the compiler compatibility guide before. I'll revise this more accurately. https://github.com/green-labs/ppx_spice#compatibility-on-the-compiler-versions

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