From e7bb11ae162411ece7569603f1628d24e08a2616 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 13 Jul 2026 10:51:21 -0700 Subject: [PATCH] Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h (#57518) Summary: Imports `react/bridging/ArrayBuffer.h` in `RCTTurboModuleArrayBufferTests.mm`, so `RNTesterUnitTests` compiles and `yarn test-ios` works on main again. The test uses `detail::OwnedBytesBuffer`, which lives in `facebook::react::detail` in that header, but never imports it, and nothing in its include chain provides it, so `detail` resolves to `facebook::jsi::detail` and the target fails to compile before running a single test. The file already has `using namespace facebook::react;`, so the import is the entire fix. CI stays green because the `test_ios_rntester` jobs only build the app scheme and never compile `RNTesterUnitTests`, which means this file has never compiled in the repo since it landed in 54b88d9dea5, and the `yarn test-ios` flow the contributing docs point at is the only thing that compiles it. ``` RCTTurboModuleArrayBufferTests.mm:294:42: error: use of undeclared identifier 'detail'; did you mean 'facebook::jsi::detail'? RCTTurboModuleArrayBufferTests.mm:294:50: error: no member named 'OwnedBytesBuffer' in namespace 'facebook::jsi::detail' ``` ## Changelog: [INTERNAL] [FIXED] - Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h in RCTTurboModuleArrayBufferTests Pull Request resolved: https://github.com/react/react-native/pull/57518 Test Plan: - Without the import, `xcodebuild build-for-testing -workspace RNTesterPods.xcworkspace -scheme RNTester -sdk iphonesimulator` fails with the errors above, zero tests run. With it, the same build succeeds with no errors in the file. - The patched file passes `clang-format --dry-run --Werror`. - With the target compiling, the suite executes for the first time: 162 tests, 0 failures, including all RCTTurboModuleArrayBufferTests cases passing. - Reproduced on GitHub-hosted macOS runners: the same build [fails on pristine main](https://github.com/ramonclaudio/react-native/actions/runs/29134707109) with the errors above and [succeeds with this change](https://github.com/ramonclaudio/react-native/actions/runs/29134707611). Reviewed By: javache Differential Revision: D111707925 Pulled By: cortinico fbshipit-source-id: ac21bcbcd55ba214b2d9f13796198ddcdbec12c1 --- .../RNTesterUnitTests/RCTTurboModuleArrayBufferTests.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/rn-tester/RNTesterUnitTests/RCTTurboModuleArrayBufferTests.mm b/packages/rn-tester/RNTesterUnitTests/RCTTurboModuleArrayBufferTests.mm index f890da05271..fd242c2de83 100644 --- a/packages/rn-tester/RNTesterUnitTests/RCTTurboModuleArrayBufferTests.mm +++ b/packages/rn-tester/RNTesterUnitTests/RCTTurboModuleArrayBufferTests.mm @@ -11,6 +11,7 @@ #import #import #import +#import #import #import