Skip to content

Fix ResizeObserver SwiftPM iOS builds - #58010

Closed
cipolleschi wants to merge 1 commit into
mainfrom
cipolleschi/fix/ios-resize-observer-spm-tests
Closed

Fix ResizeObserver SwiftPM iOS builds#58010
cipolleschi wants to merge 1 commit into
mainfrom
cipolleschi/fix/ios-resize-observer-spm-tests

Conversation

@cipolleschi

Copy link
Copy Markdown
Contributor

Summary:

Commit b03652af789b5e2d0d31554dc61230cd4ad9964d added the ResizeObserver implementation to the React-Fabric SwiftPM target, but did not exclude its C++ test directory.

SwiftPM therefore recursively treated ReactCommon/react/renderer/observers/resize/tests/ResizeObserverTest.cpp as a production framework source. All iOS, iOS Simulator, and Mac Catalyst prebuilt-core slices failed while compiling it because GoogleTest is not a dependency of the production React-Fabric target:

fatal error: 'gtest/gtest.h' file not found

This adds observers/resize/tests to the target's existing test exclusions, matching the treatment of the other React-Fabric test directories and leaving the dedicated C++ test target unchanged.

Changelog:

[INTERNAL] [FIXED] - Exclude ResizeObserver C++ tests from the React-Fabric SwiftPM production target.

Test Plan:

  • Inspected all six failed prebuild_react_native_core jobs from run 32239670611; each failed compiling ResizeObserverTest.cpp due to the missing gtest/gtest.h header.
  • git diff --check
  • swift package --disable-sandbox dump-package and verified that the React-Fabric target excludes observers/resize/tests.
  • A targeted local xcodebuild was attempted, but this environment prevents SwiftPM's sandbox-exec from running before dependency resolution; CI will exercise the original failing build path.

@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 Aug 19, 2026
@meta-codesync

meta-codesync Bot commented Aug 19, 2026

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D116607687.

@meta-codesync meta-codesync Bot closed this in 8c64de2 Aug 19, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Aug 19, 2026
@meta-codesync

meta-codesync Bot commented Aug 19, 2026

Copy link
Copy Markdown

@cipolleschi merged this pull request in 8c64de2.

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. Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant