Description
🚀 feature request
Well, sort of a feature-parity / bug report, too; see below.
Relevant Rules
bzlmod module
Description
Today, users must manually specify a toolchain and manually register it. This adds friction and causes problems for a few reasons:
- User configs are more verbose. They end up having to specify a version and toolchain to use.
- What they specify above is somewhat misleading and can lead to surprising behavior because another module can specify a different toolchain and version, and it might be used instead (it depends on the order of register_toolchain calls)
- It's just a general barrier to entry; configuring the toolchain is extra steps that get in the way to just getting started. I, myself, have put off trying out various ideas and bug fixes because setting up a MODULE with all the boiler plate is a chore.
It's also worth noting that WORKSPACE builds already register a default toolchain -- whatever is found on the local system (@bazel_tools//tools/python:autodetecting_toolchain
). This toolchain is problematic for various reasons, but that is the existing WORKSPACE-based behavior.
Describe the solution you'd like
Instead, rules_python should register a toolchain by default. This avoids the three issues above.
I propose that it register the most recent version of Python available. We should be clear that this is for convenience -- the default provided shouldn't be relied upon.
If a module needs a specific version, then it should use the multi-version rules.