rollback(spm): conditional min. OS versions for Xcode 27 - #16443
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
andrewheard
left a comment
There was a problem hiding this comment.
I'm fine with rolling back for further investigation but as far as I'm aware, the passing snippet
xcodebuild -scheme FirebaseAILogicUnit -destination platform=OS\ X\,arch=x86_64 \
ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO build
will have a deployment target of the macOS SDK version.
It may behave differently with Swift Packages but not sure if that applies only with swift build or also with xcodebuild.
|
At least based on Gemini's assessment, it does pick the lowest supported for Swift Packages:
|
Xcode 27 betas have enforced Xcode's minimum deployment targets. We were able to reproduce this on CI, and responded by updating the Package.swift to conditionally compile a higher min. deployment target when Xcode 27 was being used. However, investigating further revealed that the issue isn't our Package.swift's min. OS versions, but how our CI is injecting older deployment versions that Xcode now flags as an error.
Passes (Letting Xcode auto-upgrade the deployment target):
Fails (Forcing the compiler to build for an unsupported macOS version):
Apple Documentation:
This auto-upgrade behavior is defined in the Swift Package Manager documentation for
SupportedPlatform(Apple Developer Docs):Note: There is a "hidden" build setting to turn off the enforcement checks:
__DIAGNOSE_INVALID_DEPLOYMENT_TARGET_AS_ERROR=NO.The "fix" for this issue on our CI will be in the Xcode 27 PR, #16424, adjusting the
scripts/build.shto not pass specific OS versions or pass OS versions that Xcode is happy with (TBD).#no-changelog