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

[SR-8012] Remove Indexable aliases #50545

Closed
natecook1000 opened this issue Jun 15, 2018 · 7 comments
Closed

[SR-8012] Remove Indexable aliases #50545

natecook1000 opened this issue Jun 15, 2018 · 7 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. good first issue Good for newcomers standard library Area: Standard library umbrella

Comments

@natecook1000
Copy link
Member

Previous ID SR-8012
Radar None
Original Reporter @natecook1000
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, StarterBug
Assignee franzbusch (JIRA)
Priority Medium

md5: b5e7fd07f09fbc5621ab6dd30428c1f8

Issue Description:

All the Indexable type aliases state that they'll be removed in Swift 4. Now that we're on 4.2 and on our way toward 5, we should be able to remove those aliases.

  1> struct I: Indexable {}
warning: repl.swift:1:11: warning: 'Indexable' is deprecated: it will be removed in Swift 4.0.  Please use 'Collection' instead
@swift-ci
Copy link
Collaborator

Comment by Franz Busch (JIRA)

I wanted to take this as my first issue as it seems pretty quick to fix. I already located the files and the test I need to change. Sadly, I can't run the tests as the build script with --validation-tests fails with:

  1. While verifying SIL function "@$S25SwiftPrivatePthreadExtras28_stdlib_pthread_barrier_waitys5Int32VSpyAA01_e1_f1_G2_tVGF".
    for '*stdlib_pthread_barrier_wait(*🙂' at /Users/fb/Development/swift/stdlib/private/SwiftPrivatePthreadExtras/PthreadBarriers.swift:107:8
    [32/637] Compiling /Users/fb/Development/build/Ninja-DebugAssert/swift-macosx-x86_64/stdlib/public/SDK/Dispatch/macosx/x86_64/Dispatch.o
    ninja: build stopped: subcommand failed.
    ./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Any idea what I can do about that?

@Moximillian
Copy link
Contributor

I do not know about the specific error there, but there are tests that check for the typealiases. If you remove the typealiases, you also need to remove the tests. Look for example:

// expected-warning@+1 {{'Indexable' is deprecated

@swift-ci
Copy link
Collaborator

Comment by Franz Busch (JIRA)

I already removed these. I guess I just got problems actually compiling swift at the moment

@swift-ci
Copy link
Collaborator

Comment by Franz Busch (JIRA)

Opened a PR: #17625

@Moximillian
Copy link
Contributor

So CodaFi (JIRA User), the bug here was about completely removing the type aliases (originally described to be removed for swift 4), where as a4230ab keeps them around with "obsoleted 5.0" inside comments... So has this bug become invalid, or?

@CodaFi
Copy link
Member

CodaFi commented Jun 30, 2018

You mean IndexDistance, right? That's a separate thing. #17580 knocks this one out in particular, you can file another bug about that one if you want to start a discussion about removing it.

@Moximillian
Copy link
Contributor

CodaFi (JIRA User), this is in stdlib/public/core/MigrationSupport.swift (latest master) :

@available(, deprecated/, obsoleted: 5.0*/, renamed: "BidirectionalCollection", message: "it will be removed in Swift 5.0. Please use 'BidirectionalCollection' instead")

public typealias BidirectionalIndexable = BidirectionalCollection

However, the explanation might come from the PR description:

But there seems to be a problem with obsoleting type aliases that needs digging into that is crashing SILGen, so some are commented out for now.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. good first issue Good for newcomers standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

4 participants