-
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
Bazel crash when target_compatible_with
doesn't have a default entry.
#18021
Comments
The question is: is this an error (and users should add the default condition), or do we treat a missing default as "incompatible y default"? Paging @gregestren and @philsc for their input |
Sideline opinion: I would find it weird if non-matching selects are an error in certain cases but not in others. I don't expect users to be aware of the fact that it's really the rule (or even the attribute) that determines the exact semantics of +1 for failing with a descriptive error message. |
I agree with @fmeum . I don't think having Users should specify a default condition. Sorry about the crash. I'm assuming this is a side effect of my refactor in #14096. If I get my other stuff done, I can take a look at fixing it later this week. |
Agreed. Thanks @philsc . |
Thanks! The problem stems from the call to I am most of the way through tunneling the error back out, I'll see if I can clean that up and send a review. The biggest problem isn't in |
This causes errors with configurable `target_compatible_with` to be reported as errors, rather than causing a Bazel crash. Fixes bazelbuild#18021.
Does this apply to 6.x as well, and if so can we cherry-pick it? |
Vesion matrix:
We can try to cherrypick it, I'm not sure it'll apply cleanly, but we should give it a go. @bazel-io flag |
This causes errors with configurable `target_compatible_with` to be reported as errors, rather than causing a Bazel crash. Fixes bazelbuild#18021. Closes bazelbuild#18027. PiperOrigin-RevId: 523976899 Change-Id: I2602aa3d4febc4c486d610e19c3a61632b0519b5
@bazel-io fork 6.2.0 |
Hi @katre I tried cherry picking this but ran into some issues. It seems like another commit likely needs to be included too? |
There are too many changes due to splitting out |
This causes errors with configurable `target_compatible_with` to be reported as errors, rather than causing a Bazel crash. Fixes bazelbuild#18021. (This is functionally the same change as ebfb529, but applied to the release-6.2.0 branch)
This causes errors with configurable `target_compatible_with` to be reported as errors, rather than causing a Bazel crash. Fixes bazelbuild#18021. (This is functionally the same change as ebfb529, but applied to the release-6.2.0 branch)
See #18135 |
This causes errors with configurable `target_compatible_with` to be reported as errors, rather than causing a Bazel crash. Fixes bazelbuild#18021. (This is functionally the same change as ebfb529, but applied to the release-6.2.0 branch)
This causes errors with configurable `target_compatible_with` to be reported as errors, rather than causing a Bazel crash. Fixes bazelbuild#18021. Closes bazelbuild#18027. PiperOrigin-RevId: 523976899 Change-Id: I2602aa3d4febc4c486d610e19c3a61632b0519b5
Description of the bug:
When the
target_compatible_with
attribute is a select, and the select has no match for the current configuration, bazel crashes because theIncompatibleTargetChecker
does not handle theConfiguredAttributeMapper.ValidationException
.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See katre@63939e2 for a change to
target_compatible_with_test.sh
that shows the error.Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?release 6.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
?No response
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: