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

Typesafe Updaters with TypeScript language in compiler config cause compiler to panic #3965

Open
captbaritone opened this issue Jun 10, 2022 · 6 comments

Comments

@captbaritone
Copy link
Contributor

Ideally we could catch this and emit a diagnostic pointing to the use of the typesafe updater.

╭─[00:00]: captbaritone at moffo in ~/projects/relay-resolvers-todomvc on branch*
╰─➤ yarn relay
yarn run v1.22.18
warning ../package.json: No license field
$ relay-compiler
[INFO] querying files to compile...
[INFO] [default] compiling...
thread 'tokio-runtime-worker' panicked at 'Getters and setters with different types are not implemented in typescript. See https://github.com/microsoft/TypeScript/issues/43662', crates/relay-typegen/src/typescript.rs:240:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ERROR] A thread that the Relay compiler spun up did not shut down gracefully: panic
[ERROR] Compilation failed.
[ERROR] Unable to run relay compiler. Error details:
A thread that the Relay compiler spun up did not shut down gracefully: panic
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
╭─[00:00]: captbaritone at moffo in ~/projects/relay-resolvers-todomvc on branch*
╰─➤
@captbaritone
Copy link
Contributor Author

cc @rbalicki2

@TJ09
Copy link

TJ09 commented Sep 20, 2023

The listed blocker, microsoft/TypeScript#43662, is resolved as of TypeScript 5.1 (released in June, we're now on 5.2). I'm not sure if Relay has a process for requiring a specific minimum version of TS, but is it now theoretically possible to remove the compiler restriction and allow typesafe updaters on TypeScript?

@tobias-tengler
Copy link
Contributor

I've already implemented it here: #4370
Just needs to be merged...

@ahmetuysal
Copy link

any idea on when this will be merged @tobias-tengler?

@tobias-tengler
Copy link
Contributor

It's all ready to go from my side for a couple months now :) Someone on the Relay team like @captbaritone or @alunyov needs to review and merge it...

@tobias-tengler
Copy link
Contributor

This can now be closed!

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

4 participants