Skip to content

Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h#57518

Open
ramonclaudio wants to merge 1 commit into
react:mainfrom
ramonclaudio:fix/arraybuffer-test-missing-include
Open

Fix RNTesterUnitTests build by importing react/bridging/ArrayBuffer.h#57518
ramonclaudio wants to merge 1 commit into
react:mainfrom
ramonclaudio:fix/arraybuffer-test-missing-include

Conversation

@ramonclaudio

@ramonclaudio ramonclaudio commented Jul 11, 2026

Copy link
Copy Markdown

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

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 with the errors above and succeeds with this change.
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.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 11, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

1 participant