Commit cc6d8dd
SwiftPM: stop baking an absolute HERMES_CLI_PATH into the app pbxproj
`spm add` wrote the machine-specific absolute path of hermesc from the
hermes-compiler npm package into every build configuration, and apps
commit that pbxproj. react-native-xcode.sh already resolves hermesc at
build time through react-native's own dependency graph, so stop
producing the value: resolveHermesCliPathSetting() is deleted and
injectSpmIntoExistingXcodeproj passes null.
No signature changes. injectSpmIntoPbxproj and mergeReactBuildSettings
keep their `hermesCliPath` parameter, so an out-of-tree caller passing
arguments positionally is unaffected and can still pin hermesc itself.
react-native-xcode.sh is untouched.
Existing injected projects clean up on the next `spm add`/`update`,
which strips every recorded scalar before re-injecting.
Known gap, deliberately left for a follow-up: the shell fallback is
gated on PODS_ROOT being absent, so a SwiftPM app that keeps
side-by-side non-RN pods never reaches it and needs an explicit
HERMES_CLI_PATH — set in an xcconfig, not the pbxproj, because the
recorded-scalar cleanup is value-blind. Keying that gate on the
hermes-engine pod directory would close it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent d4c8569 commit cc6d8dd
4 files changed
Lines changed: 100 additions & 67 deletions
File tree
- packages/react-native/scripts/spm
- __tests__
Lines changed: 26 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | 240 | | |
245 | 241 | | |
246 | 242 | | |
247 | 243 | | |
248 | 244 | | |
249 | 245 | | |
250 | 246 | | |
251 | | - | |
252 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
253 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
254 | 271 | | |
255 | 272 | | |
256 | 273 | | |
| |||
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
89 | 109 | | |
90 | 110 | | |
91 | 111 | | |
| |||
156 | 176 | | |
157 | 177 | | |
158 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
159 | 215 | | |
160 | 216 | | |
161 | 217 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
461 | 460 | | |
462 | 461 | | |
463 | 462 | | |
| |||
499 | 498 | | |
500 | 499 | | |
501 | 500 | | |
502 | | - | |
503 | | - | |
| 501 | + | |
| 502 | + | |
504 | 503 | | |
505 | 504 | | |
506 | 505 | | |
| |||
Lines changed: 13 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
1667 | | - | |
1668 | | - | |
1669 | | - | |
1670 | | - | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
1675 | | - | |
1676 | | - | |
1677 | | - | |
1678 | | - | |
1679 | | - | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | | - | |
1703 | | - | |
1704 | 1662 | | |
1705 | 1663 | | |
1706 | 1664 | | |
| |||
1723 | 1681 | | |
1724 | 1682 | | |
1725 | 1683 | | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1726 | 1691 | | |
1727 | 1692 | | |
1728 | 1693 | | |
| |||
1735 | 1700 | | |
1736 | 1701 | | |
1737 | 1702 | | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
1746 | 1707 | | |
1747 | 1708 | | |
1748 | 1709 | | |
| |||
2368 | 2329 | | |
2369 | 2330 | | |
2370 | 2331 | | |
2371 | | - | |
2372 | 2332 | | |
2373 | 2333 | | |
2374 | 2334 | | |
| |||
2441 | 2401 | | |
2442 | 2402 | | |
2443 | 2403 | | |
2444 | | - | |
| 2404 | + | |
| 2405 | + | |
2445 | 2406 | | |
2446 | 2407 | | |
2447 | 2408 | | |
| |||
0 commit comments