Skip to content

Commit 809aa13

Browse files
committed
fix(bzlmod): ensure that config_settings are generated for all available versions
I think that bazel-contrib#2253 has introduced an issue that went unnoticed because we did not have an integration test checking this. The main issue is that config settings of `is_python_3.x.y` were being generated only for registered toolchains and that is not necessarily the desired behaviour -- we may want to use the config settings for more values, so coupling that was a mistake.
1 parent 1c81de3 commit 809aa13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/private/python.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ def _python_impl(module_ctx):
241241
# Last toolchain is default
242242
default_python_version = py.default_python_version,
243243
minor_mapping = py.config.minor_mapping,
244+
python_versions = list(py.config.default["tool_versions"].keys()),
244245
toolchain_prefixes = [
245246
render.toolchain_prefix(index, toolchain.name, _TOOLCHAIN_INDEX_PAD_LENGTH)
246247
for index, toolchain in enumerate(py.toolchains)

0 commit comments

Comments
 (0)