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-4405] Add @escaping to RecoverableError.attemptRecovery #46984

Closed
milseman mannequin opened this issue Mar 28, 2017 · 11 comments
Closed

[SR-4405] Add @escaping to RecoverableError.attemptRecovery #46984

milseman mannequin opened this issue Mar 28, 2017 · 11 comments
Assignees
Labels
affects ABI Flag: Affects ABI 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

@milseman
Copy link
Mannequin

milseman mannequin commented Mar 28, 2017

Previous ID SR-4405
Radar rdar://problem/36911792
Original Reporter @milseman
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 1
Component/s Standard Library
Labels Bug, AffectsABI, StarterBug
Assignee @itaiferber
Priority Medium

md5: 71cb6c0b757a45fda3460f4849cdec57

is duplicated by:

  • SR-6845 RecoverableError's attemptRecovery(optionIndex:resultHandler:) takes a non-escaping closure

Issue Description:

RecoverableError's attemptRecovery's resultHandler should be an escaping closure. Add @escaping and write a test case to exercise asynchronous handling of the error.

@milseman
Copy link
Mannequin Author

milseman mannequin commented Sep 15, 2017

This is actually defined in public/SDK/Foundation/NSError.swift.

@moiseev or @airspeedswift, what is the policy for this? Is it technically an SDK change?

@swift-ci
Copy link
Collaborator

Comment by Mohammed M. Ennabah (JIRA)

And it's also defined in swift-corelibs-foundation/Foundation/NSError.swift too.

Should both files be fixed?

@milseman
Copy link
Mannequin Author

milseman mannequin commented Sep 15, 2017

I'm not sure. It should probably belong in one but not the other.

@moiseev any ideas?

@milseman
Copy link
Mannequin Author

milseman mannequin commented Sep 15, 2017

Also, CC Lance (JIRA User)

@moiseev
Copy link
Mannequin

moiseev mannequin commented Sep 15, 2017

Foundation overlay should be in sync with corelibs-foundation API-wise. But whether this should happen or not, let's ask @parkera.

@swift-ci
Copy link
Collaborator

Comment by Mohammed M. Ennabah (JIRA)

Any updates, @parkera ?

@belkadan
Copy link
Contributor

@swift-ci create

@itaiferber
Copy link
Contributor

@belkadan Looking at this now. What sort of breakage, if any, can be expected here as a result of changing the protocol? I doubt anyone implements this, but is non-escaping to escaping a breaking change?

@belkadan
Copy link
Contributor

It will break anyone who customized their implementation of attemptRecovery(optionIndex:resultHandler:); they will have to add @escaping themselves. Any existing calls to attemptRecovery should still work, though.

@belkadan
Copy link
Contributor

Itai implemented this in Swift 4.2

master: #16182
4.2: #16258

@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Jul 26, 2018

@milseman, Could you verify if the problem is fixed and if so move the JIRA to "Closed"?
Thanks!
Anna

@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
affects ABI Flag: Affects ABI 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

3 participants