1- # This repo vendors the React Compiler (Rust port) from facebook /react PR #36173
1+ # This repo vendors the React Compiler (Rust port) from react /react main
22# into ./react-compiler, then (editing only Cargo.toml for crate naming) sets each
33# crate's published name to `nextjs_react_compiler_*` while keeping the lib/import
44# name, source, and directories as upstream's `react_compiler_*`, and adds the
1010# Both are re-applied every sync because the snapshot is taken fresh.
1111#
1212# just import # one-time: create ./react-compiler (transformed)
13- # just sync # update ./react-compiler to the latest PR state (re-transformed)
13+ # just sync # update ./react-compiler to the latest main state (re-transformed)
1414# just codemod # (re)run codemod on ./react-compiler in place
1515# just patch # apply ./patches/*.patch (Rust source changes the codemod can't express)
1616# just check # cargo check the vendored workspace
1717# just publish-dry # dry-run publishing the whole set (cargo publish --workspace --dry-run)
1818# just publish # publish nextjs_react_compiler + its deps via cargo-release-oxc
1919# just status # show which upstream commit is currently vendored
2020
21- react_repo := " https://github.com/facebook /react.git"
22- pr_ref := " pull/36173/head "
23- src_dir := " compiler" # path of the compiler inside the react monorepo
24- prefix := " react-compiler" # where it lives in THIS repo
21+ react_repo := " https://github.com/react /react.git"
22+ upstream_ref := " main "
23+ src_dir := " compiler" # path of the compiler inside the react monorepo
24+ prefix := " react-compiler" # where it lives in THIS repo
2525
2626# Show available recipes
2727default :
@@ -34,7 +34,7 @@ import: sync
3434sync :
3535 #!/usr/bin/env bash
3636 set -euo pipefail
37- git fetch --depth=1 --no-tags {{react_repo}} {{pr_ref }}
37+ git fetch --depth=1 --no-tags {{react_repo}} {{upstream_ref }}
3838 upstream=" $( git rev-parse FETCH_HEAD) "
3939 tree=" $( git rev-parse " FETCH_HEAD:{{src_dir}}" ) "
4040 # Preserve the currently-published version across the wipe so cargo-release-oxc
4949 just patch
5050 git add -A {{prefix}}
5151 if git diff --cached --quiet -- {{prefix}}; then
52- echo " {{prefix}} already at react {{pr_ref }} @ ${upstream} — nothing to commit."
52+ echo " {{prefix}} already at react {{upstream_ref }} @ ${upstream} — nothing to commit."
5353 else
54- git commit -q -m " vendor: react-compiler from {{pr_ref }} @ ${upstream} (nextjs_react_compiler)"
54+ git commit -q -m " vendor: react-compiler from {{upstream_ref }} @ ${upstream} (nextjs_react_compiler)"
5555 echo " Committed {{prefix}} @ ${upstream} ."
5656 fi
5757
0 commit comments