[StateReporting] Add bindings for the new StateReporting framework up to Xcode 27 Beta 3#26035
[StateReporting] Add bindings for the new StateReporting framework up to Xcode 27 Beta 3#26035dalexsoto wants to merge 4 commits into
Conversation
Bind the StateReporting framework introduced in Xcode 27 (iOS, tvOS, macOS and Mac Catalyst 27.0). It exposes a single Objective-C type, SRStateReporter, used to record a feature's or subsystem's state transitions and volatile metadata updates. * Add src/statereporting.cs binding SRStateReporter: the read-only Domain property, ReportTransition and ReportVolatileMetadataUpdate methods, and the FromDomain static factory. The native init is NS_UNAVAILABLE, so the type uses [DisableDefaultCtor]. * Register the framework on all four platforms: add it to COMMON_FRAMEWORKS in frameworks.sources, regenerate generator-frameworks.g.cs, add the Frameworks.cs entries (Mac Catalyst inherits from iOS), and regenerate the *-defines-dotnet.rsp files. * Update tests/dotnet/UnitTests/ProjectTest.cs (expected frameworks linked with LinkMode=None) and regenerate the Documentation.KnownFailures.txt baseline for the new members. * Update the two untrimmed macOS CoreCLR app-size baselines (+10,240 bytes per RID from the added type). * Remove the now-resolved *-StateReporting.todo files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a81895be-6d8d-4e92-b751-e88d304b350f
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET bindings and build-system registration for Apple’s new StateReporting framework (Xcode 27 beta / platform version 27.0), including test and baseline updates so the new framework is recognized and validated across iOS, tvOS, macOS, and Mac Catalyst.
Changes:
- Introduce
StateReporting.SRStateReporterbindings (domain + transition/metadata reporting APIs) with 27.0 availability. - Register the StateReporting framework in build metadata and generated framework lists, and add
HAS_STATEREPORTINGdefines. - Update unit-test expectations, documentation known-failures baseline, app-size baselines, and remove now-resolved xtro-sharpie
.todofiles.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/common/Frameworks.cs | Registers StateReporting in per-platform framework availability lists (27.0). |
| src/frameworks.sources | Adds StateReporting to COMMON_FRAMEWORKS so it’s included in framework processing. |
| src/build/dotnet/generator-frameworks.g.cs | Regenerates generated framework registry to include StateReporting and HaveStateReporting. |
| src/statereporting.cs | Adds binding definitions for SRStateReporter (27.0 across iOS/tvOS/macOS/MacCatalyst). |
| src/rsp/dotnet/ios-defines-dotnet.rsp | Adds -d:HAS_STATEREPORTING compile define for iOS. |
| src/rsp/dotnet/tvos-defines-dotnet.rsp | Adds -d:HAS_STATEREPORTING compile define for tvOS. |
| src/rsp/dotnet/macos-defines-dotnet.rsp | Adds -d:HAS_STATEREPORTING compile define for macOS. |
| src/rsp/dotnet/maccatalyst-defines-dotnet.rsp | Adds -d:HAS_STATEREPORTING compile define for Mac Catalyst. |
| tests/dotnet/UnitTests/ProjectTest.cs | Updates expected framework link set to include StateReporting across relevant scenarios. |
| tests/cecil-tests/Documentation.KnownFailures.txt | Updates documentation baseline for the new StateReporting type/members. |
| tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-Interpreter-size.txt | Updates macOS untrimmed app-size baseline due to added API surface. |
| tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-Interpreter-TrimmableStatic-size.txt | Updates macOS untrimmed app-size baseline (trimmable static variant). |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-StateReporting.todo | Removes resolved xtro-sharpie todo entries for iOS. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-StateReporting.todo | Removes resolved xtro-sharpie todo entries for tvOS. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-StateReporting.todo | Removes resolved xtro-sharpie todo entries for macOS. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-StateReporting.todo | Removes resolved xtro-sharpie todo entries for Mac Catalyst. |
This comment has been minimized.
This comment has been minimized.
|
@copilot please revert the changes on tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-Interpreter-size.txt and tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-Interpreter-TrimmableStatic-size.txt |
Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
Done in |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [PR Build #2a68d5b] Build failed (Build packages) 🔥Build failed for the job 'Build packages' (with job status 'Failed') Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
StateReporting is a native-only framework: it exists only in the SDK's /System/Library/Frameworks/ and not in the iOSSupport overlay, so on Mac Catalyst it is linked from the native path (its .tbd install-name is /System/Library/Frameworks/StateReporting.framework/Versions/A/StateReporting), the same path used on macOS. Move the StateReporting entry in expectedFrameworks_MacCatalyst_None from the /System/iOSSupport/ section to the native /System/Library/Frameworks/ section so it matches the actual LC_LOAD_DYLIB read by GetLinkedWithFrameworks, fixing the LinkedWithNativeLibraries(MacCatalyst, "maccatalyst-x64", "None") test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a81895be-6d8d-4e92-b751-e88d304b350f
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🔥 [CI Build #921d861] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 2 tests failed, 188 tests passed. Failures❌ assembly-processing tests🔥 Failed catastrophically on VSTS: test results - assembly-processing (no summary found). Html Report (VSDrops) Download ❌ monotouch tests (iOS)1 tests failed, 17 tests passed.Failed tests
Html Report (VSDrops) Download ❌ Tests on macOS Tahoe (26) tests1 tests failed, 4 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Bind the StateReporting framework introduced in Xcode 27 (iOS, tvOS, macOS and Mac Catalyst 27.0). It exposes a single Objective-C type, SRStateReporter, used to record a feature's or subsystem's state transitions and volatile metadata updates.
Copilot-Session: a81895be-6d8d-4e92-b751-e88d304b350f