-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Remove the UnboundedRange_
enum
#18649
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
[stdlib] Remove the UnboundedRange_
enum
#18649
Conversation
Outdated commentI prefer the empty subscript operations from your manifesto, as discussed in the Gold-plating UnboundedRange forum topic. If the unbounded range operator is valid only within a collection's subscript, could the typealias be moved into an extension? extension Collection {
/// A range expression that represents the entire range of a collection.
public typealias UnboundedRange = (Index) -> PartialRangeFrom<Index>
}
@available(swift, deprecated: 5.0, message:
"The unbounded range operator is valid only within a collection's subscript.")
public typealias UnboundedRange = (Never) -> PartialRangeFrom<Never> |
85e0938
to
c0b7eb8
Compare
Outdated commentPlease let me know if you have any interest in this pull request. I can also write a proposal (and implementation) to deprecate |
4722517
to
4254305
Compare
@lorentey Please take a look at this pull request. |
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 looks like a good idea to me, but @airspeedswift is more familiar with these!
@swift-ci please test |
Build failed |
4254305
to
a791ec2
Compare
@swift-ci please test source compatibility |
Outdated commentThere were some known failures (#20575 and SR-9252).
I couldn't see a way to easily clone or search all projects in the source compatibility suite, so I don't know if any of them are using
|
a791ec2
to
d0c06bc
Compare
@swift-ci please test |
Build failed |
Build failed |
@nkcsgexi The api-digester tests have passed, but I'm wondering why something like the following wasn't needed.
|
The ABI checker is expected to not have it because we exclude all type alias decls from the module dump. For the source stability checker, i guess we should. Could you file a bug on bugs.swift.org and assign it to me? |
d0c06bc
to
46b8181
Compare
@airspeedswift Would it be possible to merge this before the final branching? |
@swift-ci please test |
@swift-ci please test source compatibility |
Build failed |
Build failed |
46b8181
to
385b5b9
Compare
@swift-ci please test |
@swift-ci Please test source compatibility |
385b5b9
to
19b6bd9
Compare
I could be mistaken, but this PR looks like it removes support for the |
@dabrahams I believe you are mistaken, because the validation tests which use that syntax are still passing. (I haven't got commit access, so I can't run tests here.) The new typealias is compatible with the existing postfix |
@swift-ci please test |
@swift-ci please test source compatibility |
@benrimmington That's cute! Thanks for the explanation. |
@airspeedswift All checks have passed. |
19b6bd9
to
a607df8
Compare
The baseline ABI/API was regenerated; and a test was recently updated to include |
Drive-by testing @swift-ci Please test |
Build failed |
Build failed |
@jrose-apple Thanks. Should we test source compatibility again? |
Nah, it passed and you didn't change anything significant. This one's mostly just to make it mergeable again. (Technically the smoke tests would have been good enough, but I feel weird using those unless the PR is really just test changes or something.) |
The macOS failure was a timeout of an lldb test. |
@swift-ci Please test macOS |
@airspeedswift All checks have passed. |
a607df8
to
326ecc9
Compare
@airspeedswift I can also prepare a PR for the 5.0 branch, if you will approve and merge this one. |
@swift-ci please test |
@airspeedswift Please review |
326ecc9
to
31bd6d4
Compare
What happened here? I loved it once I grokked it! |
@dabrahams It didn't seem like this would be merged, so I ran out of patience and closed it. |
This pull request changes the
UnboundedRange
typealias to(Never) -> PartialRangeFrom<Never>
, using theNever: Comparable
conformance from SE-0215.