Skip to content

Declare RCTBundleURLProviderAllowPackagerServerAccess unconditionally#57517

Open
ramonclaudio wants to merge 1 commit into
react:mainfrom
ramonclaudio:fix/bundle-url-provider-release-noop
Open

Declare RCTBundleURLProviderAllowPackagerServerAccess unconditionally#57517
ramonclaudio wants to merge 1 commit into
react:mainfrom
ramonclaudio:fix/bundle-url-provider-release-noop

Conversation

@ramonclaudio

@ramonclaudio ramonclaudio commented Jul 10, 2026

Copy link
Copy Markdown

Summary:

Declares RCTBundleURLProviderAllowPackagerServerAccess unconditionally 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 as RCTDevLoadingViewSetEnabled.

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 with call 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 RCTBundleURLProviderAllowPackagerServerAccess unconditionally (no-op when packager support is compiled out)

Test Plan:

  • Without the macros (Release defaults), compiling a call against the current headers fails with the ISO C99 undeclared-function error, and compiles with this change.
  • With -DDEBUG=1, compiles before and after. Every read of kRCTAllowPackagerAccess stays inside the guard, so dev behavior is unchanged.
  • Both files pass clang-format --dry-run --Werror, and packages/rn-tester builds 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.
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.
@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 Jul 10, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 10, 2026
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

1 participant