Skip to content

[0.87] Hold app spm.modules names to the same rules as library names #1396

Description

@cipolleschi

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.

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