-
Notifications
You must be signed in to change notification settings - Fork 4.2k
@platforms//:incompatible is not available by default in Bazel 5.0.0 #14694
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
Comments
The version of You can define it yourself in the WORKSPACE file to get the up-to-date |
I've done that as a workaround and can confirm that works. The defect is more around how the documentation should be updated to be correct or Bazel should update the version of @platforms to match the documentation. |
I agree that it should be updated, just wanted to make sure the workaround was documented. |
@katre How about this plan
I'm willing to try the backport myself so I can critique the ease of use. |
SGTM, although cutting a new 4.x for this may be tricky. We'll also need to decide if this is worth a 5.0.1 or waiting for 5.1. |
SGTM, although cutting a new 4.x for this may be tricky. We'll also need
to decide if this is worth a 5.0.1 or waiting for 5.1.
I am interested in understanding the difficulty of backporting features.
IMO, I should not have to care about 5.0.1 or 5.1. My job is to send a PR
against the 5.x track and the 5.x release manager will later decide when
they freeze and release. If 4.x is substantially more difficult than my
expectations for 5.x, then we probably have to work on making it easier.
|
@mcwilson07 are you certain that you are using the version of platforms that is bundled with bazel, and not one specified by one of your other dependencies?
|
Good point. That is probably the case, since @platforms is not part of the
bazel source base.
But regardless, I want to update Bazel's version of platforms to release
0.0.5 for other reasons.
…On Tue, Feb 8, 2022 at 12:37 AM pcjanzen ***@***.***> wrote:
@mcwilson07 <https://github.com/mcwilson07> are you certain that you are
using the version of platforms that is bundled with bazel, and not one
specified by one of your other dependencies?
@platforms//:incompatible has been available since platforms v0.0.2,
which was merged to bazel in Dec 2020, and I verified that the target does
exist in bazel v5.0.0 and v4.2.1 with a completely empty WORKSPACE.
—
Reply to this email directly, view it on GitHub
<#14694 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHHHDOFX6IV23OA3FP35TU2CTZ3ANCNFSM5NMTJO4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
I just looked into this yesterday. It is definitely being pulled in somewhere else, I haven't been able to figure out where yet but a blank WORKSPACE with just a filegroup and an incompatible target is properly skipped with this Bazel version. Sorry for the confusion here! |
Description of the problem / feature request:
The documentation for Platforms has a section on "more expressive constraints" that does not work by default in Bazel 5.0.0. The platforms code that is included with Bazel does not include the "@platforms://incompatible" target. I checked the BUILD file in external/platforms and it is missing the lines that define "incompatible" in this platforms file.
This means the documentation for using platforms is incomplete because there is a way to change the underlying platforms version or incorrect because the feature is not available.
Feature requests: what underlying problem are you trying to solve with this feature?
Use the "more expressive constraints" as documented in the Platforms documentation.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Add the following constraing to any target in a BUILD file.
target_compatible_with = ["@platforms//:incompatible"],
and you will get an error similar to the following error:
What operating system are you running Bazel on?
Windows, Linux and Mac
What's the output of
bazel info release
?release 5.0.0
Have you found anything relevant by searching the web?
A few references to the documentation that does not work out of the box.
The text was updated successfully, but these errors were encountered: