mod modulerc

module modulerc

Lmod module version aliases.

A module tree’s modules/all/<Name>/.modulerc.lua publishes short versions with module_version("Name/full", "alias"). module load Name/alias loads Name/full. EasyBuild treats that alias as the installed module, which is why Java/21 is installed when the tree has Java/21.0.8 and a modulerc that aliases it to 21.

Functions

fn apply_modulerc(installed: &BTreeSet<String>, aliases: &[ModuleVersionAlias]) -> BTreeSet<String>

Add an alias to the installed set when the module it points at is installed.

fn load_modulerc(path: &Path) -> Result<Vec<ModuleVersionAlias>, String>

Read a modulerc file, or every .modulerc.lua under a module tree.

fn parse_modulerc(text: &str) -> Vec<ModuleVersionAlias>

Read module_version("Name/full", "alias"[, ...]) calls from a modulerc.

Lua line comments are ignored. A call may span lines. Each alias after the full module name becomes its own Name/alias when the alias has no /.

Structs and Unions

struct ModuleVersionAlias

One module_version alias: full is Name/version, alias is Name/short.

full: String

The module the alias points at, e.g. Java/21.0.8.

alias: String

The name Lmod also answers to, e.g. Java/21.