-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repository gets polluted with _virtual_imports #843
Comments
@lberki, @ittaiz suggested you might have some insights. |
Imports have been a bit of a pain in bazel. I believe Something did change in 0.27, but i believe 0.29 or the 1.0 rc probably are the spots with the right new sets of code to maybe fix this all in a nice manner. I haven't had a chance to look at it more though. if you remove the copying tests in the repo here should fail |
The main difference seems to be the working directory. In 0.26.1 it is under
Since
|
Another interesting thing I noticed is that the list of identical |
@ignasl if you remove the copying and run this repo's build with bazel 29.1 do the tests pass? do the e2e tests pass (you need to run |
@lberki if you can shed some light on this we'd be really grateful |
When I run the |
ok. So right now we are blocked? (assuming we want new bazel version and to use the aspect based proto) |
Indeed we are -- either someone helps us with this one or we fix it ourselves. I am looking for solutions as well. |
This could be caused by bazelbuild/bazel#9215. I'll look into it. |
Why is it not correct to convert all paths to absolute and thus avoid copying? |
@ignasl the problem is the paths need to get presented to protoc in a means it'll be happy with/can handle the imports for other protos. You can do a |
Thank you. I will try it out. |
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:
repo_one
andrepo_two
-- links point to actual repositories where this issue reproduces.two:proto
inrepo_two
depends onone:proto
inrepo_one
one:proto
inrepo_one
depends onthree:proto
inrepo_two
one:proto
must be at certain level withinrepo_two
. In this test it is undermodule/submodule/one/src/main/proto/
In
repo_two
when runningbazel build --sandbox_debug //...
two problems occur://three/_virtual_imports/proto/three.proto
gets copied (all Bazel versions after and including 0.27.0) -- repository gets polluted.three.proto
gets passed to theprotoc
at the same time. Reproduced mostly on 0.28.1, but it seems to be not 100% consistent. Last arguments forprotoc
look like this:I suspect that
ScalaPBGenerator.setupIncludedProto
is not completely correct way to go. Why is it necessary to copyproto
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.The text was updated successfully, but these errors were encountered: