Repository navigation
Fix case-colliding React/ and react/ folders in the prebuilt iOS headers - #60148
Open
j-piasecki wants to merge 1 commit into
Open
j-piasecki wants to merge 1 commit into
j-piasecki wants to merge 1 commit into
Conversation
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.
j-piasecki
marked this pull request as ready for review
November 19, 2026 15:05
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
#58635 moved the C++ module umbrella headers (
React/Debug.h,React/View.hand 15 others) intoReactNativeHeaders.xcframework. There they sit next to thereact/folder. On macOS the disk ignores letter case, so the two folders become one folder. In the 0.89.0-rc.1 and rc.2 artifacts,Headers/has oneReact/folder that also holds allreact/...headers. Because of this, clang warns with-Wnonportable-include-pathon each#include <react/...>. Reanimated reported that this breaks their clang-tidy run. On a disk that does not ignore case, these includes are not found at all.This change puts the umbrella headers back in
React.framework/Headersand marks them asexclude headerin the React module map. Somereact/headers include them, for examplereact/timing/primitives.hincludes<React/Debug.h>. Clang reads an excluded header as plain text, not as part of moduleReact, so this include does not cause theReact -> ReactNativeHeaders_react -> Reactmodule cycle that #58635 fixed. The build script stops with an error if one of these headers is ever added toReact-umbrella.h, because that would cause the cycle again.The Swift C++ check in
headers-verify.jsnow also findsReact.framework, the same as every real app does.Changelog:
[IOS] [FIXED] - Fix
-Wnonportable-include-pathwarnings for<react/...>includes with the prebuilt React Native coreTest Plan:
yarn test packages/react-native/scripts/ios-prebuild packages/react-native/scripts/spm: all tests pass.node scripts/ios-prebuild -s/-b/-c -f Debug) and rannode scripts/ios-prebuild/headers-verify.js --flavor Debug: all checks pass.ReactNativeHeadershas noReact/folder now.#include <react/renderer/mounting/ShadowTree.h>against the artifact headers: 522non-portable pathwarnings before this change, 0 after.non-portable pathwarnings. In each build, a test file compiled with-Werror=nonportable-include-pathincludes the<react/...>headers from the report and all 17<React/X.h>umbrella headers. An Objective-C++ test file with modules on imports moduleReactand includes<React/Debug.h>.