[sharpie] Add support for visionos_app_extension availability platform. Fixes #18098.#24828
Conversation
Fixes #18098. Sharpie's clang reports visionOS app extension availability as 'xros_app_extension', which was not handled in the GetPlatform() switch statement, causing an 'Unsupported clang availability platform' exception. This is the same class of bug as #18098. Add: - VisionOSAppExtension to the PlatformName enum - Handle 'xros_app_extension' and 'visionos_app_extension' strings in GetPlatform() - Test with all app extension availability platforms Fixes #18098. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates ObjectiveSharpie’s availability parsing to recognize visionOS app extension availability identifiers emitted by clang, preventing an “Unsupported clang availability platform” exception and extending Sharpie’s availability test coverage.
Changes:
- Add a
VisionOSAppExtensionplatform to Sharpie’s internalPlatformNameenum. - Teach
GetPlatform()to mapxros_app_extension/visionos_app_extensiontoVisionOSAppExtension. - Add a Sharpie test fixture for app extension availability platforms, including visionOS app extension.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/sharpie/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs | Adds the new platform enum member and maps clang’s visionOS app-extension identifiers to it. |
| tests/sharpie/Tests/AvailabilityAppExtension.h | New header to exercise app-extension availability identifiers in Sharpie tests. |
| tests/sharpie/Tests/AvailabilityAppExtension.iphoneos.cs | Expected generated C# output validating the emitted [Unavailable (PlatformName.*AppExtension)] attributes. |
You can also share your feedback on Copilot code review. Take the survey.
✅ [CI Build #7b1d42d] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #7b1d42d] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #7b1d42d] Build passed (Build macOS tests) ✅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 |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #7b1d42d] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 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 Pipeline on Agent |
Sharpie's clang reports visionOS app extension availability as 'xros_app_extension', which was not handled in the GetPlatform() switch statement, causing an 'Unsupported clang availability platform' exception. This is the same class of bug as #18098.
Add:
Fixes #18098.