Commit 5465647
Declare RCTBundleURLProviderAllowPackagerServerAccess unconditionally (#57517)
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)
Pull Request resolved: #57517
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 #57518 so the suite compiles) passes with 0 failures.
Reviewed By: christophpurrer
Differential Revision: D113812551
Pulled By: fabriziocucci
fbshipit-source-id: e3c3cda822ceb33a63f9d6295e3402f76809c1891 parent 908872a commit 5465647
2 files changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
0 commit comments