Open
Description
Consider the following set of files.
In file test1.proto
:
syntax = "proto2";
import public "google/protobuf/descriptor.proto";
In file test2.proto
:
syntax = "proto2";
import public "test1.proto";
In file test3.proto
:
syntax = "proto2";
import public "test2.proto";
message Foo { optional google.protobuf.FileDescriptorProto field = 1; }
Compiling these with protoc --go_out=. test3.proto
produces:
2018/09/03 22:46:30 protoc-gen-go: WARNING: failed finding publicly imported dependency for .google.protobuf.FileDescriptorProto, used in test3.proto
2018/09/03 22:46:30 protoc-gen-go: WARNING: failed finding publicly imported dependency for .google.protobuf.FileDescriptorProto, used in test3.proto
2018/09/03 22:46:30 protoc-gen-go: WARNING: failed finding publicly imported dependency for .google.protobuf.FileDescriptorProto, used in test3.proto
However, C++ is able to resolve google.protobuf.FileDescriptorProto
just fine when running protoc --cpp_out=. test3.proto
.
It seems that the behavior is that indirectly publicly import declarations are exported.
\cc @neild