Fix well-known Google wrapper types#2456
Conversation
|
Not familiar with prost builds. @LucioFranco is likely to be better equipped for this review |
| rpc EmptyCall(google.protobuf.Empty) returns (google.protobuf.Empty); | ||
| rpc StringCall(google.protobuf.StringValue) returns (google.protobuf.Empty); | ||
| rpc AnyCall(google.protobuf.Any) returns (google.protobuf.Empty); | ||
| // Wrapper types that map to primitives |
There was a problem hiding this comment.
Are these new? In what version were they added?
There was a problem hiding this comment.
They have been around at least since 2015 (https://github.com/protocolbuffers/protobuf/commits/main/src/google/protobuf/wrappers.proto). These wrappers used to work with prost 0.13.
There was a problem hiding this comment.
They used to work? huh I have no memory of seeing them but that legit could just be me. Can you expand on what you mean by it worked and what changed?
There was a problem hiding this comment.
Can't expand that much I'm afraid, got pointed in this direction by Claude and considering the handling of other wrapper types this seemed like the place to be for a fix. My best guess would be this change in prost-build from 0.13 to 0.14: tokio-rs/prost#1228 .
There was a problem hiding this comment.
@LucioFranco would be great if this got merged, let me know if there is anything still missing.
Motivation
Google WKT were resolving incorrectly (e.g. google.protobuf.BoolValue resolved to super::bool).
Solution
Fixed by using the resolved types from prost, added test cases.