Fill unrecognized options #715
-
I'm writing custom fn method_config(method: &Method) -> Option<TokenStream> {
if !method.options.uninterpreted_option.is_empty() {
panic!("{:#?}", method.options.uninterpreted_option);
}
// <...>
} And I have this proto //<...>
rpc GetSources(GetSourcesRequest) returns (GetSourcesResponse) {
option (google.api.http) = {
get : "/sources"
};
} And compilation doesn't fail, meaning the
But it seems outdated, because I can't find I've tested I really want to parse this option, but as of now can't figure out how to do it. Is there a way, can I help contribute to prost with something to make this happen? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The type is generated from the google protobuf types here https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto#L741 and probably refers to the C++ implementation. We just copy the comments. Prost just uses |
Beta Was this translation helpful? Give feedback.
The type is generated from the google protobuf types here https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto#L741 and probably refers to the C++ implementation. We just copy the comments. Prost just uses
protoc
so maybe there is a flag you can set to get that. Prost doesn't do much special here than other implementations as for getting the data from the file descriptor set.