protobuf addon including source directories to protoc breaks build
------------------------------------------------------------------
Key: BUILDR-563
URL: https://issues.apache.org/jira/browse/BUILDR-563
Project: Buildr
Issue Type: Bug
Reporter: Robin Palotai
Priority: Trivial
In "addon/buildr/protobuf.rb", the following line:
(paths_from_sources(*args) + options[:include]).each { |i| command_line <<
"-I#{i}" }
Incorrectly puts "/a/b" on the include path for any input file
"/a/b/xyz.proto". This is bad, the user should support the _root_ include
path(s) if they wish to, and not any paths below it. The current scheme breaks
compilation of proto files organised under an "a.b" package hierarchy.
Excerpts from the message
http://www.mail-archive.com/[email protected]/msg04129.html
'when you pass "../P/a.proto" on the command line, protoc concludes that
because "../P" is in the import path, this file's canonical name is "a.proto"
[...] In general, you should never pass overlapping -I flags to protoc.'
Fix:
Delete including the source directories, change the line to
(options[:include]).each { |i| command_line << "-I#{i}" }
and include the instruction to use the include path to the documentation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.