Skip to content

Failure when specifying 'release candidate' (-rc..) versions of llvm distributions #664

@ljessendk

Description

@ljessendk
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
    extra_llvm_distributions = {
        "LLVM-22.1.0-rc2-Linux-X64.tar.xz": "663d9df63a71ba5cd2649e88af34c2c00aa4285e0c7e5e7b68da7b42c3799b90",
    },
    llvm_version = "22.1.0-rc2",
)
use_repo(llvm, "llvm_toolchain")
use_repo(llvm, "llvm_toolchain_llvm")

Fails with the following exception:

/home/builder/.cache/bazel/_bazel_builder/11b4e3ffa56c08f73bfb257afd96de19/external/toolchains_llvm+/toolchain/internal/llvm_distributions.bzl", line 739, column 22, in _parse_version
                return tuple([int(s) for s in v.split(".")])
Error in int: invalid base-10 literal: "0-rc2"
ERROR: no such package '@@toolchains_llvm++llvm+llvm_toolchain_llvm//': invalid base-10 literal: "0-rc2"

Seems that the version parsing does not handle versions with postfixes after the bugfix number.

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