Repository navigation
Conversation
Fix statements in the SwiftPM and ios-prebuild __docs__ that no longer match the code: CLI options, exit code 2 causes, what sync does and when it re-runs, which command writes each file, header products, remote mode, and header sidecar layout. Add an environment variables table.
Remove repeated statements, split long sentences, and move the header resolution details into spm-header-paths-contract.md. No facts change.
| tree. RN owns the merge, so a re-sync reproduces the same `Package.swift` | ||
| byte-for-byte (idempotent). Package and product contributions are **deduped by | ||
| name** across plugins. | ||
| The plugin returns **data**. It never writes into React Native's generated tree. |
There was a problem hiding this comment.
Thanks for making this contract easier to scan! Could we add watchPaths to the “Return (contributions, all optional)” table above? It is part of PluginResult and documented earlier, but the summary table currently skips it. Would listing it as contributing to the auto-sync staleness inputs help plugin authors discover it?
There was a problem hiding this comment.
Good point, added in a767b7d: watchPaths is now a row in the return table, linking to its section. It also says that invalid entries are dropped with a warning rather than being fatal, unlike flavoredFrameworks and scriptPhases.
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D125209110. |
|
@cipolleschi merged this pull request in 649c946. |
Summary:
Several statements in the SwiftPM docs no longer match the scripts on
main. This PR corrects them. It changes docs only.scripts/spm/__docs__: CLI options, the three causes of exit code 2, whatsyncdoes and when it re-runs, which command writes each file, the header products a hand-written library depends on, and remote mode. Adds a table of environment variables.scripts/ios-prebuild/__docs__: the SwiftPM statements about where dependency and Hermes headers go.Where the code has a known gap, the docs describe the current behavior. Examples:
npx react-native spmdoes not forward--configCommand, andspm scaffoldalso changes the.xcodeproj.A second commit simplifies the same docs: it removes repeated statements and splits long sentences. No facts change. The header resolution details move to
spm-header-paths-contract.md.Changelog:
[INTERNAL] [CHANGED] - Correct SwiftPM docs to match current scripts
Test Plan:
npx prettier --check packages/react-native/scripts/{spm,ios-prebuild}/__docs__/*.md: all files pass.main. Relative links and anchors in changed lines resolve.