-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update master branch for Xcode 12 beta #32502
Conversation
@swift-ci test |
Build failed |
@swift-ci test new Xcode |
// generated code for API availability checking. | ||
@_semantics("availability.osversion") | ||
@_effects(readnone) | ||
public func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide some explanation for re-introducing this entry point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is important for distinguishing which version number to use (macOS or iOS) for Apple Silicon Macs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expanding on this: this is an entry point that macOS binaries assume is present in the Standard Library. Having it here ensures that this version of the Standard Library remains compatible with such binaries -- including the overlays that are now part of their corresponding framework.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expanding on this: this is an entry point that macOS binaries assume is present in the Standard Library.
In other words, are you saying that removing this entry point in the past was a mistake because it was already committed to the stable ABI? But why only macOS and not other platforms?
${ testCase("CGPoint", "CGPoint(x: 17, y: 38)", "cgPoint", "(==)") } | ||
${ testCase("CGSize", "CGSize(width: 6, height: 79)", "cgSize", "(==)") } | ||
${ testCase("CGVector", "CGVector(dx: 6, dy: 79)", "cgVector", "(==)") } | ||
${ testCase("CGAffineTransform", "CGAffineTransform(rotationAngle: .pi)", "cgAffineTransform", "(==)") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide some explanation for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch! These tests require functionality (NSValue.cgRectValue
and friends) that are implemented in UIKit, so they are now maintained as part of the UIKit overlay. This is arguably the wrong call though, since these tests cover functionality implemented in the Foundation overlay -- it would make sense to reinstate them here, despite the weird layering. (I'll file a separate PR.)
For the |
No, not yet. macOS Big Sur beta 1 SDKs still use macOS 10.16 in places, and we're keeping the lowest-common-denominator approach. |
These overlays being part of the Swift compiler was a source of friction when building the Swift, because they needed to exactly match with the SDK being used, despite not actually being necessary now that Swift overlays ship as part of the frameworks to which they belong. All overlays corresponding to a framework with a core library (for non-Darwin platforms) remain.