Skip to content

[0.89] Fix case-colliding React/ and react/ folders in the prebuilt iOS headers - #60150

Open
j-piasecki wants to merge 1 commit into
react:0.89-stablefrom
j-piasecki:jpiasecki/0.89-prebuilt-umbrella-headers-case
Open

j-piasecki wants to merge 1 commit into
react:0.89-stablefrom
j-piasecki:jpiasecki/0.89-prebuilt-umbrella-headers-case

Conversation

@j-piasecki

Copy link
Copy Markdown
Contributor

Summary:

This is a cherry-pick of #60148 to 0.89-stable.

In the 0.89.0-rc.1 and rc.2 artifacts, the C++ module umbrella headers (React/Debug.h, React/View.h and 15 others) sit next to the react/ folder in ReactNativeHeaders.xcframework. On macOS the disk ignores letter case, so the two folders become one React/ folder. Because of this, clang warns with -Wnonportable-include-path on each #include <react/...>, and Reanimated's clang-tidy run fails. This change puts the umbrella headers back in React.framework/Headers and marks them as exclude header in the React module map, so they do not cause the module cycle that #58635 fixed. See #60148 for the full description.

The pick had one small conflict in headers-spec.js: 0.89 writes one Flow type as {[string]: Array<string>}. I kept the 0.89 form.

Changelog:

[IOS] [FIXED] - Fix -Wnonportable-include-path warnings for <react/...> includes with the prebuilt React Native core

Test Plan:

  • yarn test packages/react-native/scripts/ios-prebuild on this branch: all tests pass.
  • The Reanimated team built the Debug artifacts from 0.89.0-rc.2 with this change, used them in their app, and confirmed that the warnings are gone.
  • See Fix case-colliding React/ and react/ folders in the prebuilt iOS headers #60148 for the tests on main: the header check script, a direct compile of the reported include (522 warnings before, 0 after), and RNTester builds through CocoaPods (no frameworks, static and dynamic frameworks) and SwiftPM.

The C++ module umbrellas (React/Debug.h, React/View.h and 15 others) shipped in ReactNativeHeaders next to the react/ folder. On a case-insensitive filesystem the two folders merge, so every #include <react/...> warns with -Wnonportable-include-path. On a case-sensitive filesystem these includes do not resolve.

Ship the umbrellas in React.framework again and list them as `exclude header` in its module map. Including them from a react/ header then stays textual and does not close the React -> ReactNativeHeaders_react -> React module cycle.

The Swift C++ interop gate in headers-verify now also searches React.framework, as every real consumer does.
@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 Nov 19, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Nov 19, 2026
@j-piasecki
j-piasecki marked this pull request as ready for review November 19, 2026 15:04

This branch has not been deployed

No deployments
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. p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner Pick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant