[iOS][swiftpm] Drop the unused publicHeadersPath from spm.modules - #58059
Open
chrfalch wants to merge 1 commit into
Open
[iOS][swiftpm] Drop the unused publicHeadersPath from spm.modules#58059chrfalch wants to merge 1 commit into
chrfalch wants to merge 1 commit into
Conversation
An app could declare `publicHeadersPath` on an `spm.modules` entry, and the value never reached SwiftPM: every module is emitted through a synth wrapper whose manifest hardcodes `publicHeadersPath: "include"`. Nor does the field have a job to do. That `include/` is a symlink to the module's slice of the header farm, so the wrapper already exposes the whole header tree as the module's public interface. A declared value could only narrow that. The field was vestigial parity with the podspec `s.public_header_files` it was modelled on. Removing it from the config surface only. `SpmTarget.publicHeadersPath` (set from the podspec for npm deps) and `SynthPackageSpec.publicHeadersPath` (which emits the wrapper's value) are both live and unchanged. An app config that still sets the key keeps working — it is an ignored extra key, exactly as it is ignored today. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cipolleschi
approved these changes
Aug 21, 2026
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D116935666. |
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:
When using
react-native.config.jsto declare app-side modules using thespm.modulesfield, there is a field for providing the public header files for a module which is not used by the code. This field does not have any meaning either, a local app-side module is registered through module discovery anyway.This PR removes this field from the SPM config.
Changelog:
[IOS] [FIXED] - Removed unused field spm.modules.publicHeaderFiles from react-native.config.js's spm section
Test Plan:
✅ Unit tests/CI