-
-
Notifications
You must be signed in to change notification settings - Fork 287
Closed
Description
I have encountered an interesting issue that reproduces in Bazel 0.27.0 and later versions when dependency tree is a bit more complex.
Consider such set-up:
- There are two repositories:
repo_oneandrepo_two-- links point to actual repositories where this issue reproduces. two:protoinrepo_twodepends onone:protoinrepo_oneone:protoinrepo_onedepends onthree:protoinrepo_two- Apparently, it is important that
one:protomust be at certain level withinrepo_two. In this test it is undermodule/submodule/one/src/main/proto/
In repo_two when running bazel build --sandbox_debug //... two problems occur:
//three/_virtual_imports/proto/three.protogets copied (all Bazel versions after and including 0.27.0) -- repository gets polluted.- Build fails because several copies of
three.protogets passed to theprotocat the same time. Reproduced mostly on 0.28.1, but it seems to be not 100% consistent. Last arguments forprotoclook like this:
bazel-out/darwin-fastbuild/bin/three/_virtual_imports/proto/_virtual_imports/proto/_virtual_imports/proto/three.proto
bazel-out/darwin-fastbuild/bin/three/_virtual_imports/proto/_virtual_imports/proto/three.proto
bazel-out/darwin-fastbuild/bin/three/_virtual_imports/proto/three.proto
I suspect that ScalaPBGenerator.setupIncludedProto is not completely correct way to go. Why is it necessary to copy proto files someplace?.. It seems like the working directory has changed in 0.27.0, which caused the copies to go into the working copy of the repository.
Metadata
Metadata
Assignees
Labels
No labels