Commit 3167024
feat(spm): wire ReactNativeDependenciesHeaders as the 5th binaryTarget
ReactNativeHeaders is pure-RN after the deps-headers split: the
third-party namespaces (folly/glog/boost/fmt/double-conversion/
fast_float/SocketRocket) ship in the ReactNativeDependenciesHeaders
sidecar the deps prebuild emits (the binary deps xcframework is
framework-type — invisible to SwiftPM binaryTargets).
- download-spm-artifacts: headers-only companions are staged out of
their parent tarball (ReactNativeHeaders from the ReactCore tarball,
the sidecar from the deps tarball) on fresh extracts, with fast-path
backfill — generalizing the hermes-headers pattern. This retires the
--headers-tarball priming workaround for ReactNativeHeaders; the
override remains for testing, joined by --deps-headers-tarball /
RN_DEPS_HEADERS_TARBALL_PATH. Both companions register in
artifacts.json fail-closed (pre-companion tarballs die with
actionable advice). REQUIRED_ARTIFACTS now lists all five artifacts,
fixing the inconsistency where generate-spm-package hard-required
ReactNativeHeaders but cache validation never checked it.
- generate-spm-package needs no code change: it renders one product +
binaryTarget per artifacts.json entry.
- Product consumers add the ReactNativeDependenciesHeaders product
wherever deps namespaces must resolve: reactProductDeps()
(autolinking), the codegen Package.swift template, and scaffolded
community-library manifests (SCAFFOLDER_VERSION 17 -> 18 so existing
scaffolds regenerate).
Verified: fresh-app E2E (verdaccio -> cli init -> spm add -> build),
rn-tester and helloworld in-place migrations, 350 spm jest tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 3c0248c commit 3167024
7 files changed
Lines changed: 270 additions & 26 deletions
File tree
- packages/react-native/scripts
- codegen/templates
- spm
- __tests__
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
711 | 712 | | |
| 713 | + | |
712 | 714 | | |
713 | 715 | | |
714 | 716 | | |
| |||
718 | 720 | | |
719 | 721 | | |
720 | 722 | | |
| 723 | + | |
721 | 724 | | |
| 725 | + | |
722 | 726 | | |
723 | 727 | | |
724 | 728 | | |
| |||
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
730 | 749 | | |
731 | 750 | | |
732 | 751 | | |
| |||
737 | 756 | | |
738 | 757 | | |
739 | 758 | | |
740 | | - | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
741 | 765 | | |
742 | 766 | | |
743 | 767 | | |
| |||
746 | 770 | | |
747 | 771 | | |
748 | 772 | | |
| 773 | + | |
749 | 774 | | |
| 775 | + | |
750 | 776 | | |
751 | 777 | | |
752 | 778 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
197 | 207 | | |
198 | 208 | | |
199 | 209 | | |
| |||
217 | 227 | | |
218 | 228 | | |
219 | 229 | | |
| 230 | + | |
220 | 231 | | |
221 | 232 | | |
222 | 233 | | |
| |||
0 commit comments