Skip to content

chore: add csharp_namespace to vpn.proto #15634

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
merged 3 commits into from
Nov 26, 2024
Merged

chore: add csharp_namespace to vpn.proto #15634

merged 3 commits into from
Nov 26, 2024

Conversation

deansheather
Copy link
Member

vpn/vpn.proto Outdated
@@ -1,5 +1,6 @@
syntax = "proto3";
option go_package = "github.com/coder/coder/v2/vpn";
option csharp_namespace = "Coder.Desktop.Rpc.Proto";
Copy link
Contributor

Choose a reason for hiding this comment

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

Coder Desktop is the entire desktop application, and Coder VPN is the feature. So, I think we should qualify the namespace to "VPN" somehow, since this protocol really is specific to Coder VPN.

Copy link
Member Author

Choose a reason for hiding this comment

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

The whole solution is named Coder.Desktop. I could rename the solution to Coder.Vpn but it would make less sense because then the UI project would be named Coder.Vpn.Desktop (or something). We want to keep all the code in a single solution so we don't need to mess with packaging the library packages for consumption in a different solution.

There's also no VPN-specific components in the C# code unlike with the Mac version, just a service manager and UI, which makes me inclined to keep it named as Coder.Desktop.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can move it to Coder.Desktop.Vpn.Rpc or Coder.Desktop.VpnRpc perhaps?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the whole solution should still be Coder.Desktop, and this could be Coder.Desktop.Vpn.Rpc (or even just Coder.Desktop.Vpn if you don't think we need the "RPC" qualifier). Not sure what feels more natural in C#.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we could do Coder.Desktop.Vpn. I might rename some of my types to e.g. RpcSpeaker though

Copy link
Member Author

Choose a reason for hiding this comment

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

The protocol will still be Coder.Desktop.Vpn.Proto since it's in it's own project

@deansheather deansheather merged commit 06c9979 into main Nov 26, 2024
27 checks passed
@deansheather deansheather deleted the dean/vpn-proto-cs branch November 26, 2024 09:58
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