| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request focuses on the deprecation and removal of legacy WORKSPACE support in favor of bzlmod for PyPI dependency management. It includes the deletion of several WORKSPACE files across examples, updates to documentation to reflect the shift, and the removal of WORKSPACE-specific logic and symbols from the core build rules. Additionally, the PR applies minor formatting improvements to various Python scripts throughout the repository. I have no feedback to provide.
Sorry, something went wrong.
| baz import ( | ||
| baz | ||
| ) | ||
| from foo.bar.baz import baz |
There was a problem hiding this comment.
Looks like autoformatting snuck in.
Either wrap in # fmt: off # fmt: on comments, or tell formatter to ignore this file. This one is intentionally asserting some python AST parsing.
Sorry, something went wrong.
The test relies on config.add_transition_setting() for cross-repo transition labels, which doesn't work on Bazel 7 due to inconsistent label string formatting between module extension tags and apply_config_settings_attr(). Bazel 8 fixed this by switching all label strings to double-at (@@) canonical form. References: bazelbuild/bazel#11128
|
The toolchain_target_settings_test fails on Bazel 7.7.0 because the config.add_transition_setting + apply_config_settings_attr interaction relies on label string formatting that is inconsistent across Bazel versions. Root cause: Bazel 8.0 release notes state:
The flow:
On Bazel 7, str(Label(...)) produces single-@ labels (e.g. @//:family), but str(tag.setting) for attr.label in a module extension tag can produce a different form (e.g. @module_under_test//:family). This mismatch means the transition output key does not match any input key -> the family flag stays at its default ("prebuilt") -> the is_prebuilt config_setting matches -> the gated default toolchain resolves -> the build succeeds when it should fail. Bazel 8 fixed this with the @@ canonicalization change, making label strings consistent across all APIs. This is tracked by the umbrella issue bazelbuild/bazel#11128 "Support workspace label prefixes in Starlark config and platform APIs", which encompassed related sub-issues (#9065, #10152, #10499, #10927). Fix: Restrict toolchain_target_settings_test to bazel_versions = ["8.5.1", "9.1.0"] where cross-repo transition labels resolve consistently. |
Sorry, something went wrong.
|
Sorry for the LLM analysis, but I was a little baffled why this started failing now. The rest has been crafted with Artisanal Intelligence. |
Sorry, something went wrong.
Is there such a case today? Or a dependency we want to use, but it's bzlmod only so using it is tough. I would find that very compelling. Because Bazel 8 supports workspace, and Bazel 8 is in support until Dec 2027, support for workspace is still technically around for another 1.5 years. But yeah, the oldest bazel version supports bzlmod now. And AFAIK, Bazel 7 bzlmod is decent; decent enough one can use bzlmod with Bazel 7.
Eh, mild preference for 3.0 because we aren't being forced to drop support due to a dependency. I'm fine either way, though.
I asked the protobuf people what plans they have. If they respond back, I'll post back. |
Sorry, something went wrong.
|
If we agree that this is a 3.0 change, then let's look at the other things we should do for 3.0 and do it at once. I am OK with it being a 3.0 thing. |
Sorry, something went wrong.
|
In talking with the protobuf people, they were somewhat alarmed that rules_jvm_external and the others mentioned in the slack thread had dropped workspace support already. Protobuf said they plan to drop workspace Q1 2027, so basically just after Bazel 7 is out of support (but before bazel 8 is out of support). |
Sorry, something went wrong.
Let's see how it plays out. I don't want to drop WORKSPACE just to make our lives more painful and force users to not be able to update to 2.1 and above. |
Sorry, something went wrong.
|
+1 to holding off until at least the protobuf team drops WORKSPACE support, if not until Bazel 8 is out of support. Even though I'd love to have it gone, haha. +1 to dropping WORKSPACE being a 3.0 change. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
All of the bazel versions that we support support bzlmod and the support for
WORKSPACE is being dropped in other rulesets as well. At some point new
versions of our dependencies will make it more and more difficult to carry
support for both, so in order to make the codebase easier to maintain, let's
drop the support.
Regarding whether we should call the next version 2.1 or 3.0, I am not sure.
For bzlmod users nothing is changing, so Semver is respected, whereas for
WORKSPACE users, rules_python cannot be used anymore, it's as if 2.1 no
longer exists for WORKSPACE users, so I think it is fine to call the release
2.1.
Summary:
NOTE: this may need to wait until we discuss out what we are doing with our downstream users:
Work towards #2950