protobuf-php/protobuf

descriptor.proto not found

byrnedo opened this issue · 2 comments

I updated to the latest version and I got the following when running

google/protobuf/descriptor.proto: File not found.
github.com/gogo/protobuf/gogoproto/gogo.proto: Import "google/protobuf/descriptor.proto" was not found or had errors.

I noticed the that protobuf command was (via '--include-descriptors') adding the following:

'--proto_path=/my/project/vendor/protobuf-php/google-protobuf-proto/src'

I looked in that folder and the descriptor file is in there:

google  descriptor.proto  php.proto  plugin.proto

But I guess it's then going into google/protobuf in that dir, which doesn't have the descriptor.proto file

Has there been some change that would cause this?

if you want to use the protos defined in vendor/protobuf-php/google-protobuf-proto
I believe it should be import descriptor.proto instead of import google/protobuf/descriptor.proto

IRC by using google/protobuf/descriptor.proto protoc will try to look up the descriptor.proto provided by https://github.com/google/protobuf

OK, but I was pretty sure the standard is the fully qualified name, like according to https://developers.google.com/protocol-buffers/docs/proto#customoptions.

So shouldn't the --include-descriptors flag not honor that?