Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[SR-1952] Implement SE-0103: Make non-escaping closures the default #44561

Closed
lattner mannequin opened this issue Jun 30, 2016 · 13 comments
Closed

[SR-1952] Implement SE-0103: Make non-escaping closures the default #44561

lattner mannequin opened this issue Jun 30, 2016 · 13 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself

Comments

@lattner
Copy link
Mannequin

lattner mannequin commented Jun 30, 2016

Previous ID SR-1952
Radar None
Original Reporter @lattner
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @milseman
Priority Medium

md5: 1cc9c8e0e14e6e4c7c3f195393b327f5

relates to:

  • SR-2180 withUnsafeMutablePointer methods should accept noescape closures

Issue Description:

SE-0103 was accepted, now we need an implementation. It would make sense to stage this in in the following steps:

  • Introduce the new @escaping attribute.

  • Introduce a new compiler warning that triggers on parameters that are not marked @NoEscape, which fixits to introducing the @escaping attribute.

  • Update other swift.org projects to use @escaping where necessary.

  • Switch the default, and start warning about @NoEscape with a fixit to remove it.

  • Upgrade the warning about @NoEscape to be an error with a fixit to remove it.

@gribozavr
Copy link
Contributor

withoutActuallyEscaping() needs to be re-throwing.

@swift-ci
Copy link
Contributor

swift-ci commented Jul 1, 2016

Comment by Trent Nadeau (JIRA)

I updated the proposal to add withoutActuallyEscaping and included the rethrows.

@swift-ci
Copy link
Contributor

swift-ci commented Jul 9, 2016

Comment by Trent Nadeau (JIRA)

PR to add parsing for the new @escaping attribute: #3425

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 20, 2016

tanadeau (JIRA User) Trent, are you planning on completing this in time for the Swift 3 source-breaking deadline? Otherwise, I can take over from here.

@swift-ci
Copy link
Contributor

Comment by Trent Nadeau (JIRA)

Given my work schedule right now, I doubt I'm going to get it done before the Swift 3 deadline at the end of the month.

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 20, 2016

tanadeau (JIRA User) Do you have any un-merged code?

@swift-ci
Copy link
Contributor

Comment by Trent Nadeau (JIRA)

Nothing significant. I was starting to work on importing decls with @escaping.

@swift-ci
Copy link
Contributor

Comment by Trent Nadeau (JIRA)

If there's anything I can help with, let me know.

@swift-ci
Copy link
Contributor

Comment by Trent Nadeau (JIRA)

@milseman I haven't seen any commits or PRs related to this. Can this still be implemented by the Swift 3 cutoff?

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 27, 2016

Yes, and I have an implementation (needs polish and tests). It should be part of Swift 3.

@milseman
Copy link
Mannequin

milseman mannequin commented Jul 29, 2016

Opened PR: #3853

I might be doing more test fixes on it.

@milseman
Copy link
Mannequin

milseman mannequin commented Aug 5, 2016

PR for QoI fixes: #3939 and #3948
PR for the autoclusure syntax: #4031 and #4052

Only thing remaining is the stdlib function `withoutActuallyEscaping`

@milseman
Copy link
Mannequin

milseman mannequin commented Aug 10, 2016

`withoutActuallyEscaping` is an additive construct, so I'll spin off a separate JIRA task to track that.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself
Projects
None yet
Development

No branches or pull requests

2 participants