Always set RCT_REMOVE_LEGACY_ARCH for the open-source RNTester iOS build#56821
Open
christophpurrer wants to merge 1 commit into
Open
Always set RCT_REMOVE_LEGACY_ARCH for the open-source RNTester iOS build#56821christophpurrer wants to merge 1 commit into
christophpurrer wants to merge 1 commit into
Conversation
Summary: RNTester (the OSS sample app under `packages/rn-tester`) is the reference open-source iOS build for React Native and is intentionally tracking the new architecture. Today the Podfile inherits the default behavior from `react_native_pods.rb`, where `prepare_react_native_project!` only sets `RCT_REMOVE_LEGACY_ARCH = 1` when the user has not explicitly exported `RCT_REMOVE_LEGACY_ARCH=0` in their shell. That means an environment with the variable set to `0` (or anyone overriding it via CI) silently re-enables the legacy (Paper) architecture for RNTester, which is no longer a supported configuration for this app and now also fails to compile after the legacy-arch removal in the iOS sources. This change forces `ENV['RCT_REMOVE_LEGACY_ARCH'] = '1'` at the top of the RNTester Podfile, before `prepare_react_native_project!` and `use_react_native!` consult the variable. The OSS RNTester build will now always pass `-DRCT_REMOVE_LEGACY_ARCH=1` to the React Native compile, matching what the internal Buck build already gets via the `react-fit` constraint pipeline. Scope: only `packages/rn-tester/Podfile`. The default in `react_native_pods.rb` is unchanged, so OSS apps that consume `use_react_native!` in their own Podfile keep the existing opt-out behavior; this is a per-app override for RNTester only. Changelog: [Internal] - Force `RCT_REMOVE_LEGACY_ARCH=1` for the RNTester iOS sample app Differential Revision: D105118393
|
@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105118393. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
RNTester (the OSS sample app under
packages/rn-tester) is the reference open-source iOS build for React Native and is intentionally tracking the new architecture. Today the Podfile inherits the default behavior fromreact_native_pods.rb, whereprepare_react_native_project!only setsRCT_REMOVE_LEGACY_ARCH = 1when the user has not explicitly exportedRCT_REMOVE_LEGACY_ARCH=0in their shell. That means an environment with the variable set to0(or anyone overriding it via CI) silently re-enables the legacy (Paper) architecture for RNTester, which is no longer a supported configuration for this app and now also fails to compile after the legacy-arch removal in the iOS sources.This change forces
ENV['RCT_REMOVE_LEGACY_ARCH'] = '1'at the top of the RNTester Podfile, beforeprepare_react_native_project!anduse_react_native!consult the variable. The OSS RNTester build will now always pass-DRCT_REMOVE_LEGACY_ARCH=1to the React Native compile, matching what the internal Buck build already gets via thereact-fitconstraint pipeline.Scope: only
packages/rn-tester/Podfile. The default inreact_native_pods.rbis unchanged, so OSS apps that consumeuse_react_native!in their own Podfile keep the existing opt-out behavior; this is a per-app override for RNTester only.Changelog:
[Internal] - Force
RCT_REMOVE_LEGACY_ARCH=1for the RNTester iOS sample appDifferential Revision: D105118393