[
https://issues.apache.org/jira/browse/BUILDR-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865258#comment-15865258
]
Antoine Toulme commented on BUILDR-563:
---------------------------------------
Fixed with commit 06df968d8ef3cfcae79195108db7d5457fed7c10. Thanks!
> 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
> Assignee: Antoine Toulme
> Priority: Trivial
> Fix For: 1.5.1
>
>
> 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 was sent by Atlassian JIRA
(v6.3.15#6346)