-
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
Investigate whether filegroup can use platform-conditional selects #12899
Comments
To clarify, we have a test for this specific behavior: https://cs.opensource.google/bazel/bazel/+/master:src/test/java/com/google/devtools/build/lib/analysis/ConfigurableAttributesTest.java;l=1232 |
resolution. Part of work on bazelbuild#12899.
resolution. Part of work on bazelbuild#12899.
…toolchain resolution. Part of work on bazelbuild#12899.
Before advancing, what do you think of my question in #12071 (comment)? Could it be How would that compare to opting That's really interesting about the test. Was that intentional? |
I made the change and ran tests (see #12901). All the failures, including ConditionalAttributesTest, were just using To reply to your comment: I think it does make sense that even without toolchain resolution, configured targets always have a target platform. This shouldn't be a major change to how things happen now, and I can file a (low-priority) issue to investigate further. As far as changing |
Re-opening because I undid this in #13194. I need to add a test and figure out the right solution for the issue of split internal/external filegroup implementations. |
This reverts dce861d, which was a mistake. It also removes a test which is now useless. There are no more build rules (which have the target_compatible_with attribute for target skipping) which also have toolchain resolution disabled, so this cannot be tested for. Fixes bazelbuild#12899 and undoes bazelbuild#13194.
This implements approach bazelbuild#4 of bazelbuild#13047 (comment). The basic change adds a new toolchain resolution mode: "resolve iff the target has a select()". It then sets alias() to that mode. We could remove this special casing if we ever ubiquitously provide platfrom info to *all* rules (bazelbuild#12899 (comment)). RELNOTES: alias() can now select() directly on constraint_value() Fixes bazelbuild#13047. PiperOrigin-RevId: 411684872 Change-Id: I998ef9bba3226871651fc14bd9ed268e9a3de82c
This implements approach #4 of #13047 (comment). The basic change adds a new toolchain resolution mode: "resolve iff the target has a select()". It then sets alias() to that mode. We could remove this special casing if we ever ubiquitously provide platform info to *all* rules (#12899 (comment)). RELNOTES: alias() can now select() directly on constraint_value() Fixes #13047. Closes #14310. PiperOrigin-RevId: 411868223
This implements approach bazelbuild#4 of bazelbuild#13047 (comment). The basic change adds a new toolchain resolution mode: "resolve iff the target has a select()". It then sets alias() to that mode. We could remove this special casing if we ever ubiquitously provide platform info to *all* rules (bazelbuild#12899 (comment)). RELNOTES: alias() can now select() directly on constraint_value() Fixes bazelbuild#13047. Closes bazelbuild#14310. PiperOrigin-RevId: 411868223
This implements approach bazelbuild#4 of bazelbuild#13047 (comment). The basic change adds a new toolchain resolution mode: "resolve iff the target has a select()". It then sets alias() to that mode. We could remove this special casing if we ever ubiquitously provide platform info to *all* rules (bazelbuild#12899 (comment)). RELNOTES: alias() can now select() directly on constraint_value() Fixes bazelbuild#13047. Closes bazelbuild#14310. PiperOrigin-RevId: 411868223 (cherry picked from commit 1c3a245)
This implements approach #4 of #13047 (comment). The basic change adds a new toolchain resolution mode: "resolve iff the target has a select()". It then sets alias() to that mode. We could remove this special casing if we ever ubiquitously provide platform info to *all* rules (#12899 (comment)). RELNOTES: alias() can now select() directly on constraint_value() Fixes #13047. Closes #14310. PiperOrigin-RevId: 411868223 (cherry picked from commit 1c3a245) Co-authored-by: Greg Estren <gregestren@gmail.com>
Branched from #12071:
Currently, the
filegroup
rule doesn't participate in toolchain resolution (see https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/rules/common/BazelFilegroupRule.java;l=78), which means the target platform doesn't exist and so platform-conditional selects don't work.As I recall, it led to a cycle in evaluation, because filegroups were needed at a low-enough level that we couldn't process loading platforms without them.
I'll investigate whether this is still an issue and whether this can be re-enabled.
The text was updated successfully, but these errors were encountered: