zth / rescript-relay

Use Relay with ReScript.
https://rescript-relay-documentation.vercel.app/docs/getting-started
338 stars 53 forks source link

%relay ppx: This function is a curried function where an uncurried function is expected #464

Closed DZakh closed 1 year ago

DZakh commented 1 year ago

I'm migrating to ReScript 11 and got the error:

image

Unfortunately, I couldn't reproduce it in a sandbox, I am still trying... https://codesandbox.io/p/sandbox/rescript-sandbox-forked-6mr964 Maybe you know how it can be fixed?

zth commented 1 year ago

You're not trying to run in uncurried, right? Did you try cleaning?

DZakh commented 1 year ago

Yep.

DZakh commented 1 year ago

Can you try to compile the code in the curried folder https://github.com/DZakh/rescript-relay-curried-repro It doesn't work for me. At the same time the uncurried works fine, even though I didn't pass -uncurried to ppx.

DZakh commented 1 year ago

Hm, I've forked the package, checkouted to 2.x and built ppx. Than I've added ../../../DZakh-forks/rescript-relay/packages/rescript-relay/rescript-relay-ppx/_build/default/bin/RescriptRelayPpxApp.exe to the flags and it worked correctly. Hmmm...

DZakh commented 1 year ago

Can the ppx be cached on my machine somehow?

zth commented 1 year ago

Are you on an m1/2?

DZakh commented 1 year ago

m1

zth commented 1 year ago

Then that's probably it. I commit the built binary to the repo for m1 because there's no GitHub runner for arm. So it might be that 2.0.2 has a binary that's not updated.

DZakh commented 1 year ago

Could you fix it, please 😅 I'm stuck with updating our project to rescript V11

zth commented 1 year ago

Out in 2.0.3, reopen if it doesn't work.

DZakh commented 1 year ago

I've forgotten to write back. It works now, thanks

mishaszu commented 6 months ago

I have the same issue with:

    "@rescript/core": "^1.3.0",
    "rescript": "^11.1.0",
    "rescript-relay": "^2.3.0"

On Ubuntu 22.04.4 LTS (WSL)

If I run install from rescript-relay dir I got:

Error: ENOENT: no such file or directory, copyfile '/home/user/project/node_modules/rescript-relay/ppx-linux' -> '/home/user/project/node_modules/rescript-relay/ppx'