Make all headers public and add #ifdef __cplusplus #1150
Reference in New Issue
Block a user
No description provided.
Delete Branch "cppheaders"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This change is mostly needed to support the new react-native architecture with Swift. Some private yoga headers end up being included in the swift build and result in compilation failure since swift cannot compile c++ modules. See https://github.com/facebook/react-native/pull/33381.
The most reliable fix is to include all headers as public headers, and add
#ifdef __cplusplus
to those that include c++. This is already what we do for other headers, this applies this to all headers.Tested in the YogaKitSample, and also in a react-native app.
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Hi @janicduplessis, can we revert https://github.com/facebook/react-native/pull/33381 as the next step?
Yes, please. But I think the change to react_native_pods.rb don’t need to be reverted. I can create a pr for this later today if it works.
Yea we don't want to revert the whole thing. Sounds good @Kudo you can do the follow up PR in react-native.
What's the process now to get this version of Yoga with the fix to be consumed by RN? (yoga is actually missing from https://reactnative.dev/contributing/release-dependencies 😅)
Yoga is dir-synced inside
ReactCommon/yoga/yoga
so we don't need any version bump at all at this stage 👍ok so we just need to have (basically) a sync commit land on master, and that one could potentially be even cherry-picked?
@kelset Correct. This landed on
main
43f831b23c
and can be cherry-picked wherever its needed.@Kudo @brentvatne you were saying that you wanted to fix in 0.69 right for Expo next SDK version, right?
the revert pr is in https://github.com/facebook/react-native/pull/33973. we want to have both
43f831b23c
and https://github.com/facebook/react-native/pull/33973 in 0.69. thanks for making it happens.@Kudo , sounds good - can you add those requests here? https://github.com/reactwg/react-native-releases/discussions/21
since they are about Yoga I feel we'd need a new RC to ensure everything goes smoothly 😅
thanks @kelset! i'll add the commits after https://github.com/facebook/react-native/pull/33973 landed.
Pull request closed