Skip to content

[xcode27.0] Update to Xcode 27.0 Beta 2 and make sharpie aware of anyAppleOS#25786

Open
dalexsoto wants to merge 4 commits into
xcode27.0from
dev/alex/xc27b2
Open

[xcode27.0] Update to Xcode 27.0 Beta 2 and make sharpie aware of anyAppleOS#25786
dalexsoto wants to merge 4 commits into
xcode27.0from
dev/alex/xc27b2

Conversation

@dalexsoto

Copy link
Copy Markdown
Member

No description provided.

dalexsoto and others added 2 commits June 23, 2026 10:10
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>
@dalexsoto dalexsoto requested a review from rolfbjarne as a code owner June 23, 2026 15:02
Copilot AI review requested due to automatic review settings June 23, 2026 15:02

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

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 anyAppleOS into concrete Apple platforms when producing availability attributes, and ignore the corresponding upstream-libclang “unknown platform” warning.
  • Update xtro-sharpie availability classification to treat anyappleos as applying to the currently-checked platform.
  • Refresh xtro-sharpie .todo baselines for Xcode 27.0 Beta 2 and add a new Sharpie on-disk test for anyAppleOS.

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) };
}
@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.

@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.

Comment thread tests/sharpie/Tests/AvailabilityAnyAppleOS.iphoneos.cs Outdated
Comment thread tests/sharpie/Tests/AvailabilityAnyAppleOS.iphoneos.cs Outdated
Comment thread tools/sharpie/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs Outdated
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>
@dalexsoto dalexsoto requested a review from rolfbjarne June 23, 2026 17:00
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: 8a10bbac0089a80157d68b0f34c5c78333beefc2 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: 8a10bbac0089a80157d68b0f34c5c78333beefc2 [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: 8a10bbac0089a80157d68b0f34c5c78333beefc2 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: 8a10bbac0089a80157d68b0f34c5c78333beefc2 [PR build]

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