[xtro] Don't report !unknown-type! for types with an [UnsupportedOSPlatform] attribute.#25632
Conversation
This is a macOS-only class. But keep obsolete APIs throwing PlatformNotSupportedException until XAMCORE_5_0.
…atform] attribute. They're only present to keep binary compatibility, we already figured out they shouldn't be in the API, so no need to report it.
|
/azp run |
|
Waiting until #25630 is merged (then change the base branch for this PR to 'main') |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR updates the xtro-sharpie “unknown type” reporting logic to stop emitting !unknown-type! diagnostics for bound managed types that are intentionally kept only for binary compatibility and are marked with [UnsupportedOSPlatform].
Changes:
- Skip
!unknown-type!reporting inObjCInterfaceCheck.EndVisit()when the managed type has[UnsupportedOSPlatform]. - Add
AttributeHelpers.HasUnsupportedOSPlatform (ICustomAttributeProvider)to detectUnsupportedOSPlatformAttributeon Cecil items. - Remove several now-unnecessary
!unknown-type!ignore entries from theapi-annotations-dotnet/*.ignorefiles.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/xtro-sharpie/xtro-sharpie/ObjCInterfaceCheck.cs | Skips reporting !unknown-type! for types marked [UnsupportedOSPlatform]. |
| tests/xtro-sharpie/xtro-sharpie/AttributeHelpers.cs | Adds helper to detect UnsupportedOSPlatformAttribute on Cecil items. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreML.ignore | Removes no-longer-needed !unknown-type! ignore entries. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreML.ignore | Removes no-longer-needed !unknown-type! ignore entries. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreImage.ignore | Removes no-longer-needed !unknown-type! ignore entry. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-PhotosUI.ignore | Removes no-longer-needed !unknown-type! ignore entry. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreML.ignore | Removes no-longer-needed !unknown-type! ignore entries. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreImage.ignore | Removes no-longer-needed !unknown-type! ignore entry while keeping other ignore content. |
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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.
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.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
✅ [PR Build #8fa4241] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #8fa4241] Build passed (Build packages) ✅Pipeline on Agent |
✅ 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 |
✅ [PR Build #8fa4241] Build passed (Build macOS tests) ✅Pipeline on Agent |
🚀 [CI Build #8fa4241] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 193 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
They're only present to keep binary compatibility, we already figured out they shouldn't be in the API (thus the
[UnsupportedOSPlatform]attribute), so no need to report it.