mod gap

module gap

What a site provides that a stack does not, and the recipe that would close it.

A site’s module tree names the software its users load. A stack such as an EESSI version names what it installs. For every package the site has and the stack lacks, the gap says which route closes it, in this order: site-only (excluded), filtered to the compatibility layer, already in an open software-layer pull request, a recipe on the generation in the easyconfig trees, an open easybuild-easyconfigs pull request at that generation, or a bump (no-recipe). Recipes on the generation are the roots stack batch plans pull requests from.

Types

type ModuleInventory

Module names and the versions the live listing exposes.

A name with an empty set came from a bare module name, so its version is unknown rather than absent from the inventory.

Variables

const ROUTE_FILES: &[(&str, &str)]

One tab-separated file per route stack gap writes, besides gap.tsv.

excluded is the site-only set and no-recipe is the bump set. The file names are those words.

Functions

fn carries_from_easyconfigs(prs: &[PrInput], generation: &str, members: &[String]) -> BTreeMap<String, OpenCarry>

Names the easyconfig files of prs add at generation.

A file whose toolchain version is generation, or whose toolchain label is in members, counts. A file the pull request deletes does not. The key is the lower-case package name.

fn carries_from_layer(prs: &[PrInput]) -> BTreeMap<String, OpenCarry>

Names the added easystack lines of prs carry.

The key is the lower-case package name. A pull request that only builds the name as a dependency of some other line is not recorded: the route is the line the pull request adds.

fn carries_from_layer_version(prs: &[PrInput], eessi_version: Option<&str>) -> BTreeMap<String, OpenCarry>

carries_from_layer, keeping easystacks of eessi_version only.

None keeps every easystack, which is what carries_from_layer does. Some("2026.06") leaves a 2025.06 pull request out of a 2026.06 gap. The match is still the filename the pull request adds.

fn gap(input: &GapInput<'_>) -> Vec<GapRow>

The gap between the site and the stack.

Stack names are matched without regard to case, as Lmod does. A name the stack already has is in-stack. Each other name takes the first route that applies: excluded, filtered, open-layer, recipe, open-easyconfigs, then no-recipe.

fn inventory_from_live_listing(text: &str) -> ModuleInventory

Module names and versions in module -t avail or module spider -t output.

fn inventory_from_module_source(path: &Path) -> Result<ModuleInventory>

Module names and versions from a listing file or an Lmod module tree.

Versions are kept as Lmod spells them, including any toolchain suffix. Bare names have an empty version set.

fn names_from_listing(text: &str) -> BTreeSet<String>

Package names from a module listing: Name/Version lines, bare names, or Name directories. Blank lines and # comments are skipped.

fn names_from_live_listing(text: &str) -> BTreeSet<String>

Names in module -t avail or module spider -t output.

Path headers, (default), and a Name: Name/version, ... spider line are read. A plain Name/version or bare name is unchanged.

fn names_from_module_source(path: &Path) -> Result<BTreeSet<String>>

Package names from a listing file or an Lmod module tree.

A directory is walked: Name/version.lua under modules/all, Compiler, and MPI all count, and .modulerc.lua and default do not. A file is module -t avail, module spider -t, or the same Name/version lines as names_from_listing.

fn render_tsv(rows: &[GapRow]) -> String

The gap as a tab-separated table with a header line.

fn render_version_changes(rows: &[VersionChangeRow]) -> String

A tab-separated version change table with a header line.

fn software_name(file: &str) -> Option<String>

The package name an easyconfig filename names.

hwloc-CUDA-2.11.2-GCCcore-15.2.0.eb is hwloc-CUDA. A path contributes only its last component.

fn version_changes(rows: &[GapRow], old: &ModuleInventory, eessi: &ModuleInventory) -> Vec<VersionChangeRow>

Turn gap routes into the user-facing version change table.

An in-stack module moved to EESSI, an excluded module remains site-only, and every other route is gone from the opened stack until that route lands. One row is written per old module version; a bare old name still contributes one row with no version.

Structs and Unions

struct GapInput<'a>

The lists gap reads.

site: &'a BTreeSet<String>

Site package names.

stack: &'a BTreeSet<String>

Names the stack already installs.

candidates: &'a [Candidate]

Easyconfigs the trees parsed.

generation: &'a str

Toolchain generation, 2026.1. A toolchain of this version is on the generation even when members does not list it (lfoss-2026.1).

members: &'a [String]

Toolchain labels of the generation (GCCcore-15.2.0, foss-2026.1, llvm-compilers-21.1.8).

excluded: &'a BTreeMap<String, String>

Names the stack does not carry (licensed, vendor, conda, portal), mapped to the reason.

filtered: &'a BTreeSet<String>

Names filtered to the compatibility layer, matched without regard to case.

open_layer: &'a BTreeMap<String, OpenCarry>

Names an open software-layer pull request adds, keyed by the lower-case package name.

open_easyconfigs: &'a BTreeMap<String, OpenCarry>

Names an open easyconfigs pull request adds at this generation, keyed by the lower-case package name.

struct GapRow

One site package and what closing it takes.

name: String

EasyBuild name, as the site’s module tree spells it.

route: String

in-stack, excluded, filtered, open-layer, recipe, open-easyconfigs, or no-recipe.

recipe: Option<String>

The easyconfig on the generation, for recipe, or the filename an open pull request adds, for open-layer and open-easyconfigs.

newest_elsewhere: Option<String>

The newest easyconfig of the name on any toolchain, for no-recipe: the source a bump starts from. Between builds of one version, one on a toolchain family of the generation, then on the newest toolchain generation, is named.

reason: Option<String>

Why a name is excluded or filtered, or the pull requests that already carry an open-layer or open-easyconfigs name.

struct OpenCarry

A filename an open pull request adds, and the pull requests that add it.

file: String

Easyconfig filename, without a directory.

label: String

software-layer#1585 or easyconfigs#24388. Several are joined with ", " in the order the pull requests were read.

struct VersionChangeRow

One previous-stack module version and where users find it in the new stack.

name: String

EasyBuild software name.

old_version: Option<String>

Version in the site or older-EESSI inventory. None for a bare name.

eessi_version: Option<String>

Version in the target EESSI inventory. Multiple target versions are comma-separated. Set only for moved.

status: String

moved, gone, or site-only.