Commit ec393ad
fix(spm): complete SwiftPM Release fixes surfaced by the build matrix
Follow-up to the prior Release-support commit — two gaps the ios-build-matrix
Release run exposed that the prior commit missed.
- (A, completion) The codegen ReactCodegen / ReactAppDependencyProvider targets
were NOT getting NDEBUG. That is where the app's codegen'd Fabric C++ lives
(RNTMyNativeViewProps), so rn-tester still failed to link with an undefined
"vtable for DebugStringConvertible". Add the DEBUG/NDEBUG config defines to
scripts/codegen/templates/Package.swift.spm-template (the SPM codegen manifest
installed by spm sync). Verified: rn-tester SPM Release now BUILD SUCCEEDED.
- (B, fix) HERMES_CLI_PATH must be ABSOLUTE, not `$(REACT_NATIVE_PATH)/../…`.
node_modules/react-native is commonly a SYMLINK (monorepo default + many real
apps); a `..` after it resolves — kernel-side — to the symlink TARGET's parent
(packages/), so the relative path pointed at a non-existent
packages/hermes-compiler and Release JS bundling failed with "No such file".
resolveHermesCliPathSetting now returns the require.resolve'd absolute hermesc
path (regenerated per `spm add`; matches how the hermes-engine pod sets it).
Verified: HelloWorld SPM Release now BUILD SUCCEEDED.
Matrix: helloworld + rn-tester SPM Release both PASS (newapp pending a Verdaccio
re-publish of these scripts).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent cdb2a2b commit ec393ad
3 files changed
Lines changed: 83 additions & 15 deletions
File tree
- packages/react-native/scripts
- codegen/templates
- spm
- __tests__
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
68 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
69 | 85 | | |
70 | 86 | | |
71 | 87 | | |
| |||
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
150 | 156 | | |
151 | 157 | | |
152 | 158 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
156 | 165 | | |
157 | 166 | | |
158 | 167 | | |
| |||
Lines changed: 52 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| 762 | + | |
762 | 763 | | |
763 | 764 | | |
764 | 765 | | |
| |||
853 | 854 | | |
854 | 855 | | |
855 | 856 | | |
856 | | - | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
857 | 863 | | |
858 | 864 | | |
859 | 865 | | |
| |||
904 | 910 | | |
905 | 911 | | |
906 | 912 | | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
907 | 948 | | |
908 | 949 | | |
909 | 950 | | |
910 | 951 | | |
| 952 | + | |
911 | 953 | | |
912 | 954 | | |
913 | 955 | | |
| |||
917 | 959 | | |
918 | 960 | | |
919 | 961 | | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
928 | 969 | | |
929 | 970 | | |
930 | 971 | | |
| |||
1161 | 1202 | | |
1162 | 1203 | | |
1163 | 1204 | | |
| 1205 | + | |
1164 | 1206 | | |
1165 | 1207 | | |
1166 | 1208 | | |
| |||
1172 | 1214 | | |
1173 | 1215 | | |
1174 | 1216 | | |
| 1217 | + | |
1175 | 1218 | | |
1176 | 1219 | | |
1177 | 1220 | | |
| |||
0 commit comments