Default and latest version specifiers¶
Configuration¶
Rely on
advanced_version_spec
optionNo need for an extra configuration option
When option is on it automatically enables use of these two new version specifiers
When
advanced_version_spec
is off,mod@latest
is considered as a modulefile name to findin case
implicit_default
is disabled- means a
default
symbol or alatest
symbol should be found defined to respectively make use of the@default
or@latest
specifiers - a not found error is otherwise raised, as specified version does not exist
- means a
Specification¶
When a
default
or alatest
symbol is defined@default
or respectively@latest
will resolve to the symbol target
When no
default
orlatest
symbol is defined@default
and@latest
point to the highest existing version (also called the implicit default)- note that if a
default
symbol is defined but not alatest
symbol,@default
points to the defined default and@latest
points to the highest version that exists
default
orlatest
version specifiers can be employed:- in single version specification:
@default
or@latest
- in version list:
@vers1,default
or@latest,default,vers2
- in single version specification:
default
orlatest
version specifiers cannot be employed in version range- otherwise an error is raised
default
orlatest
version specifiers can also be specified with the traditionalmod/version
syntax- for instance
mod/default
ormod/latest
- for instance
When a
default
orlatest
modulefile exists@default
or respectively@latest
will resolve to the existing modulefile- no automatic symbol will be recorded in this case as
default
orlatest
are regular versions
To be included in module search result, the version specifiers should fully match search query or search query should not target a specific module version
- the automatically defined symbolic versions are included in results for queries like
mod@latest
ormod
- but not for queries like
mod@la
,mod@def
,mod@lat*
,mod@def??lt
- the automatically defined symbolic versions are included in results for queries like
Automatically defined
default
andlatest
version specifiers are not displayed to avoid overloading output:- on
module list
output - on
module avail
output - those two sub-commands only display symbolic versions manually defined
- on
Alternative module names deduced from the automatically defined version specifiers need to be tracked
in loaded environment for each targeted module loaded
to keep track loaded module is default or latest version
thus keeping ability to answer queries like
is-loaded mod@latest
from further modulefile evaluation or module command-linethis information is kept in the
__MODULES_LMALTNAME
environment variable, along other alternative namesAuto symbols in this variable are recorded with a
as|
prefix to distinguish them from other alternative names- for instance
mod/1.2&mod/regular_symbol&as|mod/latest
- it helps to filter auto symbols from regular symbols that need to be displayed
- for instance