You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that support for Proto3 optional fields was added in pull #884, which was included in release 1.2.1. However, when I try to generate TypeScript files from a protobuf file containing optional fields I receive an error:
helloworld.proto: is a proto3 file that contains optional fields, but code
generator --js_out hasn't been updated to support optional fields in proto3.
Please ask the owner of this code generator to support proto3 optional.
I'm using protoc version 3.12.4 and grpc-web version 1.2.1.
I believe for --js_out, which is the part of the standard protoc distribution (not a grpc-web distribution), that part of the plugin has only been updated since version 3.13.0, but I am not sure. In any case, please check with the protocolbuffers repo for that particular plugin.
alancleary
changed the title
Can't compile woth Proto3 optional fields
Can't compile with Proto3 optional fields
Nov 13, 2020
Thanks for the quick reply, @stanley-cheung. I didn't realize --js_out is part of the protoc distribution. I upgraded protoc to version 3.13.0 and indeed it compiled with Proto3 optional fields. Cheers!
I see that support for Proto3 optional fields was added in pull #884, which was included in release 1.2.1. However, when I try to generate TypeScript files from a protobuf file containing optional fields I receive an error:
I'm using protoc version 3.12.4 and grpc-web version 1.2.1.
Here's the protoc command:
And here's helloworld.proto:
Hopefully this is an error on my part, otherwise I guess this could be considered a feature request. Any thoughts on what might be happening here?
The text was updated successfully, but these errors were encountered: