New issue 315 by gerd94...@gmail.com: erroneous duplicate definition error
if imported file in subdirectory
http://code.google.com/p/protobuf/issues/detail?id=315
What steps will reproduce the problem?
Create "foo.proto" containing:
import "bar.proto";
Create "x/bar.proto" containing:
message bar {
optional int32 x = 1;
}
Try to compile:
protoc --python_out=. -I. -Ix foo.proto x/bar.proto
What is the expected output? What do you see instead?
Compilation shall succeed, just like it does if "x/bar.proto"
is "bar.proto" instead.
It also succeeds if "foo.proto" contains:
import "x/bar.proto"
instead.
What version of the product are you using? On what operating system?
2.3.0 and 2.4.1
Linux and MacOS
Please provide any additional information below.
Attachments:
foo.proto 20 bytes
bar.proto 40 bytes
The error message the compiler produces is:
% protoc --python_out=. -I. -Ix foo.proto
x/bar.proto
gerd@dhcp-171-71-136-245:~/tmp/x
x/bar.proto:2:18: "bar.x" is already defined in file "bar.proto".
x/bar.proto:1:9: "bar" is already defined in file "bar.proto".