Skip to content

fix(podspec): comment out duplicate scrollview subspec in React-FabricComponents#2969

Draft
Saadnajmi wants to merge 1 commit into
microsoft:mainfrom
Saadnajmi:fix/remove-duplicate-scrollview-subspec
Draft

fix(podspec): comment out duplicate scrollview subspec in React-FabricComponents#2969
Saadnajmi wants to merge 1 commit into
microsoft:mainfrom
Saadnajmi:fix/remove-duplicate-scrollview-subspec

Conversation

@Saadnajmi
Copy link
Copy Markdown
Collaborator

@Saadnajmi Saadnajmi commented May 20, 2026

Summary

The scrollview subspec is declared in BOTH React-Fabric.podspec and React-FabricComponents.podspec, with overlapping source_files:

  • React-Fabric.podspecreact/renderer/components/scrollview/**/*.{m,mm,cpp,h} (recursive)
  • React-FabricComponents.podspecreact/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.). 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 sources 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.

Fix

Comment out (rather than delete, per the macOS diffs-with-upstream guide) the scrollview subspec in React-FabricComponents.podspec, wrapped in # [macOS / # macOS] diff tags with an inline explanation. The recursive glob in React-Fabric.podspec's scrollview subspec already covers everything FabricComponents was listing.

Test plan

  • pod install succeeded against this branch (RCT_NEW_ARCH_ENABLED=0 in packages/rn-tester/).
  • Generated Pods.xcodeproj:
    • React-Fabric-macOS target's Sources phase contains ScrollViewShadowNode.cpp, BaseScrollViewProps.cpp, ScrollEvent.cpp, ScrollViewEventEmitter.cpp, ScrollViewState.cpp
    • React-FabricComponents-macOS target's Sources phase does NOT contain those files ✓
  • Build verification on RNTester (CI will do this)

Discovered while integrating react-native-macos v0.81.6 into a monorepo that links both libReact-Fabric-macOS.a and libReact-FabricComponents-macOS.a via -all_load.

…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 Saadnajmi force-pushed the fix/remove-duplicate-scrollview-subspec branch from 7426ad3 to f5ee485 Compare May 20, 2026 23:25
@Saadnajmi Saadnajmi changed the title fix: remove duplicate scrollview subspec from React-FabricComponents.podspec fix(podspec): comment out duplicate scrollview subspec in React-FabricComponents May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant