Skip to content

Restore react-native/setup-env references on main - #57560

Closed
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D112101450
Closed

Restore react-native/setup-env references on main#57560
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D112101450

Conversation

@huntie

Copy link
Copy Markdown
Contributor

Summary:
Reverts D112002434.

This fix was needed on 0.87-stable but not on main, since the setup-env-in-bundle-graph fix (#57492) was already present, see file at time of D112002434:

// NOTE: This delegates to the `'react-native/setup-env'` entry point (rather
// than calling `setUpDefaultReactNativeEnvironment` directly) so that
// `src/setup-env.js` is pulled into the module graph. Metro's
// `getModulesRunBeforeMainModule` only runs modules that are already part of
// the bundle, and `InitializeCore` is a guaranteed graph entry (via
// `ReactNativePrivateInitializeCore`). This keeps `'react-native/setup-env'`
// reachable so it runs before the main module.
require('../../src/setup-env');

See #57559 for more info.

Changelog: [Internal]

Differential Revision: D112101450

Summary:
Reverts D112002434.
This fix was needed on `0.87-stable` but not on `main`, since the `setup-env`-in-bundle-graph fix (react#57492) was already present, see file at time of D112002434:
https://github.com/react/react-native/blob/08c323346be6c0fbbd70900d48435f977a78a1bb/packages/react-native/Libraries/Core/InitializeCore.js#L30-L37
See react#57559 for more info.
Changelog: [Internal]
Differential Revision: D112101450
@meta-clameta-claBot 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 Jul 15, 2026
@meta-codesync

Copy link
Copy Markdown

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

@meta-codesyncmeta-codesyncBot added the Merged This PR has been merged. label Jul 16, 2026
@meta-codesync

Copy link
Copy Markdown

This pull request has been merged in afa2a60.

react-native-bot pushed a commit that referenced this pull request Jul 16, 2026
Summary:
Pull Request resolved: #57560
Reverts D112002434.
This fix was needed on `0.87-stable` but not on `main`, since the `setup-env`-in-bundle-graph fix (#57492) was already present, see file at time of D112002434:
https://github.com/react/react-native/blob/08c323346be6c0fbbd70900d48435f977a78a1bb/packages/react-native/Libraries/Core/InitializeCore.js#L30-L37
See #57559 for more info.
Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D112101450
fbshipit-source-id: 435a24e72415e18b5e3d6a5144ed805adc415a95
@huntie
huntie deleted the export-D112101450 branch July 16, 2026 12:39
douglowder added a commit to react-native-tvos/react-native-tvos that referenced this pull request Jul 29, 2026
Fix issues with package renaming of `react-native` and `virtualized-lists`.
- Allow unit tests to run without manually renaming packages
- Ensure Typescript generation and tests work in all cases
- Fix release build breakage caused by the restoration of `react-native/set-env` usage in react/react-native#57560
## Test Plan
Unit tests and build workflows should succeed.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Chris Goldsby <cgoldsby@gmail.com>
douglowder added a commit to react-native-tvos/react-native-tvos that referenced this pull request Jul 30, 2026
Fix issues with package renaming of `react-native` and `virtualized-lists`.
- Allow unit tests to run without manually renaming packages
- Ensure Typescript generation and tests work in all cases
- Fix release build breakage caused by the restoration of `react-native/set-env` usage in react/react-native#57560
## Test Plan
Unit tests and build workflows should succeed.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Chris Goldsby <cgoldsby@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@huntie