Repository navigation
Conversation
…llas margelo#2025 moved the React Native version include into `ReactNativeCore.hpp`, which is included by public headers (`ReactProp.hpp`, `ViewComponentDescriptor.hpp`, `ViewPropsHolderState.hpp`). On React Native <= 0.88 there is no `<React/Utils.h>` umbrella, so it falls back to `<cxxreact/ReactNativeVersion.h>`, which puts `cxxreact` back into the NitroModules modulemap and breaks `use_frameworks!` builds with "could not build module 'cxxreact'" (regression of margelo#1520). The `REACT_NATIVE_VERSION_*` macros are only used in `RawPropsCompat.cpp`, so include the version header in that translation unit only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously 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
Since 0.37.2, iOS builds with
use_frameworks!on React Native <= 0.88 fail again with the same error as #1520:#2025 moved the React Native version include into the new
ReactNativeCore.hpp:On React Native <= 0.88 there is no
<React/Utils.h>umbrella, so it falls back to<cxxreact/ReactNativeVersion.h>.ReactNativeCore.hppis included by three public headers, socxxreactends up in the NitroModules modulemap again:ReactProp.hpp>ReactNativeCore.hpp>cxxreact/ReactNativeVersion.hViewComponentDescriptor.hpp>ReactNativeCore.hpp>cxxreact/ReactNativeVersion.hViewPropsHolderState.hpp>ReactNativeCore.hpp>cxxreact/ReactNativeVersion.h#1521 had fixed this by keeping the version include in
RawPropsCompat.cpp.Changes
ReactNativeCore.hpponly includes the renderer core headers (<React/RendererCore.h>or thereact/renderer/core/*fallbacks), plus a comment explaining why the version header must stay out of it.RawPropsCompat.cpp, the only place that usesREACT_NATIVE_VERSION_*, includes<React/Utils.h>or<cxxreact/ReactNativeVersion.h>itself, with the same__has_includecheck as fix: build under React Native 0.89'sRN_STRICT_API#2025. RN 0.89RN_STRICT_APIbuilds keep using the umbrella.Test plan
public_header_filesofNitroModules.podspec: three chains reachcxxreacton 0.37.2, none with this change. Thereact/renderer/core/*headers kept inReactNativeCore.hppdon't reachcxxreacton RN 0.88.1.clang-formatwithconfig/.clang-format: no changes.yarn patchon 0.37.2 in a production app (Expo SDK 58, RN 0.88.1 built from source,use_frameworks! :linkage => :dynamic), which is where the archive failure showed up. The iOS CI build with the patch is running.Regression of #1520, introduced by #2025.