Skip to content

Fix silent tar extraction failure on EdenFS in replace-rncore-version#55797

Open
cipolleschi wants to merge 1 commit intomainfrom
cipolleschi/fix-replace-rncore-version-for-eden-main
Open

Fix silent tar extraction failure on EdenFS in replace-rncore-version#55797
cipolleschi wants to merge 1 commit intomainfrom
cipolleschi/fix-replace-rncore-version-for-eden-main

Conversation

@cipolleschi
Copy link
Contributor

Summary:

On EdenFS, tar -xf extraction directly into an EdenFS-mounted directory silently produces incomplete results — only the first slice of the tarball (ios-arm64) gets extracted, while the remaining entries (catalyst, simulator, top-level Headers) have their directories created but files are missing. The replace-rncore-version.js script didn't check tar's exit code, so it would write the config file and subsequent builds would skip re-extraction.

This fix extracts the tarball to a temporary directory on a regular filesystem first, verifies the extraction succeeded (exit code + expected file check), then moves the results into the final location. This is adapted from D94625297 (which targeted 0.83) to work with the current main branch, preserving the v0.84 behavior of only deleting subdirectories in React-Core-prebuilt (keeping files like React-VFS.yaml).

Changelog:

[IOS] [FIXED] - Fix silent tar extraction failure on EdenFS in replace-rncore-version.js by extracting to a temp directory first

Test Plan:

Validated by the original patch author on EdenFS in D94625297. The logic is equivalent, adapted for the v0.84 code which preserves files in the target directory.

@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 Feb 27, 2026
Extract tarball to a temporary directory on a regular filesystem first,
then move results into the final location. This avoids EdenFS silently
producing incomplete tar extractions. Also adds exit code checking and
extraction verification.

Adapted from D94625297 for the current main branch.
@cipolleschi cipolleschi force-pushed the cipolleschi/fix-replace-rncore-version-for-eden-main branch from 2dc7a3c to ecaac38 Compare February 27, 2026 10:40
@meta-codesync
Copy link

meta-codesync bot commented Feb 27, 2026

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D94653392.

Copy link
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

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. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants