Closed RicoSuter closed 4 years ago
Have you tried specifying proto3 syntax at the top of the file?
syntax = "proto3";
https://developers.google.com/protocol-buffers/docs/proto3
The first line of the file specifies that you're using proto3 syntax: if you don't do this the protocol buffer compiler will assume you are using proto2. This must be the first non-empty, non-comment line of the file.
Yes this was it - thank you very much. Do you know what the default is for gRPC? proto3 or proto2? It seems that gRPC assumes proto3 (they dont specify it) and here the default is proto2.
Not sure what gRPC defaults to, but based on the above the protoc compiler should be defaulting to proto2.
The following grpc proto file fails to be parsed:
(from: https://grpc.io/docs/tutorials/basic/web/)
Seems that the froto parser requires optional/required/repeated because this works: