Skip to content

[xtro] Don't report !unknown-type! for types with an [UnsupportedOSPlatform] attribute.#25632

Merged
rolfbjarne merged 5 commits into
mainfrom
dev/rolf/xtro-dont-report-unsupported-types
Jun 5, 2026
Merged

[xtro] Don't report !unknown-type! for types with an [UnsupportedOSPlatform] attribute.#25632
rolfbjarne merged 5 commits into
mainfrom
dev/rolf/xtro-dont-report-unsupported-types

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Jun 3, 2026

Copy link
Copy Markdown
Member

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.

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.
@rolfbjarne rolfbjarne requested a review from Copilot June 3, 2026 14:07
@rolfbjarne rolfbjarne added the do-not-merge Do not merge this pull request label Jun 3, 2026
@rolfbjarne

Copy link
Copy Markdown
Member Author

/azp run

@rolfbjarne

Copy link
Copy Markdown
Member Author

Waiting until #25630 is merged (then change the base branch for this PR to 'main')

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in ObjCInterfaceCheck.EndVisit() when the managed type has [UnsupportedOSPlatform].
  • Add AttributeHelpers.HasUnsupportedOSPlatform (ICustomAttributeProvider) to detect UnsupportedOSPlatformAttribute on Cecil items.
  • Remove several now-unnecessary !unknown-type! ignore entries from the api-annotations-dotnet/*.ignore files.

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.

Comment thread tests/xtro-sharpie/xtro-sharpie/AttributeHelpers.cs
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Base automatically changed from dev/rolf/cifiltergenerator-removal to main June 4, 2026 16:13
@rolfbjarne rolfbjarne marked this pull request as ready for review June 4, 2026 16:57
@rolfbjarne

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne removed the do-not-merge Do not merge this pull request label Jun 4, 2026
@rolfbjarne rolfbjarne enabled auto-merge (squash) June 4, 2026 17:58
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #8fa4241] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 8fa42412336a205a06d461ebf6dbb6f81e17f620 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #8fa4241] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 8fa42412336a205a06d461ebf6dbb6f81e17f620 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 8fa42412336a205a06d461ebf6dbb6f81e17f620 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #8fa4241] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 8fa42412336a205a06d461ebf6dbb6f81e17f620 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [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
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 20 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 8fa42412336a205a06d461ebf6dbb6f81e17f620 [PR build]

@rolfbjarne rolfbjarne merged commit 4c9e983 into main Jun 5, 2026
55 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/xtro-dont-report-unsupported-types branch June 5, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants