From b304a2d85420f55e7b9a1fcac9a4b589b9f1764e Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 21 Feb 2025 18:53:46 +0100 Subject: [PATCH] Fix installing `rust@nightly` (#49098) Installing `rust@nightly` fails because the package file declares a conflict of rust versions older than `:1.64` with `gcc>=13`. However, because `nightly` is alphanumerically smaller than any actual version number, `nightly` is incorrectly detected to have a conflict with `gcc>=13` as well. Marking `nightly` as an infinity version instead solves this. --- lib/spack/spack/version/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/version/common.py b/lib/spack/spack/version/common.py index f285d7b9a7f..7cac90ca86b 100644 --- a/lib/spack/spack/version/common.py +++ b/lib/spack/spack/version/common.py @@ -10,7 +10,7 @@ COMMIT_VERSION = re.compile(r"^[a-f0-9]{40}$") # Infinity-like versions. The order in the list implies the comparison rules -infinity_versions = ["stable", "trunk", "head", "master", "main", "develop"] +infinity_versions = ["stable", "nightly", "trunk", "head", "master", "main", "develop"] iv_min_len = min(len(s) for s in infinity_versions)