chore!: drop WORKSPACE support from rules_python#3780
Conversation
There was a problem hiding this comment.
Code Review
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.
| 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.
212be82 to
8b18663
Compare
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 Root cause: Bazel 8.0 release notes state:
The flow:
On Bazel 7, Bazel 8 fixed this with the Fix: Restrict |
|
Sorry for the LLM analysis, but I was a little baffled why this started failing now. The rest has been crafted with Artisanal Intelligence. |
All of the bazel versions that we support support
bzlmodand the support forWORKSPACEis being dropped in other rulesets as well. At some point newversions 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
bzlmodusers nothing is changing, so Semver is respected, whereas forWORKSPACEusers,rules_pythoncannot be used anymore, it's as if 2.1 nolonger exists for
WORKSPACEusers, so I think it is fine to call the release2.1.
Summary:
NOTE: this may need to wait until we discuss out what we are doing with our downstream users:
Work towards #2950