default-latest-version-specifiers.rst (modules-5.1.1.tar.bz2) | : | default-latest-version-specifiers.rst (modules-5.2.0.tar.bz2) | ||
---|---|---|---|---|
.. _default-latest-version-specifiers: | .. _default-latest-version-specifiers: | |||
Default and latest version specifiers | Default and latest version specifiers | |||
===================================== | ===================================== | |||
Configuration | Configuration | |||
------------- | ------------- | |||
- Rely on :mconfig:`advanced_version_spec` option | - Rely on :mconfig:`advanced_version_spec` option | |||
- No need for an extra configuration option | - No need for an extra configuration option | |||
- When option is on it automatically enables use of these two new version sp | - When option is on it automatically enables use of these two new version spec | |||
ecifiers | ifiers | |||
- When ``advanced_version_spec`` is off, ``mod@latest`` is considered as a m | - When ``advanced_version_spec`` is off, ``mod@latest`` is considered as a mod | |||
odulefile name to find | ulefile name to find | |||
- in case ``implicit_default`` is disabled | - in case ``implicit_default`` is disabled | |||
- means a ``default`` symbol or a ``latest`` symbol should be found defi | - means a ``default`` symbol or a ``latest`` symbol should be found defined | |||
ned to respectively make use of the ``@default`` or ``@latest`` specifiers | to respectively make use of the ``@default`` or ``@latest`` specifiers | |||
- a not found error is otherwise raised, as specified version does not e | - a not found error is otherwise raised, as specified version does not exist | |||
xist | ||||
Specification | Specification | |||
------------- | ------------- | |||
- When a ``default`` or a ``latest`` symbol is defined | - When a ``default`` or a ``latest`` symbol is defined | |||
- ``@default`` or respectively ``@latest`` will resolve to the symbol target | - ``@default`` or respectively ``@latest`` will resolve to the symbol target | |||
- When no ``default`` or ``latest`` symbol is defined | - When no ``default`` or ``latest`` symbol is defined | |||
- ``@default`` and ``@latest`` point to the highest existing version (also c | - ``@default`` and ``@latest`` point to the highest existing version (also cal | |||
alled the implicit default) | led the implicit default) | |||
- note that if a ``default`` symbol is defined but not a ``latest`` symbol, | - note that if a ``default`` symbol is defined but not a ``latest`` symbol, `` | |||
``@default`` points to the defined default and ``@latest`` points to the highest | @default`` points to the defined default and ``@latest`` points to the highest v | |||
version that exists | ersion that exists | |||
- ``default`` or ``latest`` version specifiers can be employed: | - ``default`` or ``latest`` version specifiers can be employed: | |||
- in single version specification: ``@default`` or ``@latest`` | - in single version specification: ``@default`` or ``@latest`` | |||
- in version list: ``@vers1,default`` or ``@latest,default,vers2`` | - in version list: ``@vers1,default`` or ``@latest,default,vers2`` | |||
- ``default`` or ``latest`` version specifiers cannot be employed in version ran ge | - ``default`` or ``latest`` version specifiers cannot be employed in version ran ge | |||
- otherwise an error is raised | - otherwise an error is raised | |||
- ``default`` or ``latest`` version specifiers can also be specified with the tr aditional ``mod/version`` syntax | - ``default`` or ``latest`` version specifiers can also be specified with the tr aditional ``mod/version`` syntax | |||
- for instance ``mod/default`` or ``mod/latest`` | - for instance ``mod/default`` or ``mod/latest`` | |||
- When a ``default`` or ``latest`` modulefile exists | - When a ``default`` or ``latest`` modulefile exists | |||
- ``@default`` or respectively ``@latest`` will resolve to the existing modu | - ``@default`` or respectively ``@latest`` will resolve to the existing module | |||
lefile | file | |||
- no automatic symbol will be recorded in this case as ``default`` or ``late | - no automatic symbol will be recorded in this case as ``default`` or ``latest | |||
st`` are regular versions | `` are regular versions | |||
- To be included in module search result, the version specifiers should fully ma tch search query or search query should not target a specific module version | - To be included in module search result, the version specifiers should fully ma tch search query or search query should not target a specific module version | |||
- the automatically defined symbolic versions are included in results for qu | - the automatically defined symbolic versions are included in results for quer | |||
eries like ``mod@latest`` or ``mod`` | ies like ``mod@latest`` or ``mod`` | |||
- but not for queries like ``mod@la``, ``mod@def``, ``mod@lat*``, ``mod@def? | - but not for queries like ``mod@la``, ``mod@def``, ``mod@lat*``, ``mod@def??l | |||
?lt`` | t`` | |||
- Automatically defined ``default`` and ``latest`` version specifiers are not di splayed to avoid overloading output: | - Automatically defined ``default`` and ``latest`` version specifiers are not di splayed to avoid overloading output: | |||
- on ``module list`` output | - on ``module list`` output | |||
- on ``module avail`` output | - on ``module avail`` output | |||
- those two sub-commands only display symbolic versions manually defined | - those two sub-commands only display symbolic versions manually defined | |||
- Alternative module names deduced from the automatically defined version specif iers need to be tracked | - Alternative module names deduced from the automatically defined version specif iers need to be tracked | |||
- in loaded environment for each targeted module loaded | - in loaded environment for each targeted module loaded | |||
- to keep track loaded module is default or latest version | - to keep track loaded module is default or latest version | |||
- thus keeping ability to answer queries like ``is-loaded mod@latest`` from | - thus keeping ability to answer queries like ``is-loaded mod@latest`` from fu | |||
further modulefile evaluation or module command-line | rther modulefile evaluation or module command-line | |||
- this information is kept in the :envvar:`__MODULES_LMALTNAME` environment | - this information is kept in the :envvar:`__MODULES_LMALTNAME` environment va | |||
variable, along other alternative names | riable, along other alternative names | |||
- Auto symbols in this variable are recorded with a ``as|`` prefix to distin | - Auto symbols in this variable are recorded with a ``as|`` prefix to distingu | |||
guish them from other alternative names | ish them from other alternative names | |||
- for instance ``mod/1.2&mod/regular_symbol&as|mod/latest`` | - for instance ``mod/1.2&mod/regular_symbol&as|mod/latest`` | |||
- it helps to filter auto symbols from regular symbols that need to be d | - it helps to filter auto symbols from regular symbols that need to be displ | |||
isplayed | ayed | |||
.. vim:set tabstop=2 shiftwidth=2 expandtab autoindent: | ||||
End of changes. 12 change blocks. | ||||
39 lines changed or deleted | 38 lines changed or added |