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.
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.