[xcode27.0] Update to Xcode 27.0 Beta 2 and make sharpie aware of anyAppleOS#25786
Open
dalexsoto wants to merge 4 commits into
Open
[xcode27.0] Update to Xcode 27.0 Beta 2 and make sharpie aware of anyAppleOS#25786dalexsoto wants to merge 4 commits into
dalexsoto wants to merge 4 commits into
Conversation
The Xcode 27 SDK introduces a new clang availability meta-platform,
'anyAppleOS' (used as 'API_AVAILABLE(anyappleos(x))'), which means an API is
available on every Apple OS. It's already used by Accessibility.framework's
AXSettings.h.
The clang we use to parse the headers is upstream llvm.org libclang, which
doesn't know about 'anyAppleOS' and reports it as an unknown platform. As a
result 'AUTO_SANITIZE=1 make all' failed with:
SHARPIE0000: An unexpected error occurred: Unsupported clang
availability platform: 'anyAppleOS'
Changes:
- AvailabilityBaseAttribute.FromClang now expands 'anyAppleOS' into every
concrete Apple platform (iOS, macOS, Mac Catalyst, tvOS, watchOS,
visionOS), all sharing the same version, instead of throwing.
- ObjectiveCBinder suppresses clang's spurious "unknown platform
'anyAppleOS'" warning, since we now handle the platform ourselves.
- The xtro classifier (Helpers.IsAvailable/IsDeprecated) treats 'anyappleos'
as the platform currently being checked, so APIs decorated with it are
correctly considered available on every platform.
- Added a note at the two remaining (niche) availability readers that don't
yet handle 'anyappleos' (AttributeHelpers.FindObjcDeprecated and
SimdCheck), to revisit if Apple ships deprecated/SIMD 'anyappleos' APIs.
- Added a sharpie test (AvailabilityAnyAppleOS.h) covering introduced and
unavailable 'anyAppleOS' availability.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the repository’s Xcode 27.0 toolchain baseline and extends Sharpie/xtro-sharpie to correctly handle the new Xcode 27 SDK anyAppleOS availability meta-platform.
Changes:
- Teach Sharpie to expand
anyAppleOSinto concrete Apple platforms when producing availability attributes, and ignore the corresponding upstream-libclang “unknown platform” warning. - Update xtro-sharpie availability classification to treat
anyappleosas applying to the currently-checked platform. - Refresh xtro-sharpie
.todobaselines for Xcode 27.0 Beta 2 and add a new Sharpie on-disk test foranyAppleOS.
Reviewed changes
Copilot reviewed 65 out of 65 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/sharpie/Sharpie.Bind/ObjectiveCBinder.cs | Ignores the specific spurious clang warning produced for anyAppleOS. |
| tools/sharpie/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs | Expands anyAppleOS into concrete platforms during attribute generation. |
| tests/xtro-sharpie/xtro-sharpie/SimdCheck.cs | Documents that the SIMD heuristic does not special-case anyAppleOS. |
| tests/xtro-sharpie/xtro-sharpie/Helpers.cs | Treats anyappleos availability as targeting the current platform for availability/deprecation checks. |
| tests/xtro-sharpie/xtro-sharpie/AttributeHelpers.cs | Notes that anyAppleOS is not handled in this deprecated-attribute helper path. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.todo | Updates xtro-sharpie baseline for tvOS UIKit under Xcode 27 beta 2. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-Photos.todo | Updates xtro-sharpie baseline for tvOS Photos. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShadersGraph.todo | Updates xtro-sharpie baseline for tvOS MPSGraph. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-ImageIO.todo | Updates xtro-sharpie baseline for tvOS ImageIO. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-CryptoTokenKit.todo | Adds xtro-sharpie baseline for tvOS CryptoTokenKit. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreImage.todo | Updates xtro-sharpie baseline for tvOS CoreImage. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-BrowserEngineKit.todo | Updates xtro-sharpie baseline for tvOS BrowserEngineKit. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo | Updates xtro-sharpie baseline for tvOS AVFoundation. |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-Accessibility.todo | Adds xtro-sharpie baseline for tvOS Accessibility. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-ThreadNetwork.todo | Updates xtro-sharpie baseline for macOS ThreadNetwork. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.todo | Updates xtro-sharpie baseline for macOS ScreenCaptureKit. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-Photos.todo | Updates xtro-sharpie baseline for macOS Photos. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-PassKit.todo | Updates xtro-sharpie baseline for macOS PassKit. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShadersGraph.todo | Updates xtro-sharpie baseline for macOS MPSGraph. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-Metal.todo | Updates xtro-sharpie baseline for macOS Metal. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-ImageIO.todo | Updates xtro-sharpie baseline for macOS ImageIO. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-HealthKit.todo | Updates xtro-sharpie baseline for macOS HealthKit. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-FileProvider.todo | Updates xtro-sharpie baseline for macOS FileProvider. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-CryptoTokenKit.todo | Adds xtro-sharpie baseline for macOS CryptoTokenKit. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreImage.todo | Updates xtro-sharpie baseline for macOS CoreImage. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-BrowserEngineKit.todo | Updates xtro-sharpie baseline for macOS BrowserEngineKit. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo | Updates xtro-sharpie baseline for macOS AVFoundation. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo | Updates xtro-sharpie baseline for macOS AppKit. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-Accessibility.todo | Adds xtro-sharpie baseline for macOS Accessibility. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.todo | Updates xtro-sharpie baseline for Mac Catalyst UIKit. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ThreadNetwork.todo | Updates xtro-sharpie baseline for Mac Catalyst ThreadNetwork. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.todo | Updates xtro-sharpie baseline for Mac Catalyst ScreenCaptureKit. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Photos.todo | Updates xtro-sharpie baseline for Mac Catalyst Photos. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-PassKit.todo | Updates xtro-sharpie baseline for Mac Catalyst PassKit. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShadersGraph.todo | Updates xtro-sharpie baseline for Mac Catalyst MPSGraph. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Metal.todo | Updates xtro-sharpie baseline for Mac Catalyst Metal. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ImageIO.todo | Updates xtro-sharpie baseline for Mac Catalyst ImageIO. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-HealthKit.todo | Updates xtro-sharpie baseline for Mac Catalyst HealthKit. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CryptoTokenKit.todo | Adds xtro-sharpie baseline for Mac Catalyst CryptoTokenKit. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreTelephony.todo | Updates xtro-sharpie baseline for Mac Catalyst CoreTelephony. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreImage.todo | Updates xtro-sharpie baseline for Mac Catalyst CoreImage. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.todo | Updates xtro-sharpie baseline for Mac Catalyst CarPlay. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-BrowserEngineKit.todo | Updates xtro-sharpie baseline for Mac Catalyst BrowserEngineKit. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.todo | Updates xtro-sharpie baseline for Mac Catalyst AVKit. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo | Updates xtro-sharpie baseline for Mac Catalyst AVFoundation. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Accessibility.todo | Adds xtro-sharpie baseline for Mac Catalyst Accessibility. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.todo | Updates xtro-sharpie baseline for iOS UIKit. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-ThreadNetwork.todo | Updates xtro-sharpie baseline for iOS ThreadNetwork. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-Photos.todo | Updates xtro-sharpie baseline for iOS Photos. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-PassKit.todo | Updates xtro-sharpie baseline for iOS PassKit. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShadersGraph.todo | Updates xtro-sharpie baseline for iOS MPSGraph. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-ImageIO.todo | Updates xtro-sharpie baseline for iOS ImageIO. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-HealthKit.todo | Updates xtro-sharpie baseline for iOS HealthKit. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-FileProvider.todo | Updates xtro-sharpie baseline for iOS FileProvider. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-CryptoTokenKit.todo | Adds xtro-sharpie baseline for iOS CryptoTokenKit. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreTelephony.todo | Updates xtro-sharpie baseline for iOS CoreTelephony. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreImage.todo | Updates xtro-sharpie baseline for iOS CoreImage. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.todo | Updates xtro-sharpie baseline for iOS CarPlay. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-BrowserEngineKit.todo | Updates xtro-sharpie baseline for iOS BrowserEngineKit. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo | Updates xtro-sharpie baseline for iOS AVFoundation. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-Accessibility.todo | Adds xtro-sharpie baseline for iOS Accessibility. |
| tests/sharpie/Tests/AvailabilityAnyAppleOS.macosx.cs | Adds expected sharpie output for anyAppleOS (macOS SDK variant). |
| tests/sharpie/Tests/AvailabilityAnyAppleOS.iphoneos.cs | Adds expected sharpie output for anyAppleOS (iPhoneOS SDK variant). |
| tests/sharpie/Tests/AvailabilityAnyAppleOS.h | Adds the header input for the new anyAppleOS sharpie test. |
| Make.config | Updates Xcode download URL and default Xcode developer root to 27.0 beta 2. |
Comment on lines
139
to
143
| if (string.Equals (name, "anyAppleOS", StringComparison.OrdinalIgnoreCase)) | ||
| return anyAppleOSPlatforms; | ||
|
|
||
| if (attr.AvailabilityAttributeUnavailable) | ||
| yield return new AvailabilityBaseAttribute ( | ||
| AvailabilityKind.Unavailable, platform, VersionTuple.Empty, attr.AvailabilityAttributeMessage); | ||
| return new [] { GetPlatform (name) }; | ||
| } |
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.
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.
rolfbjarne
requested changes
Jun 23, 2026
Follow-up to the 'anyAppleOS' availability platform support, addressing the PR review feedback: - Only expand 'anyAppleOS' into the Apple platforms macios actually ships (iOS, macOS, Mac Catalyst, tvOS); drop watchOS and visionOS. visionOS in particular isn't even a value in the public 'ObjCRuntime.PlatformName' enum. The xtro classifier handles 'anyappleos' independently, so this only affects the human-facing generated reference. - Make GetPlatforms a 'yield' iterator so the common (non-anyAppleOS) path no longer allocates a single-element array per availability attribute. - Update the now-inaccurate "every concrete Apple platform" comments. - Drop the synthetic 'API_UNAVAILABLE(anyappleos)' case from the sharpie test: it doesn't occur in any real SDK (the only real usage is the 'introduced' form in AXSettings.h), and it produced a binding that's unavailable on every platform. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rolfbjarne
approved these changes
Jun 23, 2026
Collaborator
✅ [PR Build #8a10bba] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
Collaborator
✅ [PR Build #8a10bba] Build passed (Build packages) ✅Pipeline on Agent |
Collaborator
✅ 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 |
Collaborator
✅ [PR Build #8a10bba] Build passed (Build macOS tests) ✅Pipeline on Agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.