-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Remove GRPC and move to http using kestrel #1137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, does that mean you stopped using protocol buffers, but still use the .proto
files to generate models across languages? If so, OpenAPI (formally swagger) might be alternative to consider.
Src/CSharpier.Cli/ServerFormatter.cs
Outdated
.ConfigureKestrel( | ||
(_, serverOptions) => | ||
{ | ||
serverOptions.Listen(IPAddress.Any, thePort); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, you can actually use unix sockets (Linux, possibly Mac) and named pipes (Windows) to avoid having to chose a port.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will make it much easier if you ever plan on having multiple editors share an instance of csharpier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proto models are no longer needed, I probably forgot to delete them.
I took a look at both a bit. One concern was windows/linux/mac + java/js/c# is a lot of combinations of things to figure out.
Also with named pipes/unix sockets, I assume I still need to come up with a unique name for each instance of CSharpier that runs. If you are running rider with 0.27 and vscode with 0.27 right now that is two instances of csharpier. I assume they would be unhappy all trying to share the same socket/pipe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. With UNIX sockets, you'd be using (probably):
"${XDG_RUNTIME_DIR}/csharpier/${version}.sock"
Which (in my machine) expanded to:
/run/user/1000/csharpier/0.27.2.sock
I'm not sure what the conventions are for windows named pipes, but I assume a similar thing is possible.
Nuget package went from 18mb to 70mb when the gRPC packages were included. This is 20mb as a package.
This should accomplish the same thing without all the bloat and the code is mostly the same.