trunk icon indicating copy to clipboard operation
trunk copied to clipboard

third_party/protobuf/upstream is broken as of tags/v3.0.0-beta-1-bzl-fix~7

Open smparkes opened this issue 9 years ago • 3 comments

Have you seen this? As of the commit in the description, this breaks bazel with a bunch of errors of the pattern

The package third_party/protobuf/upstream is not within the path google/protobuf/internal/descriptor_pool_test1_pb2.py.

This was a commit late last year and remains broken in master.

I don't know if this should be considered an error upstream in that it breaks using the repo as a "subrepo"?

Comments? Suggestions?

smparkes avatar Feb 23 '16 17:02 smparkes

The recent change in protobuf's BUILD made it impossible to use it as a submodule, instead we need to use git remote repository. I'll send out a fix soon. And patch is also welcome, :)

mzhaom avatar Feb 25 '16 00:02 mzhaom

Ah. I'm relatively new to bazel so I'm cautious about stuff that might be my error.

But given hints, I can run. :-)

git remoting is fairly straightforward.

However, I ran into a sticking point in the java stuff, in the genrule for gen_well_known_protos_java, in particular " -Isrc $(SRCS) " in the cmd. protoc wants to know the prefix of the protos but when the protobuf repo is being used remotely, src isn't the whole prefix path, it's something like external/protobuf/src and protoc gets confused.

I haven't figured out a way to grab the prefix from the environment. Any hints on that?

smparkes avatar Feb 25 '16 01:02 smparkes

https://github.com/google/protobuf/pull/1278

As long as that lands, I can create the PR to use git_repository

smparkes avatar Feb 25 '16 16:02 smparkes