Declare RCTBundleURLProviderAllowPackagerServerAccess unconditionally#57517
Open
ramonclaudio wants to merge 1 commit into
Open
Declare RCTBundleURLProviderAllowPackagerServerAccess unconditionally#57517ramonclaudio wants to merge 1 commit into
ramonclaudio wants to merge 1 commit into
Conversation
The function is declared only under RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY, so it vanishes in Release and any out-of-tree caller fails with "call to undeclared function" (broke expo/expo Release CI, worked around in expo/expo#47688). Mirror the RCTDevLoadingViewSetEnabled shape: unconditional declaration and definition, every read of the flag stays gated, so builds without packager support get a no-op instead of a compile error.
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:
Declares
RCTBundleURLProviderAllowPackagerServerAccessunconditionally and keeps every read of the flag gated, so the function is a no-op instead of a compile error when packager support is compiled out, the same shape asRCTDevLoadingViewSetEnabled.The function exists only for out-of-tree callers (the header comment describes test runs disabling packager access, and nothing in this repo calls it), but it is declared only under
#if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY, so it vanishes in Release and an unguarded call fails withcall to undeclared function 'RCTBundleURLProviderAllowPackagerServerAccess'. That broke every Release CI build in expo/expo when expo/expo#47638 called it directly, worked around at the call sites in expo/expo#47688. Builds with packager support keep identical behavior and preprocessor output.Changelog:
[IOS] [CHANGED] - Declare
RCTBundleURLProviderAllowPackagerServerAccessunconditionally (no-op when packager support is compiled out)Test Plan:
-DDEBUG=1, compiles before and after. Every read ofkRCTAllowPackagerAccessstays inside the guard, so dev behavior is unchanged.clang-format --dry-run --Werror, andpackages/rn-testerbuilds in Release with this change. The RNTester unit suite (162 tests, run together with Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h #57518 so the suite compiles) passes with 0 failures.