Skip to content

Improve (nonisolated) let checking #38119

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

Merged

Conversation

DougGregor
Copy link
Member

Explanation: Implement the remainder of the amendment to SE-0306 "Actors" that considers any reference to an actor-isolated let from within a
different module like a (mutable) property reference.
Scope: Only affects programs that have already adopted Swift Concurrency and are using actors across modules. This is technically a source break, but is only in very new code that is using actors and let in a non-resilient manner.
Radar/SR Issue: rdar://78274621
Risk: Low.
Testing: PR testing and CI on main.
Original PR: #38118

Implement the remainder of the amendment to SE-0306 "Actors" that
considers any reference to an actor-isolated `let` from within a
different module like a (mutable) property reference. If such
references are from outside the actor, it will be a cross-actor
reference at will be implicitly `async`.
A nonisolated declaration is accessible concurrently, so it must be of
Sendable type to be safe. This plugs a hole in data-race preventation
that will need to be documented in an amendment to SE-0313.
@DougGregor DougGregor requested a review from a team as a code owner June 27, 2021 05:47
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e417288

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e417288

@DougGregor
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - a3aa341

@DougGregor
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - a3aa341

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a3aa341

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 628af8d

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor DougGregor merged commit be458db into swiftlang:release/5.5 Jun 28, 2021
@DougGregor DougGregor deleted the nonisolated-let-checking-5.5 branch June 28, 2021 22:20
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 628af8d

@finagolfin
Copy link
Member

@DougGregor, I think this pull may have broken the Windows CI for the 5.5 branch (the trunk branch also may be broken with a different issue), as your previous 5.5 pull #38064 passed the Win CI.

Maybe that single failing test can be disabled on Windows for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants