I'm using rules_proto_grpc to generate node targets which are consumed by typescript (ts_project from rules_nodejs). rules_proto_grpc uses grpc_tools_node_protoc_plugin from the grpc-tools package to build a js_grpc_node_library. Building a js_grpc_node_library from a file (hello.proto) with an optional field results in the following error message:
hello.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-grpc_node_plugin hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--grpc_node_plugin_out:
Reproduction steps
Use js_grpc_node_library to compile a proto with an optional field. For example:
This should already work. This was previously reported in #1717, and I made the fix for the plugin in #1725, and then that change was published in version 1.11.1.
Problem description
I'm using rules_proto_grpc to generate node targets which are consumed by typescript (ts_project from rules_nodejs). rules_proto_grpc uses grpc_tools_node_protoc_plugin from the grpc-tools package to build a js_grpc_node_library. Building a js_grpc_node_library from a file (hello.proto) with an optional field results in the following error message:
Reproduction steps
Use js_grpc_node_library to compile a proto with an optional field. For example:
hello.proto
:BUILD
:Environment