Skip to content
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

Merged
merged 7 commits into from
Jun 23, 2020
Merged

Conversation

shahmishal
Copy link
Member

  • Update master branch for Xcode 12 beta.
  • Several overlays, whose purpose is to refine a framework’s Objective-C APIs into Swift, have had their sources removed as the functionality has been sunk into the original framework itself. This completes a long-intended trajectory for those overlays.
    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.

@shahmishal
Copy link
Member Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 279c723

@shahmishal
Copy link
Member Author

@swift-ci test new Xcode

test/stdlib/TestData.swift Outdated Show resolved Hide resolved
test/stdlib/TestData.swift Outdated Show resolved Hide resolved
// generated code for API availability checking.
@_semantics("availability.osversion")
@_effects(readnone)
public func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast(
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor

@gribozavr gribozavr Jun 24, 2020

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?

test/attr/attr_objc_resilience.swift Outdated Show resolved Hide resolved
test/decl/protocol/conforms/nscoding.swift Outdated Show resolved Hide resolved
${ 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", "(==)") }
Copy link
Contributor

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?

Copy link
Member

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

@benrimmington
Copy link
Contributor

For the @available and #available changes, should macOS 10.16 be macOS 11.0 instead?

@DougGregor
Copy link
Member

For the @available and #available changes, should macOS 10.16 be macOS 11.0 instead?

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.

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.

6 participants