Closed GoogleCodeExporter closed 9 years ago
This is correct behavior. Like the regular Go compilers, the protocol compiler
requires you to compile the files for a single package in each run. You're
asking it to compile two files from different packages. Instead, you should
just compile proto; the import mechanism will process the other file correctly.
protoc --go_out=. test.proto
is all the command you need.
Original comment by r@golang.org
on 21 May 2011 at 11:29
That example should have read
protoc --go_out=. test2.proto
Original comment by r@golang.org
on 21 May 2011 at 11:30
even this is correct behavior why not just let the compiler to ignore the
imported files(like other offical compilers). when there are lots of .proto
files, what I need to do is write a script concate all of them as file name
list to protoc. with goprotobuf, it going to need a human to analyse all those
files and find out which file is being imported, then don't put that file in
the file list.
please put the job to compiler, not human.
Original comment by liuyuan...@gmail.com
on 22 May 2011 at 12:25
Original issue reported on code.google.com by
liuyuan...@gmail.com
on 20 May 2011 at 9:11Attachments: