-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[concurrency] implement the 'unsafe' option for @actorIndependent #34260
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
Conversation
include/swift/AST/Attr.def
Outdated
OnClass | OnFunc | OnVar | OnSubscript | ConcurrencyOnly | | ||
ABIStableToAdd | ABIStableToRemove | | ||
APIStableToAdd | APIBreakingToRemove, | ||
104) |
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 all looks right.
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.
Looking good
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 is looking good! Just a few minor requests.
The code's looking good. One last request (sorry): could you do a rebase to clean up the history a little bit? |
Ok I cleaned it up into 3 commits. In future PR's I'll go with a rebasing strategy. |
@swift-ci smoke test |
[broken] first impl of @actorIndependent in the type checker. [broken] fixed mistake in my parsing code wrt invalid source range [broken] found another spot where ActorIndependent needs custom handling [broken] incomplete set of @actorIndependent(unsafe) tests updates to ActorIndependentUnsafe [fixed] add FIXME plus simple handling of IndependentUnsafe context finished @actorIndependent(unsafe) regression tests added wip serialization / deserialization test focus test to just one actor class round-trip serialize/deserialize test for @actorIndependent serialize -> deserialize -> serialize -> compare to original most of doug's comments addressed robert's comments fix printing bug; add module printing to regression test [nfc] update comment for ActorIsolation::IndependentUnsafe
@swift-ci please smoke test |
Let's go ahead and merge, and we can tweak later if needed. |
This PR implements
@actorIndependent(unsafe)
, which disables static safety checks for accesses to actor-isolated storage. It is otherwise semantically the same as@actorIndependent
(without the option) that is the 'safe' version.TODOs:
Fix missing detection of mutable state access from, Reported as SR-13735, but already fixed in@actorIndependent
computed propertymain
.@actorIndependent(unsafe)
regression tests.