Skip to content

No MUSL platform in the build dict inside get_release_info(..) function #3286

@ybaturina

Description

@ybaturina

🐞 bug report

Affected Rule

The issue is caused by the function:

get_release_info

Is this a regression?

Yes, the previous version in which this bug was not present was: 0.39.0

Description

The issue is caused by these lines:

build = "{}+{}-full".format(
                FREETHREADED.lstrip("-"),
                {
                    "aarch64-apple-darwin": "pgo+lto",
                    "aarch64-pc-windows-msvc": "pgo",
                    "aarch64-unknown-linux-gnu": "lto" if release_id < 20250702 else "pgo+lto",
                    "ppc64le-unknown-linux-gnu": "lto",
                    "riscv64-unknown-linux-gnu": "lto",
                    "s390x-unknown-linux-gnu": "lto",
                    "x86_64-apple-darwin": "pgo+lto",
                    "x86_64-pc-windows-msvc": "pgo",
                    "x86_64-unknown-linux-gnu": "pgo+lto",
                }[p],
            )

There is no key for MUSL platform.

🔥 Exception or Error

Example:

=====================================
ERROR: Traceback (most recent call last):
        File "/home/ybaturina/jax/WORKSPACE", line 76, column 23, in <toplevel>
                python_init_toolchains()
        File "/home/ybaturina/.cache/bazel/_bazel_ybaturina/ead9107e8e47a1c42911a02736d63d03/external/xla/third_party/py/python_init_toolchains.bzl", line 52, column 35, in python_init_toolchains
                python_register_toolchains(
        File "/home/ybaturina/.cache/bazel/_bazel_ybaturina/ead9107e8e47a1c42911a02736d63d03/external/rules_python/python/private/python_register_toolchains.bzl", line 127, column 88, in python_register_toolchains
                (release_filename, urls, strip_prefix, patches, patch_strip) = get_release_info(platform, python_version, base_url, tool_versions)
        File "/home/ybaturina/.cache/bazel/_bazel_ybaturina/ead9107e8e47a1c42911a02736d63d03/external/rules_python/python/versions.bzl", line 1067, column 18, in get_release_info
                }[p],
Error: key "x86_64-unknown-linux-musl" not found in dictionary

🌍 Your Environment

Operating System:

  
Linux x86
  

Output of bazel version:

  
7.4.1
  

Rules_python version:

  
1.6.0
  

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions