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

[Compiler Bug]: Upgrading from e552027-20250112 to 27714ef-20250124 no longer optimizes #32269

Open
1 of 4 tasks
SimenB opened this issue Jan 30, 2025 · 0 comments
Open
1 of 4 tasks
Assignees
Labels
Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug

Comments

@SimenB
Copy link
Contributor

SimenB commented Jan 30, 2025

What kind of issue is this?

  • React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
  • babel-plugin-react-compiler (build issue installing or using the Babel plugin)
  • eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
  • react-compiler-healthcheck (build issue installing or using the healthcheck script)

Link to repro

https://playground.react.dev/#N4Igzg9grgTgxgUxALhHCA7MAXABAYQgFsAHZXAJQQEM5sA6AMX1wF5cAKASjYD5dgAHQy5c6LHgDaYBABsEdBABMAqjJhgANLhnYAynIXZlahBoC6bXFBl7s1YwB4YNJZlkBPXKZgB5GACCJACWPpLmvBzhXADcwsKi4jjW6gCSSmBWMvKKqupg9ETUJBwcNmY8rPzlMPTBSrHxImKYyXjs3HwCuAmiLRK41DAwVuFxGL2iAGYQIxxJeNlGJuq4EFMpZulgPELNfYPD9CQ2ABYcS7k+jfu4AL6TuC7YsBPND2+iz6+4GFCysnGd3GIDuQA

Repro steps

No reproduction steps required - the playground shows the error.

https://github.com/facebook/react/pull/32093/files#diff-20b95f808e27819de316464ff5819940614b11b694deb9f1c4fecf39dff6b6e4R1607

As a workaround I've just extracted the function (in our real app it's a queryFn to react-query) outside of the component and pass it the arguments instead, so we no longer loop inside the component itself.


For future reference (for when this is fixed and the playground no longer shows an error), this is the current result:

Image

How often does this bug happen?

Every time

What version of React are you using?

N/A

What version of React Compiler are you using?

27714ef-20250124

@SimenB SimenB added Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants