-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
nogo rule causes ambiguous bazel-bin, bazel-testlogs directories in Bazel 6.0.0 #3409
nogo rule causes ambiguous bazel-bin, bazel-testlogs directories in Bazel 6.0.0 #3409
Comments
The way in which top-level symlinks are created changed in bazelbuild/bazel@6452024. Since the I have a fix that I will submit shortly. |
@fmeum This is also an issue with |
@vihangm The situation for them is different: You can always add the |
@fmeum That sounds reasonable. Adding the I guess my expectation was that |
Since bazel 6, we have been getting the warning "WARNING: cleared convenience symlink(s) bazel-bin, bazel-testlogs because their destinations would be ambiguous" on wildcard builds (bazel build //...). This commit upgrades rules_go (and updates its dependencies accordingly) to fix bazel-contrib/rules_go#3409 and marks all image targets as manual, because image targets also cause this ambiguity. This fixes said warning and restores the convenience symlinks.
What version of rules_go are you using?
v0.37.0
What version of gazelle are you using?
None
What version of Bazel are you using?
6.0.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Any other potentially useful information about your toolchain?
What did you do?
Please see the below for a minimally reproducible example.
.bazelversion
:WORKSPACE
:BUILD
:Invocation:
What did you expect to see?
bazel-bin
symlink is valid and created.What did you see instead?
bazel-bin
is not created due to ambiguous destinations:Note that:
nogo
target inBUILD
, and removing thenogo
parameter ingo_register_toolchains
, causes the symlink to be created correctlyThe warning is sourced from here: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/buildtool/OutputDirectoryLinksUtils.java#L172
To debug, I compiled a version of Bazel with additional debug logging, and found that the two candidate paths for
bazel-bin
are:When I remove
nogo
, there is only one candidate path forbazel-bin
, as expected.The text was updated successfully, but these errors were encountered: