Closed andersfugmann closed 2 years ago
Apparently the github ubuntu runners does not have a sufficiently recent version of protoc (>= 3.12 required). Ill look into that later.
Even worse - The tests would not even complete on any system with protoc < 3.12
. Maybe we should just remove the extra tests (or somehow leave them as optional).
Ok. Here is a fix for this little test problem and older compilers.
By detecting if protoc
compiler supports the new flag (I assume the flag will still be supported for protoc
>= 3.15, where the flag is enabled by default), the build either includes or excludes testing the proto3_optional
test.
Its convoluted, but it works, and its the simplest way I could think of. One drawback though is that the expect test is not really what we want, but the test will fail if proto3 options are not handled correctly.
Thanks for reviewing. I will merge once the tests are green.
I can create a new release over the weekend. I see you already tagged a v4.3. Should I override this tag, or create a new release tag?
Feel free to overwrite the 4.3.0 tag. I was intending to release it as-is, but I think we should rather have your changes in first. This was my release PR https://github.com/ocaml/opam-repository/pull/22085
This change changes proto3 optional fields to be option types instead of an polymorphic variant. Currently proto3 optional fields are mapped as a
oneof _<field_name> { <field_type> <field_name> = 1}
. This maps to a polymorphic variant:The change proposed is to make optional fields in the same way as proto2: