Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h - #57518
Closed
ramonclaudio wants to merge 1 commit into
Closed
Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h#57518ramonclaudio wants to merge 1 commit into
ramonclaudio wants to merge 1 commit into
Conversation
RCTTurboModuleArrayBufferTests.mm uses detail::OwnedBytesBuffer, which lives in facebook::react::detail in react/bridging/ArrayBuffer.h, but never imports that header. In the OSS pods build (yarn test-ios / scripts/objc-test.sh) nothing pulls it in transitively, so detail resolves to facebook::jsi::detail and RNTesterUnitTests fails to compile before running a single test. The file already has "using namespace facebook::react", so the import is the whole fix.
|
@cortinico has imported this pull request. If you are a Meta employee, you can view this in D111707925. |
|
@cortinico merged this pull request in e7bb11a. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
Jul 28, 2026
…#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: e3c3cda822ceb33a63f9d6295e3402f76809c189
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:
Imports
react/bridging/ArrayBuffer.hinRCTTurboModuleArrayBufferTests.mm, soRNTesterUnitTestscompiles andyarn test-iosworks on main again.The test uses
detail::OwnedBytesBuffer, which lives infacebook::react::detailin that header, but never imports it, and nothing in its include chain provides it, sodetailresolves tofacebook::jsi::detailand the target fails to compile before running a single test. The file already hasusing namespace facebook::react;, so the import is the entire fix. CI stays green because thetest_ios_rntesterjobs only build the app scheme and never compileRNTesterUnitTests, which means this file has never compiled in the repo since it landed in 54b88d9, and theyarn test-iosflow the contributing docs point at is the only thing that compiles it.Changelog:
[INTERNAL] [FIXED] - Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h in RCTTurboModuleArrayBufferTests
Test Plan:
xcodebuild build-for-testing -workspace RNTesterPods.xcworkspace -scheme RNTester -sdk iphonesimulatorfails with the errors above, zero tests run. With it, the same build succeeds with no errors in the file.clang-format --dry-run --Werror.