Commit 312dec8
SPM docs: document --configCommand and its persistence
## Summary:
The `--config-command` flag has never been documented, and the pin that keeps
the in-build sync using it was added without a docs change. Cover both in
spm-scripts.md:
- a `--configCommand <json>` row in CLI Options, naming
`RCT_SPM_AUTOLINKING_CONFIG_COMMAND` as the equivalent env var,
- a short section giving the resolution order (flag ->
RCT_SPM_AUTOLINKING_CONFIG_COMMAND -> the `configCommand` pinned in
`.spm-injected.json` -> the default `@react-native-community/cli config`) and
why the pin has to exist: the Sync SPM Autolinking phase inherits neither the
flag nor the shell that exported the env var, so an unpinned command turns a
successful `add` into failing builds. Also states that `deinit` drops the
marker and the pin with it,
- the marker's dual role in the "What to commit" table: reversal record *and*
pinned configuration,
- a Troubleshooting row keyed on the symptom people will search for — the build
phase failing with `@react-native-community/cli config` exiting non-zero.
Docs only; no behavior change. Deliberately not reformatted: this file is not
Prettier-formatted on this branch, and reformatting would bury the change.
## Changelog:
[Internal] - Document `spm --configCommand` and how the autolinking config
command is persisted
## Test Plan:
Docs only — nothing to run. Every statement was checked against the code on
this branch: the marker field name (`configCommand` in
`generate-spm-xcodeproj.js`), both input routes persisting
(`resolveConfigCommandToPin` = flag ?? env), the pin never shadowing the env
var (`resolveExplicitConfigCommand`), the actions that read it
(`needsCliConfig` covers add/update/sync/scaffold), and the failure being a
hard build error (config-command failure sets exit 2, which the generated build
phase turns into `exit 1`).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent b4db5df commit 312dec8
1 file changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
140 | 174 | | |
141 | 175 | | |
142 | 176 | | |
| |||
161 | 195 | | |
162 | 196 | | |
163 | 197 | | |
164 | | - | |
| 198 | + | |
165 | 199 | | |
166 | 200 | | |
167 | 201 | | |
| |||
335 | 369 | | |
336 | 370 | | |
337 | 371 | | |
| 372 | + | |
338 | 373 | | |
339 | 374 | | |
340 | 375 | | |
| |||
0 commit comments