Skip to content

React Compiler migration: foundation (validate against compiled output)#8118

Draft
mattcosta7 wants to merge 1 commit into
mainfrom
react-compiler-migrate-all-prep
Draft

React Compiler migration: foundation (validate against compiled output)#8118
mattcosta7 wants to merge 1 commit into
mainfrom
react-compiler-migrate-all-prep

Conversation

@mattcosta7

Copy link
Copy Markdown
Contributor

Closes #

React Compiler migration — foundation

Groundwork so we can migrate the remaining components onto the React Compiler and validate them against compiled output.

What this does

  1. REACT_COMPILER_ALL=true opt-in in isSupported: compiles all (non-test) source files, so the full test suite can be run against compiled output to validate a bulk migration (REACT_COMPILER_ALL=true npm test).
  2. Never compile *.test.* / *.stories.* files. The compiler injects hooks (_c/useMemo) into ad-hoc test/story helper components, which throw "Invalid hook call". Excluding them also means migrating a component won't break its own test file. (This fixed spurious ActionMenu/SelectPanel/TooltipV2 failures in validation.)
  3. Remove the dead react-compiler/react-compiler ESLint override (and its now-unused import). That plugin isn't installed; as of eslint-plugin-react-hooks@7.1.1 the compiler diagnostics are the granular react-hooks/* rules (set-state-in-effect, immutability, refs, purity, …), already enabled repo-wide by recommended-latest. The old override was a silent no-op.

Validation

Ran REACT_COMPILER_ALL=true across the full browser suite: 2016/2016 behavioral tests pass compiled (the only failures are pre-existing CSS-module-hash snapshot mismatches unrelated to the compiler — tracked separately).

Rollout

  • None (build/test tooling only; no consumer-facing change)

Merge checklist

  • Added/updated tests (validation harness)
  • Changes are SSR compatible

…ory files; remove dead react-compiler eslint override
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1609573

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. If this doesn't work, you can also use the original workflow here. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant