You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest version of protobuf (v27.1), I see the following compiler errors when trying to compile the javascript generator:
external/com_google_protobuf_javascript/generator/js_generator.cc:457:7: error: 'OneofDescriptorLegacy' was not declared in this scope; did you mean 'FileDescriptorLegacy'?
457 | if (OneofDescriptorLegacy(oneof).is_synthetic()) return true;
| ^~~~~~~~~~~~~~~~~~~~~
| FileDescriptorLegacy
external/com_google_protobuf_javascript/generator/js_generator.cc: In function 'std::string google::protobuf::compiler::js::{anonymous}::JSOneofIndex(const google::protobuf::OneofDescriptor*)':
external/com_google_protobuf_javascript/generator/js_generator.cc:566:9: error: 'OneofDescriptorLegacy' was not declared in this scope; did you mean 'FileDescriptorLegacy'?
566 | if (OneofDescriptorLegacy(o).is_synthetic()) continue;
| ^~~~~~~~~~~~~~~~~~~~~
| FileDescriptorLegacy
external/com_google_protobuf_javascript/generator/js_generator.cc: In function 'bool google::protobuf::compiler::js::{anonymous}::InRealOneof(const google::protobuf::FieldDescriptor*)':
external/com_google_protobuf_javascript/generator/js_generator.cc:787:11: error: 'OneofDescriptorLegacy' was not declared in this scope; did you mean 'FileDescriptorLegacy'?
787 | !OneofDescriptorLegacy(field->containing_oneof()).is_synthetic();
| ^~~~~~~~~~~~~~~~~~~~~
| FileDescriptorLegacy
external/com_google_protobuf_javascript/generator/js_generator.cc: In function 'bool google::protobuf::compiler::js::{anonymous}::DeclaredReturnTypeIsNullable(const google::protobuf::compiler::js::GeneratorOptions&, const google::protobuf::FieldDescriptor*)':
external/com_google_protobuf_javascript/generator/js_generator.cc:987:43: error: 'class google::protobuf::FileDescriptorLegacy' has no member named 'syntax'
987 | if (FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::Syntax::SYNTAX_PROTO3 &&
| ^~~~~~
external/com_google_protobuf_javascript/generator/js_generator.cc:987:77: error: 'google::protobuf::FileDescriptorLegacy::Syntax' has not been declared
987 | if (FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::Syntax::SYNTAX_PROTO3 &&
| ^~~~~~
external/com_google_protobuf_javascript/generator/js_generator.cc: In member function 'void google::protobuf::compiler::js::Generator::GenerateClassFieldToObject(const google::protobuf::compiler::js::GeneratorOptions&, google::protobuf::io::Printer*, const google::protobuf::FieldDescriptor*) const':
external/com_google_protobuf_javascript/generator/js_generator.cc:2350:45: error: 'class google::protobuf::FileDescriptorLegacy' has no member named 'syntax'
2350 | if (FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::Syntax::SYNTAX_PROTO3 &&
| ^~~~~~
external/com_google_protobuf_javascript/generator/js_generator.cc:2350:79: error: 'google::protobuf::FileDescriptorLegacy::Syntax' has not been declared
2350 | if (FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::Syntax::SYNTAX_PROTO3 &&
| ^~~~~~
external/com_google_protobuf_javascript/generator/js_generator.cc: In member function 'void google::protobuf::compiler::js::Generator::GenerateClassField(const google::protobuf::compiler::js::GeneratorOptions&, google::protobuf::io::Printer*, const google::protobuf::FieldDescriptor*) const':
external/com_google_protobuf_javascript/generator/js_generator.cc:2758:45: error: 'class google::protobuf::FileDescriptorLegacy' has no member named 'syntax'
2758 | if (FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::Syntax::SYNTAX_PROTO3 &&
| ^~~~~~
external/com_google_protobuf_javascript/generator/js_generator.cc:2758:79: error: 'google::protobuf::FileDescriptorLegacy::Syntax' has not been declared
2758 | if (FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::Syntax::SYNTAX_PROTO3 &&
|
It looks like perhaps the latest version might have removed some legacy classes.
The text was updated successfully, but these errors were encountered:
// With the upcoming release of editions, syntax should not be used for// business logic. Instead, the various feature helpers defined in this file// should be used to query more targeted behaviors. For example:// has_presence, is_closed, requires_utf8_validation.
I think this PR removed the Legacy class used in js_generator.cc. That change was also was released in protobuf v26.0 (protocolbuffers/protobuf#15709).
kgreenek
changed the title
Cannot build js generator with latest protobuf
Cannot build js generator with latest protobuf (v26.0+ not supported)
Jun 12, 2024
Using the latest version of protobuf (v27.1), I see the following compiler errors when trying to compile the javascript generator:
It looks like perhaps the latest version might have removed some legacy classes.
The text was updated successfully, but these errors were encountered: