Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protoc --ruby_out fails to generate a file with a message that contains a field of type google.protobuf.DescriptorProto #7992

Closed
viacheslav-rostovtsev opened this issue Oct 29, 2020 · 3 comments · Fixed by #9003
Assignees
Labels

Comments

@viacheslav-rostovtsev
Copy link

What version of protobuf and what language are you using?
Version: 3.13.0
Language: Ruby

What operating system (Linux, Windows, ...) and version?
Debian 5.7.17-1rodete3 (2020-09-16) x86_64 GNU/Linux

What runtime / compiler are you using (e.g., python version or gcc version)
ruby 2.6.5

What did you do?
Steps to reproduce the behavior:

  1. Checkout https://github.com/googleapis/googleapis/blob/master/google/cloud/bigquery/storage/v1beta2/protobuf.proto
    (( the message that cause an issue is:
message ProtoSchema {
  // Descriptor for input message. The descriptor has to be self contained,
  // including all the nested types, excepted for proto buffer well known types
  // (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf).
  google.protobuf.DescriptorProto proto_descriptor = 1;
}
  1. run protoc --ruby_out=/tmp/foo protobuf.proto
  2. see error --ruby_out: protobuf.proto: proto3 message field google.cloud.bigquery.storage.v1beta2.ProtoSchema.proto_descriptor in file google/protobuf/descriptor.proto has a dependency on a type from proto2 file google/protobuf/descriptor.proto. Ruby doesn't support proto2 yet, so we must fail.

What did you expect to see
ruby code generated at the target directory

What did you see instead?
an error
--ruby_out: protobuf.proto: proto3 message field google.cloud.bigquery.storage.v1beta2.ProtoSchema.proto_descriptor in file google/protobuf/descriptor.proto has a dependency on a type from proto2 file google/protobuf/descriptor.proto. Ruby doesn't support proto2 yet, so we must fail.`

Anything else we should know about your project / environment

@yirutang
Copy link

Any updates on this? Thanks.

@zhangskz
Copy link
Member

The fix was merged to branch 3.18.x on Wednesday and should be part of the next release.

@zhangskz
Copy link
Member

Release of 3.18.x will tentatively happen in a day or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants