-
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 CI] Error with Label '@@platforms//host:extension.bzl' is invalid because 'host' is not a package #21877
Comments
They need to depend on the newer |
This is an unfortunate issue only with WORKSPACE -- Bazel itself already ships with the latest |
This also means that 74c8ca4 is not cherry-pickable back to 7.2.0. Hmm... I might need to come up with some halfway solution here. |
Could we just keep the default value of |
Changing the flag default based on another flag sounds pretty error-prone. But I think I can safely change what
This part is unnecessary; it's done in the WORKSPACE suffix. In fact it's what's causing the current breakage...
I mostly wanted to deprecate the native repo rule. I guess that's still doable, we just need to ship a copy of |
… platform repo rule #21877 happened because, even though we define `@platforms` to be the bundled version shipped with Bazel (which is 0.0.9 on HEAD), people tend to define their own versions of `@platforms` in WORKSPACE. If this ends up being a lower version (very likely), the subsequent `load` to use the `host_platform_repo` repo rule (which is a Starlark version of `local_config_platform`) will fail because that repo rule was only introduced in `platforms` version 0.0.9. To solve this conundrum, we define a new repo `@internal_platforms_do_not_use` that _also_ points to the bundled version of `@platforms`. Nobody is likely to define this repo, so we can fairly reliably get the Starlark repo rule, and also still allow people to override the actual `@platforms` targets they use. Work towards #18285. Fixes #21877.
… platform repo rule bazelbuild#21877 happened because, even though we define `@platforms` to be the bundled version shipped with Bazel (which is 0.0.9 on HEAD), people tend to define their own versions of `@platforms` in WORKSPACE. If this ends up being a lower version (very likely), the subsequent `load` to use the `host_platform_repo` repo rule (which is a Starlark version of `local_config_platform`) will fail because that repo rule was only introduced in `platforms` version 0.0.9. To resolve this conundrum, we define a new repo `@internal_platforms_do_not_use` that _also_ points to the bundled version of `@platforms`. Nobody is likely to define this repo, so we can fairly reliably get the Starlark repo rule, and also still allow people to override the actual `@platforms` targets they use. This only affects WORKSPACE users; if `--enable_bzlmod` is set, the `@host_platform` seen by `@bazel_tools` will come from the module extension instead. Work towards bazelbuild#18285. Fixes bazelbuild#21877. Closes bazelbuild#21902. PiperOrigin-RevId: 622238362 Change-Id: I6335ab1bc26ba9ef54473d8a21fc5a8510a3ace5
Downstream projects are still failing: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3783 |
The problem is that We could reexport the constraints from the fake platforms repo instead when using WORKSPACE only. Maybe we also need to do this for the |
Looks like there are still platforms related failures in https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3797 |
Oh, the fix was just submitted one hour ago, let's wait for another day. |
Still not fixed... https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3801#018ef488-87d2-4d8d-ac56-65762421b4a0 Looks like this still fails when Stardoc and/or android_sdk_repository are involved. Will take a look. |
I've sent a change internally to fix the Regarding Stardoc, there honestly isn't a good fix... We can upgrade |
|
We specifically didn't want to introduce a dependency on skylib from |
Oh, I meant making the change of moving |
ah, I see -- yes, that's the plan. |
See also bazelbuild/bazel-skylib#495 which would serve as a stop-gap in the meantime. |
Nice! /cc @comius |
Isn't that difficult to pull off since |
I think this is also the concern Ivo raised to me. I don't have great answers, maybe we can backport the bzl_library to bazel_tools change in older Bazel LTS releases to make it easier for users to adapt? So basically, users have to migrate to the latest minor Bazel releases to use the latest bazel_skylib, which should be easy theoretically. |
Fixes the Stardoc part of bazelbuild/bazel#21877.
Fixes the Stardoc part of bazelbuild/bazel#21877.
Also updates to latest Stardoc version. Addresses the rules_dotnet part of bazelbuild/bazel#21877.
Fixes the Stardoc part of bazelbuild/bazel#21877.
… platform repo rule #21877 happened because, even though we define `@platforms` to be the bundled version shipped with Bazel (which is 0.0.9 on HEAD), people tend to define their own versions of `@platforms` in WORKSPACE. If this ends up being a lower version (very likely), the subsequent `load` to use the `host_platform_repo` repo rule (which is a Starlark version of `local_config_platform`) will fail because that repo rule was only introduced in `platforms` version 0.0.9. To resolve this conundrum, we define a new repo `@internal_platforms_do_not_use` that _also_ points to the bundled version of `@platforms`. Nobody is likely to define this repo, so we can fairly reliably get the Starlark repo rule, and also still allow people to override the actual `@platforms` targets they use. This only affects WORKSPACE users; if `--enable_bzlmod` is set, the `@host_platform` seen by `@bazel_tools` will come from the module extension instead. Work towards #18285. Fixes #21877. Closes #21902. PiperOrigin-RevId: 622238362 Change-Id: I6335ab1bc26ba9ef54473d8a21fc5a8510a3ace5
Similar to 77469e0, we redirect the redirects/aliases generated by `local_config_plaform` to the bundled platforms repo (`@internal_platforms_do_not_use`) if Bzlmod is not enabled. Same for the `@bazel_tools//tools:host_platform` alias. Fixes #21877. Closes #22021. PiperOrigin-RevId: 625613724 Change-Id: I17940e5d4fbd8a7690d9199f80b80ceb62b53d1a
The native repo rule `android_sdk_repository` used to load from `@local_config_platform//:constraints.bzl`; 74c8ca4 changed it to load from `@platforms//host:constraints.bzl`. This caused failures with WORKSPACE users, as `@platforms` might still refer to an old version of `platforms` which doesn't have the `host` package, even though `@local_config_platform` knows to redirect to the bundled, newer version of `platforms`. This CL reverts that change, so `android_sdk_repository` now loads from `@local_config_platform` again. This is fine because both are native repo rules and will be deprecated at the same time. Partially fixes #21877. PiperOrigin-RevId: 627395814 Change-Id: I5761cde3c86190d6da3e3933aa1bef18e0dcca3e
Also updates to latest Stardoc version. Addresses the rules_dotnet part of bazelbuild/bazel#21877.
All green now! |
… platform repo rule #21877 happened because, even though we define `@platforms` to be the bundled version shipped with Bazel (which is 0.0.9 on HEAD), people tend to define their own versions of `@platforms` in WORKSPACE. If this ends up being a lower version (very likely), the subsequent `load` to use the `host_platform_repo` repo rule (which is a Starlark version of `local_config_platform`) will fail because that repo rule was only introduced in `platforms` version 0.0.9. To resolve this conundrum, we define a new repo `@internal_platforms_do_not_use` that _also_ points to the bundled version of `@platforms`. Nobody is likely to define this repo, so we can fairly reliably get the Starlark repo rule, and also still allow people to override the actual `@platforms` targets they use. This only affects WORKSPACE users; if `--enable_bzlmod` is set, the `@host_platform` seen by `@bazel_tools` will come from the module extension instead. Work towards #18285. Fixes #21877. Closes #21902. PiperOrigin-RevId: 622238362 Change-Id: I6335ab1bc26ba9ef54473d8a21fc5a8510a3ace5
Similar to 77469e0, we redirect the redirects/aliases generated by `local_config_plaform` to the bundled platforms repo (`@internal_platforms_do_not_use`) if Bzlmod is not enabled. Same for the `@bazel_tools//tools:host_platform` alias. Fixes #21877. Closes #22021. PiperOrigin-RevId: 625613724 Change-Id: I17940e5d4fbd8a7690d9199f80b80ceb62b53d1a
The native repo rule `android_sdk_repository` used to load from `@local_config_platform//:constraints.bzl`; 74c8ca4 changed it to load from `@platforms//host:constraints.bzl`. This caused failures with WORKSPACE users, as `@platforms` might still refer to an old version of `platforms` which doesn't have the `host` package, even though `@local_config_platform` knows to redirect to the bundled, newer version of `platforms`. This CL reverts that change, so `android_sdk_repository` now loads from `@local_config_platform` again. This is fine because both are native repo rules and will be deprecated at the same time. Partially fixes #21877. PiperOrigin-RevId: 627395814 Change-Id: I5761cde3c86190d6da3e3933aa1bef18e0dcca3e
… platform repo rule #21877 happened because, even though we define `@platforms` to be the bundled version shipped with Bazel (which is 0.0.9 on HEAD), people tend to define their own versions of `@platforms` in WORKSPACE. If this ends up being a lower version (very likely), the subsequent `load` to use the `host_platform_repo` repo rule (which is a Starlark version of `local_config_platform`) will fail because that repo rule was only introduced in `platforms` version 0.0.9. To resolve this conundrum, we define a new repo `@internal_platforms_do_not_use` that _also_ points to the bundled version of `@platforms`. Nobody is likely to define this repo, so we can fairly reliably get the Starlark repo rule, and also still allow people to override the actual `@platforms` targets they use. This only affects WORKSPACE users; if `--enable_bzlmod` is set, the `@host_platform` seen by `@bazel_tools` will come from the module extension instead. Work towards #18285. Fixes #21877. Closes #21902. PiperOrigin-RevId: 622238362 Change-Id: I6335ab1bc26ba9ef54473d8a21fc5a8510a3ace5
Similar to 77469e0, we redirect the redirects/aliases generated by `local_config_plaform` to the bundled platforms repo (`@internal_platforms_do_not_use`) if Bzlmod is not enabled. Same for the `@bazel_tools//tools:host_platform` alias. Fixes #21877. Closes #22021. PiperOrigin-RevId: 625613724 Change-Id: I17940e5d4fbd8a7690d9199f80b80ceb62b53d1a
The native repo rule `android_sdk_repository` used to load from `@local_config_platform//:constraints.bzl`; 74c8ca4 changed it to load from `@platforms//host:constraints.bzl`. This caused failures with WORKSPACE users, as `@platforms` might still refer to an old version of `platforms` which doesn't have the `host` package, even though `@local_config_platform` knows to redirect to the bundled, newer version of `platforms`. This CL reverts that change, so `android_sdk_repository` now loads from `@local_config_platform` again. This is fine because both are native repo rules and will be deprecated at the same time. Partially fixes #21877. PiperOrigin-RevId: 627395814 Change-Id: I5761cde3c86190d6da3e3933aa1bef18e0dcca3e
… platform repo rule bazelbuild#21877 happened because, even though we define `@platforms` to be the bundled version shipped with Bazel (which is 0.0.9 on HEAD), people tend to define their own versions of `@platforms` in WORKSPACE. If this ends up being a lower version (very likely), the subsequent `load` to use the `host_platform_repo` repo rule (which is a Starlark version of `local_config_platform`) will fail because that repo rule was only introduced in `platforms` version 0.0.9. To resolve this conundrum, we define a new repo `@internal_platforms_do_not_use` that _also_ points to the bundled version of `@platforms`. Nobody is likely to define this repo, so we can fairly reliably get the Starlark repo rule, and also still allow people to override the actual `@platforms` targets they use. This only affects WORKSPACE users; if `--enable_bzlmod` is set, the `@host_platform` seen by `@bazel_tools` will come from the module extension instead. Work towards bazelbuild#18285. Fixes bazelbuild#21877. Closes bazelbuild#21902. PiperOrigin-RevId: 622238362 Change-Id: I6335ab1bc26ba9ef54473d8a21fc5a8510a3ace5
Similar to 77469e0, we redirect the redirects/aliases generated by `local_config_plaform` to the bundled platforms repo (`@internal_platforms_do_not_use`) if Bzlmod is not enabled. Same for the `@bazel_tools//tools:host_platform` alias. Fixes bazelbuild#21877. Closes bazelbuild#22021. PiperOrigin-RevId: 625613724 Change-Id: I17940e5d4fbd8a7690d9199f80b80ceb62b53d1a
The native repo rule `android_sdk_repository` used to load from `@local_config_platform//:constraints.bzl`; bazelbuild@74c8ca4 changed it to load from `@platforms//host:constraints.bzl`. This caused failures with WORKSPACE users, as `@platforms` might still refer to an old version of `platforms` which doesn't have the `host` package, even though `@local_config_platform` knows to redirect to the bundled, newer version of `platforms`. This CL reverts that change, so `android_sdk_repository` now loads from `@local_config_platform` again. This is fine because both are native repo rules and will be deprecated at the same time. Partially fixes bazelbuild#21877. PiperOrigin-RevId: 627395814 Change-Id: I5761cde3c86190d6da3e3933aa1bef18e0dcca3e
CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3769
Platform: Ubuntu, MacOs, Windows
Logs:
Culprit: 74c8ca4
CC Greenteam @fweikert @meteorcloudy @Wyverald
Few downstream projects are failing with below error
The text was updated successfully, but these errors were encountered: