-
Notifications
You must be signed in to change notification settings - Fork 10.5k
stdlib: Add unavailable declarations for APIs renamed in SE-0118 #4282
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
Conversation
@swift-ci Please smoke test |
@dabrahams Could you take a look? |
_ = x.allocatedElementCount // expected-error {{'allocatedElementCount' has been renamed to 'capacity'}} {{9-30=capacity}} {{none}} | ||
_ = ManagedBuffer<H, E>.create(1) { _ in h } // expected-error {{'create(_:initialValue:)' has been renamed to 'create(minimumCapacity:makingHeaderWith:)'}} {{27-33=create}} {{34-34=minimumCapacity: }} {{none}} | ||
_ = ManagedBuffer<H, E>.create(1, initialValue: { _ in h }) // expected-error {{'create(_:initialValue:)' has been renamed to 'create(minimumCapacity:makingHeaderWith:)'}} {{27-33=create}} {{34-34=minimumCapacity: }} {{37-49=makingHeaderWith}}i {{none}} | ||
_ = ManagedBufferPointer<H, E>(bufferClass: bc, minimumCapacity: 1, initialValue: { _, _ in h }) // expected-error {{'init(bufferClass:minimumCapacity:initialValue:)' has been renamed to 'init(bufferClass:minimumCapacity:makingHeaderWith:)'}} FIXME: fix-it {{none}} |
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.
Add fix-it if #4013 landed.
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.
I just landed this patch. Please rebase and retest.
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.
@CodaFi Thank you!
Sequence.sort(_:) => sorted(by:) Sequence.sort() => sorted() Sequence.elementsEqual(_:isEquivalent) => elementsEqual(_:by:) Sequence.contains(_:) => contains(where:) Sequence reduce(_:combine:) => reduce(_:_:) UnicodeCodec.encode(_:output:) => encode(_:into:) ManagedBuffer.create(_:initialValue:) => create(minimumCapacity:makingHeaderWith:) ManagedBufferPointer.init(bufferClass:minimumCapacity:initialValue) => init(bufferClass:minimumCapacity:makingHeaderWith:)
b5dc9e7
to
2a9b78e
Compare
@swift-ci Please smoke test OS X Platform |
Hm, status reporting from CI is still broken? |
It does this sometimes. Usually another build will fix it. @swift-ci please smoke test OS X platform. |
@rintaro Looks great! Please create another pull request for |
[pull] swiftwasm from main
What's in this pull request?
SE-0118 revised several parameter labels.
"incorrect argument labels" diagnosis can catch most of them, but not always. e.g. SR-2318
This PR adds explicit
unavailable, renamed
declarations for them.Sequence.sort(_:)
=>sorted(by:)
Sequence.sort()
=>sorted()
Sequence.elementsEqual(_:isEquivalent)
=>elementsEqual(_:by:)
Sequence.contains(_:)
=>contains(where:)
Sequence.reduce(_:combine:)
=>reduce(_:_:)
UnicodeCodec.encode(_:output:)
=>encode(_:into:)
ManagedBuffer.create(_:initialValue:)
=>create(minimumCapacity:makingHeaderWith:)
ManagedBufferPointer.init(bufferClass:minimumCapacity:initialValue)
=>init(bufferClass:minimumCapacity:makingHeaderWith:)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.