fix(podspec): comment out duplicate scrollview subspec in React-FabricComponents - #2969
Merged
Saadnajmi merged 1 commit intoJul 7, 2026
Conversation
Saadnajmi
force-pushed
the
fix/remove-duplicate-scrollview-subspec
branch
from
May 20, 2026 23:25
7426ad3 to
f5ee485
Compare
Saadnajmi
marked this pull request as ready for review
June 5, 2026 07:12
tido64
approved these changes
Jun 5, 2026
tido64
left a comment
Member
There was a problem hiding this comment.
Is this something that should be upstreamed?
Collaborator
Author
Yeah. I should probably start a new list or add it to "Road to 0.83" |
…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]
Saadnajmi
force-pushed
the
fix/remove-duplicate-scrollview-subspec
branch
from
June 5, 2026 17:48
f5ee485 to
909a253
Compare
Saadnajmi
added a commit
that referenced
this pull request
Jul 7, 2026
…-FabricComponents (#2970) ## Summary Backport of the changes from branch `fix/remove-duplicate-scrollview-subspec` to `0.81-stable`. Original PR: #2969 ## Test Plan Same as the original PR — verified locally via `pod install` in `packages/rn-tester/` that: - `React-Fabric-macOS` target's Sources phase contains `ScrollViewShadowNode.cpp` (and the other scrollview sources). - `React-FabricComponents-macOS` target's Sources phase does NOT contain those files. - No duplicate symbols when both libraries are linked.
meta-codesync Bot
pushed a commit
to react/react-native
that referenced
this pull request
Jul 7, 2026
…onents (#57452) Summary: Upstream version of our react-native-macos fix (microsoft#2969). The `scrollview` subspec is declared in both `React-Fabric.podspec` (recursive `scrollview/**/*` glob) and `React-FabricComponents.podspec` (`scrollview/*` + `platform/cxx` + `platform/ios`). The globs overlap, so after `pod install` the same sources (`ScrollViewShadowNode.cpp`, `BaseScrollViewProps.cpp`, `ScrollEvent.cpp`, etc.) land in both the `React-Fabric` and `React-FabricComponents` Pods targets, and consumers that link both (e.g. via `-all_load`) hit duplicate symbol errors. `React-Fabric.podspec`'s recursive glob already covers everything FabricComponents listed, so this removes the duplicate subspec. Note on SPM: the SPM manifest (`Package.swift`) handles scrollview differently — it's assigned solely to the `React-Fabric` target, with no FabricComponents scrollview target. This is an existing divergence between the CocoaPods and SPM setups; this PR only touches CocoaPods, so SPM is unaffected. ## Changelog: [Internal] - Pull Request resolved: #57452 Test Plan: CI should pass. Reviewed By: christophpurrer Differential Revision: D110914625 Pulled By: cipolleschi fbshipit-source-id: 2617470ef71ba2e827646d087ab876ee008b88c3
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.