-
Notifications
You must be signed in to change notification settings - Fork 143
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
Extensions #14
Comments
I'm happy with this feature and PR for it :) |
As I said in #15 (comment). I want to give some ideas: First of all, I want to give a summary about extensions and options in Protobuf:
For your PR, I think there're some problems:
For the 3rd problem(custom options), I looked into official Go implementation of protobuf and gRPC, I found it doesn't generate custom options for you. You have to use Considering it's they're really advanced features, we can discuss more before implementing them.🙂 |
As per As per For extend google.protobuf.MethodOptions {
// See `HttpRule`.
HttpRule http = 72295728;
} message Http {
// A list of HTTP configuration rules that apply to individual API methods.
//
// **NOTE:** All service configuration rules follow "last one wins" order.
repeated HttpRule rules = 1;
// ...
} For me, it's a sine qua non that a library I use has the ability to process and read from these protobufs. These are standard libraries and promoted by Google itself. Are you suggesting that we don't handle options and/or extensions at all? Again, I am happy to discuss how this is best implemented, but I think it's important that we make this library fully-featured with the official protobuf specifications. |
+1 for this. Looking forward to being merged! |
@tony612 Any thoughts on how we should handle addressing/merging this? For my usage, it's been pretty helpful. I wouldn't mind this ending up as a permanent fork (by a different name?) or looking for a way to merge. What do you think is best? |
@tony612 was about to start a pr to implement this also. Having options/extensions available in generated code is very useful for lots of different projects that I work on. We've been able to use these in the golang proto package to help us write libs but once I got to elixir I've had to pause until I can get access to the options. @hayesgm wrt the code snippet at the start of this issue, would you consider the RPC/field signature to out the options map inside a keyword, keyed to :option? |
@tony612 Do you have any updates on support for options in protobuf-elixir? |
Since extension is implemented in #83 I think we can move forward to think about this again. |
Cool, thanks @tony612 for this project. I feel this is the right direction for protobufs in Elixir.
Quick question: do you have thoughts on how we'd build extensions? I want to add something akin to:
This would allow us to use services like grpc gateway. I would expect this to build a service object similar to:
Also, would it be possible to make the service definitions generic and then the grpc library could easily build off of this. E.g., as above, we could just have the service definition be a simple module and the grpc could run something akin to:
in grpc library:
I've started looking into how to build extensions, but it's a bit mind-bending to track how to add that. Happy for your thoughts here.
The text was updated successfully, but these errors were encountered: