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

Avoid sendable key paths in dynamic member lookup #3463

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

stephencelis
Copy link
Member

There are a few compiler bugs that prevent us from declaring sendability for key paths where it's needed.

First, doing so breaks autocomplete, which really hurts the developer experience: swiftlang/swift#77035

Second, even though recovering autocomplete might be preferable at the cost of safety, there is no safety to begin with right now because sendable diagnostics don't propagate through dynamic member lookup: swiftlang/swift#77105

Because of this, let's only use non-sendable key paths for now, and force cast them under the hood.

There are a few compiler bugs that prevent us from declaring sendability
for key paths where it's needed.

First, doing so breaks autocomplete, which really hurts the developer
experience: swiftlang/swift#77035

Second, even though recovering autocomplete might be preferable at the
cost of safety, there is no safety to begin with right now because
sendable diagnostics don't propagate through dynamic member lookup:
swiftlang/swift#77105

Because of this, let's only use non-sendable key paths for now, and
force cast them under the hood.
@stephencelis stephencelis merged commit 3879d2c into main Oct 23, 2024
13 checks passed
@stephencelis stephencelis deleted the sendable-key-path-fixes branch October 23, 2024 18:16
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.

1 participant