Target Branch
0.87
Link to commit or PR to be picked
react/react-native@39cd1df
Description
Requesting this pick for the SwiftPM preview shipped in 0.87.
App-local native modules declared through spm.modules currently enter the generated Swift package graph without the validation applied to library targets. Invalid names, names reserved by React Native, duplicate module names, or names that collide with an autolinked dependency can therefore produce opaque SwiftPM failures or silently drop a module from the build.
This commit applies the same Swift-name validation and collision diagnostics to app-local spm.modules, so configuration mistakes fail early with an actionable message. The change is scoped to the SwiftPM autolinking scripts and includes focused unit coverage. It depends on react/react-native@962aeec and should be picked after that commit.
Target Branch
0.87
Link to commit or PR to be picked
react/react-native@39cd1df
Description
Requesting this pick for the SwiftPM preview shipped in 0.87.
App-local native modules declared through
spm.modulescurrently enter the generated Swift package graph without the validation applied to library targets. Invalid names, names reserved by React Native, duplicate module names, or names that collide with an autolinked dependency can therefore produce opaque SwiftPM failures or silently drop a module from the build.This commit applies the same Swift-name validation and collision diagnostics to app-local
spm.modules, so configuration mistakes fail early with an actionable message. The change is scoped to the SwiftPM autolinking scripts and includes focused unit coverage. It depends on react/react-native@962aeec and should be picked after that commit.