Commit e7bb11a
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: ac21bcbcd55ba214b2d9f13796198ddcdbec12c11 parent 4be68ef commit e7bb11a
1 file changed
Lines changed: 1 addition & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments