Commit b94402a
fix(iOS): make jsinspector-modern tracing state types move-only for Swift C++ interop
TraceRecordingState and HostTracingProfile hold std::vector<> of
move-only types (RuntimeSamplingProfile, FrameTimingSequence). Their
implicit copy constructors are declared but ill-formed on instantiation.
Plain C++ never instantiates them, but a Swift target using
-cxx-interoperability-mode=default (any Nitro-based library) imports
these types via the prebuilt clang modules and its generated bridging
uses them as copyable Swift values, forcing instantiation of the
ill-formed copy ctor — a hard error on Xcode 26.3 that kills every Swift
file in the consumer (e.g. react-native-unistyles in nightly-tests).
Declare the types explicitly move-only. Swift then imports them as
non-copyable; it is also more correct C++ (these types were never
copyable). HostTracingProfile is no longer an aggregate, so its one
designated-initializer site is converted to member assignment.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent e640278 commit b94402a
3 files changed
Lines changed: 32 additions & 7 deletions
File tree
- packages/react-native/ReactCommon/jsinspector-modern
- tracing
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
26 | 38 | | |
27 | 39 | | |
28 | 40 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| |||
0 commit comments