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: pass session token to network extension #34

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Jan 30, 2025

This PR:

With this, the VPN functionality works end-to-end! Once the system extension is enabled, and the app has been logged in, starting the VPN will make the user's workspaces available on <wsname>.coder

Copy link
Member Author

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

@@ -0,0 +1,3 @@
--selfrequired log,info,error,debug,critical,fault
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the docs:

In the rare case of functions with @autoclosure arguments, self may be required at the call site, but SwiftFormat is unable to detect this automatically. You can use the --selfrequired command-line option to specify a list of such methods, and the redundantSelf rule will then ignore them.

throw .alreadyRunning
}
running = true
return AsyncStream(
Copy link
Member Author

@ethanndickson ethanndickson Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

messages() is called each time next() is called on the Speaker, but it's not possible to mutate the running variable from within the stream in Swift 6.

Even if it were possible, I don't think this check is of any value. Isn't it usually the case (in general) that iterating over the same (mutating) stream multiple times is just an incorrect use of an API? I think actor re-entrancy means it's possible to do so here.

If we do want to keep the check, I'm open to suggestions on how best to do that.

@ethanndickson ethanndickson marked this pull request as ready for review January 30, 2025 03:25
@ethanndickson ethanndickson merged commit f3123f1 into main Jan 30, 2025
4 checks passed
@ethanndickson ethanndickson deleted the ethan/ne-session-token branch January 30, 2025 10: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