Skip to content

Commit e7bb11a

Browse files
ramonclaudiometa-codesync[bot]
authored andcommitted
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 54b88d9, 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: #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
1 parent 4be68ef commit e7bb11a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/rn-tester/RNTesterUnitTests/RCTTurboModuleArrayBufferTests.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#import <ReactCommon/RCTTurboModule.h>
1212
#import <ReactCommon/TestCallInvoker.h>
1313
#import <hermes/hermes.h>
14+
#import <react/bridging/ArrayBuffer.h>
1415

1516
#import <list>
1617
#import <vector>

0 commit comments

Comments
 (0)