zth / rescript-relay

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

Something went wrong trying to analyze the ReScript project with compiler v11-rc.4 #466

Closed mununki closed 11 months ago

mununki commented 11 months ago

I've been using the cli command to remove unused field using ci. I encounter that the cli command failed to run with the compiler v11-rc.4 today.

$ npx rescript-relay-cli remove-unused-fields --ci --verbose
✖ Something went wrong trying to analyze the ReScript project.

I'm using rescript-relay@^v2.0.0

zth commented 11 months ago

I assume you've tried cleaning etc?

mununki commented 11 months ago

Yes, I deleted the generated directory /src/__generated__ for my case, then re-generated the project with relay watch command. But still same.

zth commented 11 months ago

I can't reproduce this. Could you go into the CLI JS code and log what the actual error is? If you search for "Something went wrong trying to analyze the ReScript project." is should be easy to find a place where you can log.

mununki commented 11 months ago

Oh, I didn't know that the cli utilize reanalyze before. https://github.com/zth/rescript-relay/blob/7ef3acf2ebae22bf2f0aa94ae98d9a342c73cb3f/packages/rescript-relay-cli/commands/removeUnusedFieldsCommand.ts#L58

I guess reanalyze couldn't find the rescript.json. I'll close this issue and open it in upstream.

zth commented 11 months ago

Ahhh yeah, this is going to be a problem until @rescript/tools ship and we can depend on that. The CLI currently uses an old unupdated version of reanalyze. The tools package ships the updated one, which eventually will cover the rescript.json case as well.

DZakh commented 10 months ago

I've come across the issue. Why is it completed?

zth commented 10 months ago

This should be fixed in the latest release (went out today).

zth commented 10 months ago

@DZakh please confirm.

DZakh commented 10 months ago

I can't update rescript-relay 🥲 https://github.com/zth/rescript-relay/issues/476

DZakh commented 10 months ago

It works, thanks!