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

The variant constructor Js.Json.False not found Re 11 RC4 #57

Closed
bruisedsamurai opened this issue Oct 10, 2023 · 6 comments · Fixed by #58
Closed

The variant constructor Js.Json.False not found Re 11 RC4 #57

bruisedsamurai opened this issue Oct 10, 2023 · 6 comments · Fixed by #58

Comments

@bruisedsamurai
Copy link

bruisedsamurai commented Oct 10, 2023

  1let falseableEncode = (encoder, opt) =>
  2switch opt {
  3 │   | None => Js.Json.False
  4 │   | Some(v) => encoder(v)
  5 │   }

  The variant constructor Js.Json.False can't be found.

  - If it's defined in another module or file, bring it into scope by:
    - Prefixing it with said module name: TheModule.Js.Json.False
    - Or specifying its type: let theValue: TheModule.theType = Js.Json.False
  - Constructors and modules are both capitalized. Did you want the latter?
    Then instead of let foo = Bar, try module Foo = Bar.
@mununki
Copy link
Member

mununki commented Oct 10, 2023

Can you provide the example using spice to reproduce?

@bruisedsamurai
Copy link
Author

It's directly coming from the lib
\node_modules\@greenlabs\ppx-spice\src\rescript\Spice_Codecs.res

@mununki
Copy link
Member

mununki commented Oct 10, 2023

I belive ReScript RC removed Js.Json.True, False rescript-lang/rescript#6421

I think this would be easy fix.

@mununki
Copy link
Member

mununki commented Oct 11, 2023

I think it is fixed in v0.2.1-rc.0 https://www.npmjs.com/package/@greenlabs/ppx-spice/v/0.2.1-rc.0
Can you test with it?

@bruisedsamurai
Copy link
Author

It's compiling fine. Haven't tested runtime behaviour.

@mununki
Copy link
Member

mununki commented Oct 11, 2023

Feel free to re-open this issue if you have any issue.

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

Successfully merging a pull request may close this issue.

2 participants