On Fri, Aug 11, 2017 at 1:41 PM, 'Jungho Ahn' via Protocol Buffers <
protobuf@googlegroups.com> wrote:

> Hello,
>
> I'm trying to import protos from a third party repo, but they don't have
> proper canonical names.
>
> For example, there is a repo X which has
>
> a/p1.proto
> a/p2.proto with (import "a/p1.proto")
>
>
> Since 'a' is too generic, I'd like to add a kind of prefix to the
> canonical names like "external/a/p1.proto", "external/a/p2.proto" to avoid
> conflicts with existing protos.
> But I'm not sure whether this possible since a/p2.proto imports p1.proto
> as "a/p1.proto" already.
>
> Is there any workaround for this?
>
Unfortunately there isn't a workaround here. Basically "a/p1.proto" becomes
the canonical name of that proto file and it can't be changed unless you
can update all references of that import path. If repo X only provides the
.proto files but not the generated code in their library, you can just
update all the import paths in their protos. However, if generated code is
part of X library, there isn't much you can do other than asking owners of
X library to use a better path for their protos.


>
> Thanks,
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to