-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Building a cc_test target alongside a dependent starlark target fails. #15541
Comments
/xref https://fxbug.dev/100673 |
CC: @mangini @chaselatta |
FYI, the error logs of the failure:
|
Do you know if this is a regression? (i.e. does it succeed on other versions of Bazel?) |
I tested on Bazel versions 4.0.0, 5.0.0, 5.1.0 and 5.1.1. The build was successful on version 4.0.0 but failed on all of the 5.x.x builds. |
That plus the fact that it shows up in Bazel 5 only makes me think it's another incarnation of #14294. @sdtwigg would know for certain. |
I don't see cc_test using a configuration transition (but this is the cause of conflict) @sdtwigg Can you explain why there are two configuration used here? |
I think #14294 (comment) might cover it -- the outer rule is not a test, but it depends on the cc_test -- there is a conflict because the test configuration comes into play (IIUC). |
There are two top-level targets
My comment that trybka linked at #14294 (comment) has mitigations. Note that there was some work on making cpp actions sharable; however, I do not know the progress. |
Description of the bug:
Passing in multiple targets to
bazel build
(or globbing) fails to build when the targets include acc_test
target, and a starlark-based target that has thecc_test
target specified forattr.label
.This does not occur when a
cc_binary
is used instead or when a non starlark-based target references thecc_test
(eg:alias
).What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
git clone sso://user/chandarren/cc_test_bug
).bazel build :stub_cpp && bazel build :stub_cpp2
. Observe that both builds pass.bazel build :stub_cpp :stub_cpp2
. Observe that the build fails.BUILD.bazel
to usecc_binary
instead ofcc_test
.bazel build :stub_cpp :stub_cpp2
. Observe that the build passes.The expected behavior is that step 2 should pass.
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?release 5.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: