[compiler] Ensure builds use the current checkout's compiler by eps1lon · Pull Request #36881 · react/react · GitHub
Skip to content

[compiler] Ensure builds use the current checkout's compiler#36881

Open
eps1lon wants to merge 1 commit into
react:mainfrom
eps1lon:sebbie/compiler-multi-checkout
Open

[compiler] Ensure builds use the current checkout's compiler#36881
eps1lon wants to merge 1 commit into
react:mainfrom
eps1lon:sebbie/compiler-multi-checkout

Conversation

@eps1lon

@eps1lon eps1lon commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

yarn link doesn't overwrite existing links which can be problematic if a different, older checkout is linked already leading to

yarn build eslint-plugin-react-hooks
yarn run v1.22.22
$ ./scripts/react-compiler/link-compiler.sh
warning There's already a package called "babel-plugin-react-compiler" registered. This command has had no effect. If this command was run in another folder with the same name, the other folder is still linked. Please run yarn unlink in the other folder if you want to register this folder.
$ node ./scripts/rollup/build-all-release-channels.js eslint-plugin-react-hooks
Running: mkdir -p ./compiler/packages/babel-plugin-react-compiler/dist && echo "module.exports = require('../src/index.ts');" > ./compiler/packages/babel-plugin-react-compiler/dist/index.js
 BUILDING  eslint-plugin-react-hooks.development.js (node_dev)

@rollup/plugin-typescript TS2451: Cannot redeclare block-scoped variable '__DEV__'.

error Command failed with exit code 1.

Enforcing that yarn link overwrites fixed it.

For older checkouts without this change, just run cd compiler/packages/babel-plugin-react-compiler && yarn unlink.

@meta-cla meta-cla Bot added the CLA Signed label Jun 25, 2026
@github-actions github-actions Bot added the React Core Team Opened by a member of the React Core Team label Jun 25, 2026
@react-sizebot

Copy link
Copy Markdown

@eps1lon eps1lon marked this pull request as ready for review June 25, 2026 09:55
@eps1lon eps1lon requested a review from poteto June 25, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants