React Compiler migration: foundation (validate against compiled output)#8118
React Compiler migration: foundation (validate against compiled output)#8118mattcosta7 wants to merge 1 commit into
Conversation
…ory files; remove dead react-compiler eslint override
|
|
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
REACT_COMPILER_ALL=trueopt-in inisSupported: 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).*.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.)react-compiler/react-compilerESLint override (and its now-unused import). That plugin isn't installed; as ofeslint-plugin-react-hooks@7.1.1the compiler diagnostics are the granularreact-hooks/*rules (set-state-in-effect,immutability,refs,purity, …), already enabled repo-wide byrecommended-latest. The old override was a silent no-op.Validation
Ran
REACT_COMPILER_ALL=trueacross 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
Merge checklist