Closed bonito-skipjack closed 1 year ago
Thanks for your report!
I search into protoc's changelog and find out that
optional
support is added in 3.12.0
as an experimental feature, need experimental_allow_proto3_optional
flag to enable it3.15.0
, and doesn't require extra flags since then.2020-05-12 version 3.12.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Protocol Compiler
* [experimental] Singular, non-message typed fields in proto3 now support
presence tracking. This is enabled by adding the "optional" field label and
passing the --experimental_allow_proto3_optional flag to protoc.
* For usage info, see docs/field_presence.md.
* During this experimental phase, code generators s
2021-02-05 version 3.15.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Protocol Compiler
* Optional fields for proto3 are enabled by default, and no longer require
the --experimental_allow_proto3_optional flag.
And tonic-build
also mentions this:
https://github.com/hyperium/tonic/blob/933f5607350af983e479219a2ef3688484976968/tonic-build/src/prost.rs#L354-L360
But now the codebase doesn't contain optional
protocol as we are in progress of refactoring our gRPC protocol. I guess that's why 3.12.4
could compile.
What type of bug is this?
Other
What subsystems are affected?
Other
What happened?
The README.md file clearly states if I built from source, that protoc version needs greater or equal to 3.15. But in Dockerfile, after docker builds, the version is 3.12.4.
What operating system did you use?
Ubuntu 22.04
Relevant log output and stack trace
How can we reproduce the bug?