Commit 6439916
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 drop the
write: resolveHermesCliPathSetting() and the hermesCliPath parameter it
fed go with it.
Everything involved arrived with SwiftPM in #57332 and is still
Preview-labelled, so removing the parameter from injectSpmIntoPbxproj
and mergeReactBuildSettings is in scope even though it shipped in
0.87.0/0.87.1. Nothing a CocoaPods build uses is touched: the
pod-derived HERMES_CLI_PATH default, the "hermesc could not be found"
error and the hermesc -emit-binary call all pre-date SwiftPM.
react-native-xcode.sh is unchanged here.
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 6439916
4 files changed
Lines changed: 80 additions & 81 deletions
File tree
- packages/react-native/scripts/spm
- __tests__
Lines changed: 12 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 70 | | |
76 | 71 | | |
77 | 72 | | |
| |||
104 | 99 | | |
105 | 100 | | |
106 | 101 | | |
107 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
| |||
121 | 119 | | |
122 | 120 | | |
123 | 121 | | |
124 | | - | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
| |||
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | 237 | | |
245 | 238 | | |
246 | 239 | | |
247 | 240 | | |
248 | 241 | | |
249 | 242 | | |
250 | 243 | | |
251 | | - | |
252 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
253 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
254 | 253 | | |
255 | 254 | | |
256 | 255 | | |
| |||
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
422 | | - | |
423 | 421 | | |
424 | 422 | | |
425 | 423 | | |
| |||
459 | 457 | | |
460 | 458 | | |
461 | 459 | | |
462 | | - | |
463 | 460 | | |
464 | 461 | | |
465 | 462 | | |
| |||
1104 | 1101 | | |
1105 | 1102 | | |
1106 | 1103 | | |
1107 | | - | |
1108 | 1104 | | |
1109 | 1105 | | |
1110 | 1106 | | |
| |||
1145 | 1141 | | |
1146 | 1142 | | |
1147 | 1143 | | |
1148 | | - | |
1149 | 1144 | | |
1150 | 1145 | | |
1151 | 1146 | | |
| |||
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: 7 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
1253 | | - | |
1254 | 1253 | | |
1255 | 1254 | | |
1256 | 1255 | | |
| |||
1350 | 1349 | | |
1351 | 1350 | | |
1352 | 1351 | | |
1353 | | - | |
1354 | 1352 | | |
1355 | 1353 | | |
1356 | 1354 | | |
| |||
1659 | 1657 | | |
1660 | 1658 | | |
1661 | 1659 | | |
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 | 1660 | | |
1705 | 1661 | | |
1706 | 1662 | | |
| |||
1723 | 1679 | | |
1724 | 1680 | | |
1725 | 1681 | | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
1726 | 1689 | | |
1727 | 1690 | | |
1728 | 1691 | | |
1729 | 1692 | | |
1730 | 1693 | | |
1731 | | - | |
1732 | 1694 | | |
1733 | 1695 | | |
1734 | 1696 | | |
1735 | 1697 | | |
1736 | 1698 | | |
1737 | 1699 | | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | 1700 | | |
1750 | 1701 | | |
1751 | 1702 | | |
| |||
2368 | 2319 | | |
2369 | 2320 | | |
2370 | 2321 | | |
2371 | | - | |
2372 | 2322 | | |
2373 | 2323 | | |
2374 | 2324 | | |
| |||
2441 | 2391 | | |
2442 | 2392 | | |
2443 | 2393 | | |
2444 | | - | |
2445 | 2394 | | |
2446 | 2395 | | |
2447 | 2396 | | |
| |||
0 commit comments