Hold an app's spm.modules names to the same rules as a library's - #58060
Open
chrfalch wants to merge 1 commit into
Open
Hold an app's spm.modules names to the same rules as a library's#58060chrfalch wants to merge 1 commit into
chrfalch wants to merge 1 commit into
Conversation
`spm.modules` names go into the generated manifest exactly as written, with no validation at all: a name React Native reserves produced the same opaque SwiftPM duplicate-name failure a library's name did, a name that is not a Swift identifier produced a manifest SwiftPM refuses to parse, and two modules — or a module and an autolinked library — could quietly claim the same target name. Run the reserved-name and charset checks the library surface already has, and check each name against the targets already emitted, so the app author is told which entry to rename in their own react-native.config.js. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Caution Invalid Base Branch The base branch for this PR is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
An app declares extra native modules through spm.modules in its react-native.config.js. Those names went into the generated package graph unvalidated, and two of the ways they can go wrong fail silently.
This PR fixes this by using the same Swift name collision detection/resolving as we introduced in #58044
Changelog:
[IOS] [FIXED] - Reject colliding or invalid spm.modules names instead of silently dropping a module from the build
Test Plan:
✅ Unit tests/CI