-
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
Provide ability to directly select() on constraint_value #8583
Comments
@katre I tried mocking up an implementation of this since it's conceptually at least easy (and Some challenges that arose that I appreciate your perspective on:
|
|
Promising, thanks! I'll try to whip this up into a proper PR in my spare time. |
CC @jayconrod who wanted this too :) |
Welp, I successfully prototyped this. Went down a different path than above. I put the platform-retrieving logic in the target that owns the I'm interested to explore this in review. |
No more need for a redundant config_setting. See bazelbuild#8583 for an example. This was a bit subtle. constraint_value can't directly export a ConfigMatchingProvider because it needs to know the platform to determine if it's a match. But platforms are built out of constraint_values, so the platform isn't available yet. So the parent target with the select() provides this detail. Also beautifies "invalid select() key" errors in support of bazelbuild#11984. Fixes bazelbuild#8583. RELNOTES[NEW]: select() directly supports constraint_value (no need for an intermediate config_setting). PiperOrigin-RevId: 327885099 Change-Id: Ifbdfa275ff83f0cb30207a5bd77aca317599fc21
Description of the problem / feature request:
A common and annoyingly redundant pattern is:
It would be nice to be able to just write:
Feature requests: what underlying problem are you trying to solve with this feature?
Unnecessary bloat for situations where
config_setting
is just abstraction overhead.Have you found anything relevant by searching the web?
Examples:
Also see #7668 and bazelbuild/bazel-skylib#89 (comment).
The text was updated successfully, but these errors were encountered: