mod dep_versions

module dep_versions

Versions of a dependency that exist in a local easyconfigs tree.

Review fixes often need a dependency version for a given toolchain generation ((‘Cython’, ‘<which?>’) on GCCcore-13.3.0). Guessing gives versions that do not exist. This scans .eb files named <name>-*.eb under the given roots and reports each one’s version, toolchain, and versionsuffix, so the caller can pick a version that exists.

Functions

fn dep_versions(roots: &[PathBuf], name: &str, toolchain: Option<&str>) -> Result<DepVersions, String>

List the easyconfigs of name under roots (directories, or .eb files whose directory is searched). Errors when the roots hold no .eb file at all, because then nothing can be looked up.

fn normalize_toolchain(spec: &str) -> String

Normalize a toolchain spec: GCCcore-13.3.0, GCCcore/13.3.0, ('GCCcore', '13.3.0')-style GCCcore 13.3.0, or system.

Structs and Unions

struct DepVersion

One easyconfig of the requested software.

version: String

version from the easyconfig.

toolchain: String

NAME-VERSION, or system for toolchain = SYSTEM.

versionsuffix: String

versionsuffix as written (may contain templates), empty when unset.

path: String

Path of the easyconfig.

struct DepVersions

Result of dep_versions.

name: String

Software name searched for (case-sensitive, as in ('Cython', ...)).

toolchain: Option<String>

Toolchain filter, when one was given.

matching: Vec<DepVersion>

Easyconfigs for exactly that toolchain (or all, without a filter).

subtoolchain_matching: Vec<DepVersion>

Easyconfigs on a subtoolchain of the requested toolchain (for foss-2024a: GCCcore-13.3.0, GCC-13.3.0, gompi-2024a, …). A dependency of a foss recipe may use any of these; robot finds it.

other_toolchains: Vec<DepVersion>

Easyconfigs of the same software for other toolchains.

easyconfigs_scanned: usize

Number of .eb files seen under the roots.

roots: Vec<String>

Roots that were searched.

message: String

One-line guidance for the caller.