File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
compiler/src/java_plugin/cpp Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,23 @@ class JavaGrpcGenerator : public protobuf::compiler::CodeGenerator {
4545 JavaGrpcGenerator () {}
4646 virtual ~JavaGrpcGenerator () {}
4747
48+ // Protobuf 5.27 released edition 2023.
49+ #if GOOGLE_PROTOBUF_VERSION >= 5027000
4850 uint64_t GetSupportedFeatures () const override {
49- return FEATURE_PROTO3_OPTIONAL;
51+ return Feature::FEATURE_PROTO3_OPTIONAL |
52+ Feature::FEATURE_SUPPORTS_EDITIONS;
5053 }
54+ protobuf::Edition GetMinimumEdition () const override {
55+ return protobuf::Edition::EDITION_PROTO2;
56+ }
57+ protobuf::Edition GetMaximumEdition () const override {
58+ return protobuf::Edition::EDITION_2023;
59+ }
60+ #else
61+ uint64_t GetSupportedFeatures () const override {
62+ return Feature::FEATURE_PROTO3_OPTIONAL;
63+ }
64+ #endif
5165
5266 virtual bool Generate (const protobuf::FileDescriptor* file,
5367 const std::string& parameter,
You can’t perform that action at this time.
0 commit comments