google/openrtb

Failed to generate Golang source file for openrtb.proto using proto3

saifat29 opened this issue · 1 comments

OS- MacOS 10.14.4
protoc- v3.6.1
Golang Protobuf- v1.3.2
Google OpenRTB Protobuf- v1.5.5
Language- Golang

I am trying to generate protobuf Golang source file from openrtb.proto for protobuf3.

In the openrtb.proto file I added the syntax="proto3"; line and ran
protoc --go_out=. *.proto however the generation failed and I get the following error-

Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.

I referred this issue #21 and I see that openrtb.proto supports protobuf3.

I want to use protobuf3, what am I doing wrong?

I figured that openrtb.proto doesn't supports proto3 syntax. However proto3 tools can be used with openrtb.proto using proto2 syntax.

I tried using openrtb.proto with proto3 because of the following comment #21 (comment)