bazelbuild / bazelbuild/platforms
Example WORKSPACE override without MODULE.bazel
- Dominant language
- Starlark
- Stars
- 124
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
For Bazel 7.4.0, I've found that putting the suggested `http_archive` call at the beginning or end of a 'WORKSPACE' file doesn't have any effect - the default Bazel `@platforms` is not overridden.
With this placed in 'WORKSPACE', attempting to build with a repository that references versions of platforms later than what was bundled with Bazel 7.4.0 yields an error as follows.
```
ERROR: /private/var/tmp/_bazel_james/a44fae3b01e4e9e5bdb196f0b360847f/external/platforms/os/BUILD: no such target '@@platforms//os:uefi': target 'uefi' not declared in package 'os' defined by /private/var/tmp/_bazel_james/a44fae3b01e4e9e5bdb196f0b360847f/external/platforms/os/BUILD
```
I believe https://github.com/bazelbuild/rules_rust/pull/2142#issuecomment-2613018842 was experiencing the same issue, as the given solution of placing `bazel_dep(name = "platforms", version = "0.0.11")` or similar in 'MODULE.bazel' works.
Is it possible to override the default `@platforms` without 'MODULE.bazel'? If so, could an example be given as to how this is done?
Contributor guide
Assessment
This issue has not been assessed yet.