mod shadow¶
- module shadow¶
Report site-layer recipes that shadow a module the EESSI base stack provides.
A site layer is the software EESSI does not install. When the site module path is searched first, a recipe whose name is already a base-stack module hides that module.
stack shadowreads the site recipes and the base inventory fromcrate::gap::inventory_from_module_source, the loaderstack gapuses for--installed, and reports each shadow.EasyBuild’s installed module version is the software version, then
crate::build_order::MODULE_VERSION_TOOLCHAIN_SEPARATOR, then the toolchain, then the versionsuffix. Seecrate::build_order::installed_module_version. A base version is the same software version when it equals the recipe version (plus its versionsuffix) or continues with that separator. A recipe versionsuffix also has to end the base version, so a CUDA variant does not count as the same version as the plain build. A name the base lists with an empty version set isunversioned: the loader records a bare name that way.Variables
- const SHADOW_DIFFERENT: &str¶
The base stack installs this name at a different software version.
- const SHADOW_KINDS: &[&str]¶
Report order: an exact version, then another version, then a bare name.
- const SHADOW_SAME: &str¶
The recipe’s software version is one the base stack already installs.
- const SHADOW_UNVERSIONED: &str¶
The base stack lists this name and records no version.
Functions
- fn classify(recipes: &[Candidate], base: &ModuleInventory) -> Vec<ShadowHit>¶
Classify site recipes against a base inventory. Names match without regard to case. A name the inventory does not have is the site layer and is left out.
- fn load_base(paths: &[PathBuf]) -> Result<ModuleInventory>¶
Load every
--basepath and merge them into one inventory.Each path goes through
inventory_from_module_source. Names that differ only by case share one key, the spelling of the first path that named it.
- fn run(request: &ShadowRequest) -> Result<ShadowReport>¶
Read the site recipes and the base inventory, and report every shadow.
- fn same_software_version(version: &str, versionsuffix: Option<&str>, module_version: &str) -> bool¶
Whether
module_versionis the recipe’s software version.The base string comes from
inventory_from_module_source, which keeps the Lmod spelling, toolchain included. Equality covers a listing that stored only the software version (and versionsuffix). A longer module version matches when it continues withMODULE_VERSION_TOOLCHAIN_SEPARATOR, which is howinstalled_module_versionattaches the toolchain. A recipe versionsuffix has to end that module version: the suffix is part of the version token, asCandidatestores it (for example-CUDA-12.6.0).
Structs and Unions
- struct ShadowHit¶
One site recipe whose name the base stack already provides.
- kind: String¶
SHADOW_SAME,SHADOW_DIFFERENT, orSHADOW_UNVERSIONED.
- path: String¶
Easyconfig path the recipe was parsed from.
- name: String¶
Package name, as the recipe spells it.
- version: String¶
Software version, without the versionsuffix.
- versionsuffix: Option<String>¶
Recipe versionsuffix, including its leading separator when set.
- base: Vec<String>¶
Base module versions that decided the kind. Matching versions for
SHADOW_SAME; every recorded version forSHADOW_DIFFERENT; empty forSHADOW_UNVERSIONED.
- struct ShadowReport¶
What
stack shadowfound.- recipes: usize¶
Site recipes that parsed.
- base_names: usize¶
Distinct base-stack names, matched without regard to case.
- stdout: String¶
Text for stdout. JSON when the request asked for it.
Implementations
- impl ShadowReport¶
Functions
- fn count(&self, kind: &str) -> usize¶
How many hits have this kind.
- fn failure(&self) -> Option<String>¶
The stderr line when a recipe shadows the base, or
Nonewhen none do.
- struct ShadowRequest¶
Arguments for
stack shadow.- easyconfigs: Vec<PathBuf>¶
Site-layer easyconfig trees, or individual
.ebfiles. Repeatable.
- base: Vec<PathBuf>¶
EESSI base module trees or listings. Repeatable. Merged the way
stack gapmerges repeated--installedpaths.
- json: bool¶
Print one JSON document instead of the text report.