Merged
Conversation
atdrendel
commented
Feb 3, 2026
Contributor
Author
atdrendel
commented
Feb 3, 2026
Contributor
Author
There was a problem hiding this comment.
Pull request overview
This PR fixes simulator test failures on iOS 26.2 Simulator when building with Xcode 26.2 on macOS 15 by adding comprehensive platform availability guards. Building on the related PR #100 which fixed macOS 15 tests, this change ensures tests are properly skipped on platforms where SystemLanguageModel features are not available.
Changes:
- Extended availability guards in test files to include iOS, watchOS, tvOS, and visionOS 26.0 alongside existing macOS 26.0 requirements
- Added CoreImage availability checks to MLXLanguageModel import guards for improved watchOS compatibility
- Added missing SwiftSyntax and SwiftSyntaxBuilder dependencies to Package.swift that were already being imported in macro code
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/AnyLanguageModelTests/SystemLanguageModelTests.swift | Extended @available annotations and availability checks to include iOS, watchOS, tvOS, and visionOS 26.0 for all SystemLanguageModel test methods |
| Tests/AnyLanguageModelTests/APICompatibilityFoundationModelsTests.swift | Added comprehensive platform availability guards (iOS, watchOS, tvOS, visionOS 26.0) to FoundationModels compatibility test |
| Tests/AnyLanguageModelTests/APICompatibilityAnyLanguageModelTests.swift | Added comprehensive platform availability guards (iOS, watchOS, tvOS, visionOS 26.0) to AnyLanguageModel compatibility test |
| Sources/AnyLanguageModel/Models/MLXLanguageModel.swift | Added CoreImage availability checks to UIKit and AppKit import guards to ensure CoreImage is available before importing (improves watchOS build compatibility) |
| Package.swift | Added missing SwiftSyntax and SwiftSyntaxBuilder dependencies that were already being imported in AnyLanguageModelMacros source code |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
@atdrendel Thank you for your great work on this and #100 — I really appreciate your help! |
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.


This pull request builds on my changes in mattt/AnyLanguageModel#100.
Before making these changes, running the tests on my iOS 26.2 Simulator running on macOS 15 (Xcode 26.2) resulted in a bunch of failed tests.
After fixing the availability guards, tests were skipped correctly and the entire test suite passed.