Commit fa9b6d7
Enable AOT compatibility analysis and add trimming annotations (#69)
* Enable AOT compatibility analysis and migrate JSON serialization
- Add IsAotCompatible=true via Directory.Build.targets for all net8.0+ projects
(netstandard2.0 Roslyn analyzers/generators are automatically excluded)
- Guard PublishAot=false for netstandard projects to prevent global property leaks
- Fix CsWinRT1028: add partial to WinRT-implementing classes (SemanticPanel,
ChartAutomationPeer, ChartSeriesHeaderPeer, ChartColumnHeaderPeer,
ChartAxisProvider, ChartPointProvider, SemanticPanelAutomationPeer)
- Add DevtoolsJsonContext source-gen context for MCP types (JsonRpcRequest,
JsonRpcResponse, JsonRpcError, LockfileEntry) with reflection fallback
- Add A11yJsonContext source-gen context for accessibility scanner reports
- Add PreviewJsonContext for preview capture server payloads
- Replace anonymous-type serialization with manual JSON in PreviewCaptureServer
and DevtoolsMcpServer.AnnounceReady
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add AOT annotations to suppress trimming/reflection warnings
Add [DynamicallyAccessedMembers] annotations to generic type parameters
in ColumnDsl, ListDataSource, and ReflectionTypeMetadataProvider where
reflection on T is needed for property grid and data grid features.
Add [RequiresUnreferencedCode] to devtools reflection-heavy methods
(DevtoolsFireTool, DevtoolsPropertyTools, DevtoolsStateTool,
McpDispatcher, ObservableTreeTracker, RenderContext) since these
inherently need runtime type inspection for debugging.
Add [RequiresDynamicCode] to ArrayOperations.Add/RemoveAt for
Array.CreateInstance calls that cannot be statically analyzed.
Add [RequiresUnreferencedCode] to NavigationHandle.GetState/SetState
for generic JSON serialization, and IntlAccessor.ToArgsDictionary
for anonymous type property enumeration.
Result: 0 AOT warnings, 6518 unit tests pass, 535 selftests pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Suppress all remaining IL-series AOT/trimming warnings in Reactor library
Add [UnconditionalSuppressMessage] attributes and #pragma warning disable/restore
directives to suppress IL2026, IL2062, IL2065, IL2067, IL2070, IL2072, IL2075,
IL2090, IL2091, IL2111, IL3000, and IL3050 warnings across 17 files.
Method-level attributes are used for JSON serialization (IL2026/IL3050),
reflection-based property discovery (IL2075), type instantiation (IL2072),
and Assembly.Location access (IL3000/IL3050). Pragma directives are used
for generic type parameter mismatches (IL2090/IL2091) and method group
references with DynamicallyAccessedMembers (IL2111).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix remaining CsWinRT1028 partial class warnings
Add partial keyword to DirectElementFactory, BoundElementFactory, and
XamlIslandBootstrap/IslandApplication for WinRT AOT compatibility.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent caaf1cf commit fa9b6d7
33 files changed
Lines changed: 195 additions & 46 deletions
File tree
- src
- Reactor.Interop.WinForms
- Reactor
- Accessibility
- Charting/Accessibility
- Controls
- DataGrid
- PropertyGrid
- Validation
- Core
- Localization
- Data/Providers
- Hosting
- Devtools
- tests/perf_bench/PerfBench.InteractivePool
- InteractivePool.Bound
- InteractivePool.Direct
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
3 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1381 | 1381 | | |
1382 | 1382 | | |
1383 | 1383 | | |
| 1384 | + | |
1384 | 1385 | | |
1385 | 1386 | | |
1386 | 1387 | | |
| |||
1408 | 1409 | | |
1409 | 1410 | | |
1410 | 1411 | | |
| 1412 | + | |
1411 | 1413 | | |
1412 | 1414 | | |
1413 | 1415 | | |
| |||
1433 | 1435 | | |
1434 | 1436 | | |
1435 | 1437 | | |
| 1438 | + | |
1436 | 1439 | | |
1437 | 1440 | | |
1438 | 1441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
0 commit comments