Error from generated `.resi` Rescript v11 uncurried mode

Getting an error from generated .resi files

  Values do not match:
    let use: (.
  RescriptRelay.fragmentRefs<[> #DailyQuestion_verification]>,
) => DailyQuestion_verification_graphql.Types.fragment
  is not included in
    let use: RescriptRelay.fragmentRefs<
  [> #DailyQuestion_verification],
> => DailyQuestion_verification_graphql.Types.fragment
"rescript": "11.0.0-beta.4",
"rescript-relay": "3.0.0-alpha.1",

Seems to be an issue with uncurried by default?

I guess you switched your project to uncurried in your bsconfig.json, but did you also change the config of rescript-relay PPX to uncurried?

ppx-flags: "ppx-flags": [["rescript-relay/ppx", "-uncurried"]]

yeah, I have relay in uncurried as well. I’ve been building with it for about a month so I’d guess relay and rescript are configured correctly.

How would you change this type to match what the compiler expects?

Can you show some code maybe?

Sure thing

Here is the fragment

module VerificationFragment = %relay(`
  fragment DailyQuestion_verification on Verification {
    ... on VerificationData {
    ... on BrightIdError {

and here is the generated typing

type fragmentRef
external getFragmentRef:
  RescriptRelay.fragmentRefs<[> | #DailyQuestion_verification]> => fragmentRef = "%identity"

The full component can be found here

Hmm everything looks ok, I’ll take a closer look tomorrow morning

1 Like

OK I can repro it in my own repo, I’m not even sure it’s related to uncurried mode.

I have no idea what could cause this message that doesn’t mean anything:

  In module Fragment:
  Values do not match:
    let use: RescriptRelay.fragmentRefs<
  [> #Dashboard],
> => Web.Dashboard_graphql.Types.fragment
  is not included in
    let use: RescriptRelay.fragmentRefs<
  [> #Dashboard],
> => Web.Dashboard_graphql.Types.fragment

@zth any idea?

That’s really my problem. It doesn’t mean anything XD

OK I came up with an extremely simple repro, I indeed think it’s a bug in the error message so I created an issue.

I guess that means that for some reason RescriptRelay use function is still being generated as a curried function somehow, weird!