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]: 'Unused 'use no memo' directive' lint warning even though the directive is used #31407

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

Comments

@jthemphill
Copy link

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/#N4Igzg9grgTgxgUxALhAegFQYDoDsAEG+AKgBYCWY+l+Y5AtuQDYCGM+ALhPlGAgMocWHBABp8AIygdqMlkyYQA7lQDmCDh3K5VnUgnysRYGSeEGEANwS48hSQgBmEGAY77aQkflIsqEhBseAAcAE3NQyQBPfFcWOA4AOjsMNDwEAA9glxlHKFwE8ggCXgEogsFzAAptci15AEp8YDt8AHJS-FxuegR6CDbWuGKTfABtcT4OADV5KAQAXXwAXh4+SpEa3DryRoBuIZGZV0cVtYQAJSctnf3W1w5YAjHW-HwqpuWAPlinRLhYK5cBxRK93pY5ghPj8WgQ3vDyKcqid-oCbDIAITLVYQpjzJqw+FE36OVEwIEyHGQg5w4m0DSzPEIKq4-E0ukAXzBHNBcIWNK5tlwmBwBCIAEEfBAIABrTjcGWBYKcGDxOUQU7uCyhOosCRMAxmbwavQGbTBaTJMX4AByEG87mE+CUBlwgUiXB8LFwoQN+BY+GGUGCfpNCFC6kDfgQYGQKXwAEZEoGIPRGDJ6CwYgEowpw9QCFraCxer8fQh2IoIMq-CFwiIAKI6maQ+MAJmTwfrCCbdUZ83wmezBjg8gNkRYjhE7GGabq1Coo7zoXjZBjBjYBlCA89Rcc8RkjpkNqg9ACMAAkrgLTJpMxyAAvGOyKjKAhGhAAWgk0ZX1tZBhduYVDepEs7pgW+AuKEFbyvgwQVs4MD0Cm5IIAk+BIZmmjaKoVqEGkbpZDkmH5IUxTnL2Qj6syhJQbgADCvg6GIrTFAAQniMC8m8cShAA8rgTAxKs+5MHwPH4ABknFEx3rqFeN79qxcKyd6iBMJJMH7lATAcFRuFnGJEl4ByBKtB0fBdD0fQDIcuCjGM6gtky7EILhVHhpMDKQm5HnNuGSyrKU-DlHAGzMmC2ksLp+nNoZAD8zRSZC+AcvgyBdLpmmtA0NL2aM4HzqsHwrDCYLDA5MgAX5OieZEqzOcptWqPVHzsgiSI1e5dUBZEWKrLg2X4AAZCNKWuT1rV9YkAH4ANE34s0YJvLJzHqAliQsr5U31bNkJ5dyYJTM1u19VUQ0KIdtL0ZxsCbe1rQcvlcKVYV6kIEwZyld8y03SdO3+XU4YXdl11Emt8kIIp0jKQ9AHg-CakFJ9D2I6tuB3TAaMdc9eAFTI6IVlREXfdCf1Eoi7wYnxgnCeZN1vADk1AyIoRVMAi0GGZHVvIKfMvW8b23mE5hUcp31ukoynk3RGNySxMMufMD1SzLvMplVXMtfVZxNYDvXA+z6PUF1BvTUbo3jd1rPhvtTLzdiXQINLB0U8SzPzDr52cwBmVq6lPPcvgn1WXL8JoGgJAUFQNCOOQrgTlOsFFSCtDcPOYCkNATCRKo3AmKq5CqKQh7cJDLErfgkf4AA6huYBgKebi+DI85KMwX1utY7A5vHicOEhFjAsTzYReI2cuj3+HEhXG1bQHTIm-zaWC5row24bbN6z5LNbyDiMPE87tvH72tnZbSWbxbbP2wOmXSWClAGToD-m7rC2XV9Y3zbTQlRJJIWqZ0yAKjCjHKN0iYwBJl4FSRIgKNmbMpSSgpBQgA5EAA

Repro steps

useSyncState and useEditable break when the React Compiler runs on it. So I added 'use no memo' to the top of useSyncState and useEditable. In both these places, eslint-plugin-react-compiler reports that the 'use no memo' directive is unused. Even though this directive is the only difference between a passing E2E test and a failing one!

image

How often does this bug happen?

Every time

What version of React are you using?

18.3.1

What version of React Compiler are you using?

19.0.0-beta-6fc168f-20241025

@jthemphill jthemphill added Component: Optimizing Compiler Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug labels Nov 2, 2024
@poteto poteto self-assigned this Nov 4, 2024
@jthemphill jthemphill changed the title [Compiler Bug]: 'Unused 'use no memo' directive' warning even though the directive is used [Compiler Bug]: 'Unused 'use no memo' directive' lint warning even though the directive is used Nov 5, 2024
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