Skip to content

Use per-session output directory for Fantom native builds (#56521)#56521

Closed
javache wants to merge 1 commit into
react:mainfrom
javache:export-D101692926
Closed

Use per-session output directory for Fantom native builds (#56521)#56521
javache wants to merge 1 commit into
react:mainfrom
javache:export-D101692926

Conversation

@javache

@javache javache commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary:

Fixes a race condition where multiple concurrent Jest processes sharing the same checkout could delete each others native binaries. The globalSetup in build.js previously called fs.rmSync on the shared native-builds/ directory before rebuilding, which could delete binaries that another process workers were actively using (causing ENOENT when spawning the fantom-tester binary).

Each Jest session now writes native binaries to native-builds/<run-id>/, matching the existing pattern used for JS build outputs (getTestBuildOutputPath). The buck isolation directory is shared across sessions so builds remain cached.

Changelog: [Internal]

Reviewed By: christophpurrer, lenaic

Differential Revision: D101692926

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 20, 2026
@meta-codesync

meta-codesync Bot commented Apr 20, 2026

Copy link
Copy Markdown

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D101692926.

@meta-codesync meta-codesync Bot changed the title Use per-session output directory for Fantom native builds Use per-session output directory for Fantom native builds (#56521) Apr 21, 2026
@javache javache force-pushed the export-D101692926 branch from 05ef52f to 3ae3696 Compare April 21, 2026 10:00
javache added a commit to javache/react-native that referenced this pull request Apr 21, 2026
Summary:

Fixes a race condition where multiple concurrent Jest processes sharing the same checkout could delete each others native binaries. The `globalSetup` in `build.js` previously called `fs.rmSync` on the shared `native-builds/` directory before rebuilding, which could delete binaries that another process workers were actively using (causing `ENOENT` when spawning the fantom-tester binary).

Each Jest session now writes native binaries to `native-builds/<run-id>/`, matching the existing pattern used for JS build outputs (`getTestBuildOutputPath`). The buck isolation directory is shared across sessions so builds remain cached.

Changelog: [Internal]

Reviewed By: christophpurrer, lenaic

Differential Revision: D101692926
Summary:
Pull Request resolved: react#56521

Fixes a race condition where multiple concurrent Jest processes sharing the same checkout could delete each others native binaries. The `globalSetup` in `build.js` previously called `fs.rmSync` on the shared `native-builds/` directory before rebuilding, which could delete binaries that another process workers were actively using (causing `ENOENT` when spawning the fantom-tester binary).

Each Jest session now writes native binaries to `native-builds/<run-id>/`, matching the existing pattern used for JS build outputs (`getTestBuildOutputPath`). The buck isolation directory is shared across sessions so builds remain cached.

Changelog: [Internal]

Reviewed By: christophpurrer, lenaic

Differential Revision: D101692926
@javache javache force-pushed the export-D101692926 branch from 3ae3696 to 9fff1c0 Compare April 21, 2026 10:04
@javache javache closed this May 6, 2026
@javache javache deleted the export-D101692926 branch May 6, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant