-
Notifications
You must be signed in to change notification settings - Fork 351
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
Invalid typescript syntax generated for google.protobuf.Struct RPC replies in v1.88.0 #403
Comments
Ah hrm, @boukeversteegh given this is related to |
Oh yes, I had similar issues in other places. The call-site where the TypeName is resolved assumes that it will always get back a ClassName for 'messages' (not primitives). However, since now we have several message types that don't resolve to class-names by default, you get these breaks. The fix is easy though, the call to I will look tomorrow or wednesday if no-one else would. We probably need a test for this too. |
couldn't help to have a quick look. the problem is here I think, where normally, grpc services cannot return primitives (i think?), so the assumption makes sense. ts-proto/src/generate-services.ts Lines 110 to 116 in c2e6f81
|
🎉 This issue has been resolved in version 1.90.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi, there seems to be a regression in v1.88.0 when it comes to decoding response data that are
google.protobuf.Struct
.I made a small repository to replicate the issue: https://github.com/mkmarek/ts-proto-bug
For a service like this:
there is this kind of typescript code generated:
the
return promise.then(data => {[key: string]: any} | undefined.decode(new Reader(data)));
has invalid syntax.Versions used:
libprotoc 3.0.0
ts-proto v1.88.0
The text was updated successfully, but these errors were encountered: