Commit 53138bd
fix(iOS): exclude C++-guarded foreign-namespace headers from React umbrella
The prebuilt React-Core artifact's generated module.modulemap placed
RCTFrameTimingsObserver.h in the React umbrella. That header includes
<jsinspector-modern/tracing/FrameTimingSequence.h> under #ifdef
__cplusplus, transitively reaching react/timing/primitives.h — a header
owned by the ReactNativeHeaders_react module. The headers inventory's
reachability fixpoint only follows unguarded include edges (modeling a
pure-ObjC consumer), so it could not see this edge and classified the
header as umbrella-safe.
For Swift pods with C++ interop (e.g. react-native-unistyles), building
the React clang module opens the __cplusplus guard, and primitives.h
ends up owned by two modules in one compilation: C++ redefinition
errors (HighResDuration, HighResTimeStamp, TraceEvent,
FrameTimingSequence) and "could not build module 'React'". This broke
the react-native-unistyles job in nightly-tests on
0.88.0-nightly-20260716.
Fix: add a curated UMBRELLA_CXX_GUARDED_EXCLUSIONS set, checked in
isUmbrellaSafe, mirroring the existing PRIVATE_REACT_HEADERS pattern,
with fail-closed validation (validateUmbrellaExclusions) so a renamed
or deleted entry surfaces immediately. The header still ships in
React.framework/Headers and remains importable via
#import <React/RCTFrameTimingsObserver.h>; it is only removed from the
modular umbrella surface.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 62a2b38 commit 53138bd
2 files changed
Lines changed: 68 additions & 1 deletion
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
169 | 196 | | |
170 | 197 | | |
171 | 198 | | |
| |||
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
146 | 164 | | |
147 | 165 | | |
148 | 166 | | |
| |||
202 | 220 | | |
203 | 221 | | |
204 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
205 | 240 | | |
206 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
207 | 246 | | |
208 | 247 | | |
209 | 248 | | |
| |||
254 | 293 | | |
255 | 294 | | |
256 | 295 | | |
| 296 | + | |
257 | 297 | | |
258 | 298 | | |
259 | 299 | | |
| |||
0 commit comments