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

chore: upgrade Proto code to Swift 6 #14

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

spikecurtis
Copy link
Collaborator

@spikecurtis spikecurtis commented Dec 18, 2024

Upgrades Proto to Swift 6, mostly by telling the compiler explicitly that things are sendable, but in some cases by scoping down our closures so they only capture sendable objects.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis marked this pull request as ready for review December 18, 2024 16:53
Coder Desktop/Proto/Speaker.swift Outdated Show resolved Hide resolved
@ethanndickson
Copy link
Member

Just thinking about it after the fact, is there a reason we wouldn't want to make Speaker & Handshaker an actor?

@spikecurtis
Copy link
Collaborator Author

spikecurtis commented Dec 19, 2024

Just thinking about it after the fact, is there a reason we wouldn't want to make Speaker & Handshaker an actor?

The reason I didn't make Speaker and actor is that as far as I can tell, actors don't have inheritance. An alternative design might be to make the Speaker an actor, and then have the Tunnel and/or Manager compose a Speaker internally. However, we'd have to rethink the way the outer object gets notified about messages and RPCs --- overriding handlers won't work.

For the Handshaker, I was having trouble getting it to work because of the way we use DispatchIO callbacks to write to the data: data has to be mutable and DispatchIO callbacks aren't async. I couldn't figure out how to make an actor work for that.

Copy link
Collaborator Author

spikecurtis commented Dec 19, 2024

Merge activity

  • Dec 19, 4:46 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 19, 4:46 AM EST: A user merged this pull request with Graphite.

@spikecurtis spikecurtis merged commit ae65c20 into main Dec 19, 2024
4 checks passed
@ethanndickson ethanndickson deleted the spike/proto-swift-6 branch January 23, 2025 02:49
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.

2 participants