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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: add csharp_namespace to vpn.proto
  • Loading branch information
deansheather authored Nov 23, 2024
commit 8aa6f2a66d33d5fa8d8a005540cb4c4062b5da12
1 change: 1 addition & 0 deletions vpn/vpn.proto
Original file line number Diff line number Diff line change
@@ -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


import "google/protobuf/timestamp.proto";

Expand Down
Loading