Skip to content

fix(0.81, podspec): comment out duplicate scrollview subspec in React-FabricComponents#2970

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

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

Conversation

@Saadnajmi
Copy link
Copy Markdown
Collaborator

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.

…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]
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