fix(podspec): comment out duplicate scrollview subspec in React-FabricComponents#2969
Draft
Saadnajmi wants to merge 1 commit into
Draft
fix(podspec): comment out duplicate scrollview subspec in React-FabricComponents#2969Saadnajmi wants to merge 1 commit into
Saadnajmi wants to merge 1 commit into
Conversation
…cComponents
# [macOS
The `scrollview` subspec is declared in BOTH `React-Fabric.podspec` and
`React-FabricComponents.podspec`, with overlapping `source_files`:
React-Fabric.podspec:
react/renderer/components/scrollview/**/*.{m,mm,cpp,h} (recursive)
React-FabricComponents.podspec:
react/renderer/components/scrollview/*.{m,mm,cpp,h}
react/renderer/components/scrollview/platform/cxx/**/*
Both globs include the same top-level files (ScrollViewShadowNode.cpp,
BaseScrollViewProps.cpp, ScrollEvent.cpp, etc.). After `pod install`,
those source files end up in both the React-Fabric and React-FabricComponents
Pods targets.
What breaks:
- Consumers that link both libraries (e.g. via `-all_load`) hit
duplicate symbol errors at link time.
- Consumers that deduplicate by hand by dropping scrollview from one
target break differently: React-Fabric's
mounting/internal/CullingContext.cpp references ScrollViewShadowNode,
so if the dedup drops it from React-Fabric, link fails with
`Undefined symbols: ScrollViewShadowNode`.
Comment out (rather than delete) the duplicate scrollview subspec in
React-FabricComponents, using the macOS diff-tag convention. The
recursive glob in React-Fabric.podspec's scrollview subspec already
covers everything FabricComponents was listing
(top-level files + scrollview/platform/cxx/**/*).
# macOS]
7426ad3 to
f5ee485
Compare
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
The
scrollviewsubspec is declared in BOTHReact-Fabric.podspecandReact-FabricComponents.podspec, with overlappingsource_files:React-Fabric.podspec→react/renderer/components/scrollview/**/*.{m,mm,cpp,h}(recursive)React-FabricComponents.podspec→react/renderer/components/scrollview/*.{m,mm,cpp,h}+scrollview/platform/cxx/**/*(non-recursive + platform/cxx)Both globs include the same top-level files (
ScrollViewShadowNode.cpp,BaseScrollViewProps.cpp,ScrollEvent.cpp, etc.). Afterpod install, those source files end up in both theReact-FabricandReact-FabricComponentsPods targets.What breaks
-all_load) hit duplicate symbol errors at link time.React-Fabric'smounting/internal/CullingContext.cppreferencesScrollViewShadowNode, so if the dedup drops it fromReact-Fabric, link fails withUndefined symbols: ScrollViewShadowNode.Fix
Comment out (rather than delete, per the macOS diffs-with-upstream guide) the
scrollviewsubspec inReact-FabricComponents.podspec, wrapped in# [macOS/# macOS]diff tags with an inline explanation. The recursive glob inReact-Fabric.podspec's scrollview subspec already covers everything FabricComponents was listing.Test plan
pod installsucceeded against this branch (RCT_NEW_ARCH_ENABLED=0inpackages/rn-tester/).Pods.xcodeproj:React-Fabric-macOStarget's Sources phase containsScrollViewShadowNode.cpp,BaseScrollViewProps.cpp,ScrollEvent.cpp,ScrollViewEventEmitter.cpp,ScrollViewState.cpp✓React-FabricComponents-macOStarget's Sources phase does NOT contain those files ✓RNTester(CI will do this)Discovered while integrating
react-native-macosv0.81.6 into a monorepo that links bothlibReact-Fabric-macOS.aandlibReact-FabricComponents-macOS.avia-all_load.