Skip to content

[iOS][swiftpm] Drop the unused publicHeadersPath from spm.modules - #58059

Open
chrfalch wants to merge 1 commit into
mainfrom
spm/drop-module-public-headers
Open

[iOS][swiftpm] Drop the unused publicHeadersPath from spm.modules#58059
chrfalch wants to merge 1 commit into
mainfrom
spm/drop-module-public-headers

Conversation

@chrfalch

Copy link
Copy Markdown
Collaborator

Summary:

When using react-native.config.js to declare app-side modules using the spm.modules field, 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

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>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2026
@chrfalch
chrfalch requested a review from cipolleschi August 21, 2026 13:15
@meta-codesync

meta-codesync Bot commented Aug 21, 2026

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D116935666.

@chrfalch chrfalch changed the title Drop the inert publicHeadersPath from spm.modules [iOS][swiftpm] Drop the unused spm.modules.publicHeadersPath from spm.modules Aug 21, 2026
@chrfalch chrfalch changed the title [iOS][swiftpm] Drop the unused spm.modules.publicHeadersPath from spm.modules [iOS][swiftpm] Drop the unused publicHeadersPath from spm.modules Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants