Skip to content

[0.87] Fail clearly when a dependency references an autolinking plugin host #1392

Description

@cipolleschi

Target Branch

0.87

Link to commit or PR to be picked

react/react-native@90a539c

Description

Requesting this pick for the SwiftPM preview shipped in 0.87.

A library can provide its own SwiftPM autolinking plugin, in which case React Native correctly skips generating a target for that library because the plugin owns its native contribution. However, if another library declares that plugin host as a dependency, the current 0.87 behavior fails without explaining the invalid dependency relationship or how to resolve it.

This commit validates dependencies while generating the SwiftPM autolinking package and emits a clear, actionable error when a referenced target is unavailable because it is owned by an autolinking plugin. The change is narrowly scoped to the SwiftPM autolinking generator and includes unit-test coverage (57 added test lines); the upstream PR reports the unit tests passing. Picking it will turn an opaque build failure in the new 0.87 SwiftPM flow into a diagnosable configuration error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type Pick RequestPick requests to include commits inside a React Native release

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions