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

Universe: use Relay 13 and the new Rust Compiler #2119

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

mrtnzlml
Copy link
Member

@mrtnzlml mrtnzlml commented Apr 2, 2021

This commit upgrades Relay to version 13 and switches from the old
Relay Compiler to the new Rust one (since both things go together).

Basically, the main change is that now we have only one Relay config
for the whole monorepo and the compiler is being executed for the whole
monorepo as well (while being much faster). Additionally, Relay support
is directly integrated into Flow so in many cases I simply removed
previous Flow types (see useLazyLoadQuery and useFragment).

There is still ongoing effort to improve the Flow types in Relay so not
everything is finalized. For this reason I decided to use "Compat" types
mode. Similarly, some hooks (useMutation and usePreloadedQuery for
example) still require explicit types information so I didn't change
these yet. Regardless of that, we are pretty close to use "Final" types.
We just need to wait for the Relay team to finish everything.

Many issues were already resolved but there are still some that need to
be fixed (not blocking this PR):

Important links with additional information:

@mrtnzlml mrtnzlml force-pushed the universe_new_relay_compiler branch from efa7cbd to 1ad374d Compare April 13, 2021 15:39
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website April 13, 2021 15:39 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay April 13, 2021 15:39 Inactive
@mrtnzlml mrtnzlml force-pushed the universe_new_relay_compiler branch from 1ad374d to 9067987 Compare April 30, 2021 01:52
@vercel vercel bot temporarily deployed to Preview – universe-example-relay April 30, 2021 01:52 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website April 30, 2021 01:52 Inactive
@mrtnzlml mrtnzlml force-pushed the universe_new_relay_compiler branch from 9067987 to 4dc7202 Compare April 30, 2021 02:10
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website April 30, 2021 02:10 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay April 30, 2021 02:10 Inactive
@mrtnzlml mrtnzlml force-pushed the universe_new_relay_compiler branch from 4dc7202 to 62bab7a Compare May 1, 2021 16:36
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website May 1, 2021 16:36 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay May 1, 2021 16:36 Inactive
@mrtnzlml mrtnzlml self-assigned this Jun 17, 2021
@mrtnzlml mrtnzlml force-pushed the universe_new_relay_compiler branch from 62bab7a to 1d0da05 Compare June 25, 2021 18:34
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website June 25, 2021 18:34 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay June 25, 2021 18:34 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website September 3, 2021 01:01 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay September 3, 2021 01:01 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website September 3, 2021 01:17 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay September 3, 2021 01:17 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website November 13, 2021 04:45 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay November 13, 2021 04:45 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website January 6, 2022 20:23 Inactive
@mrtnzlml mrtnzlml changed the title Universe: use a new Relay (Rust) Compiler Universe: use Relay 13 and the new Rust Compiler Jan 6, 2022
@mrtnzlml mrtnzlml marked this pull request as ready for review January 6, 2022 20:23
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website January 6, 2022 20:27 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay January 6, 2022 20:27 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-example-relay January 6, 2022 20:33 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website January 6, 2022 20:33 Inactive
"relay-runtime": "^12.0.0"
"react-relay": "^13.0.0",
"relay-compiler": "^13.0.0",
"relay-config": "0.0.0-main-d92b9e55",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove Relay Config together with the fetch-schema.js bin removal. This config dependency is useless in Relay 13+

This commit upgrades Relay to version 13 and switches from the old
Relay Compiler to the new Rust one (since both things go together).

Basically, the main change is that now we have only one Relay config
for the whole monorepo and the compiler is being executed for the whole
monorepo as well (while being much faster). Additionally, Relay support
is directly integrated into Flow so in many cases I simply removed
previous Flow types (see `useLazyLoadQuery` and `useFragment`).

There is still ongoing effort to improve the Flow types in Relay so not
everything is finalized. For this reason I decided to use "Compat" types
mode. Similarly, some hooks (`useMutation` and `usePreloadedQuery` for
example) still require explicit types information so I didn't change
these yet. Regardless of that, we are pretty close to use "Final" types.
We just need to wait for the Relay team to finish everything.

Many issues were already resolved but there are still some that need to
be fixed (not blocking this PR):

- facebook/relay#3700
- relayjs/eslint-plugin-relay#131
- prettier/prettier#6102

Important links with additional information:

- https://relay.dev/blog/2021/12/08/introducing-the-new-relay-compiler/
- https://github.com/facebook/relay/releases/tag/v13.0.0
- https://github.com/facebook/relay/releases/tag/v13.0.0-rc.0
- https://github.com/facebook/relay/releases/tag/v13.0.0-rc.1
- https://github.com/facebook/relay/releases/tag/v13.0.0-rc.2
@vercel vercel bot temporarily deployed to Preview – universe-example-relay January 7, 2022 21:27 Inactive
@vercel vercel bot temporarily deployed to Preview – universe-sx-tailwind-website January 7, 2022 21:27 Inactive
@kodiakhq kodiakhq bot merged commit bc3d107 into master Jan 7, 2022
@kodiakhq kodiakhq bot deleted the universe_new_relay_compiler branch January 7, 2022 21:31
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 this pull request may close these issues.

2 participants