From 6dc674c6bb78899ca3a36a5b96a402e839016603 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Mon, 9 Nov 2026 06:58:07 +0100 Subject: [PATCH 1/2] doc: update other-implementations cmp for Lmod 9.4.5 and path priority Path entry priority is no longer a feature exclusive to Lmod now that the --priority option is available on prepend-path and append-path. Map the Lua priority syntax to its Modules equivalent in the correspondence table and refresh the compared versions. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Xavier Delaruelle --- doc/source/other-implementations.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/other-implementations.rst b/doc/source/other-implementations.rst index d1a3d0364..a31c3090b 100644 --- a/doc/source/other-implementations.rst +++ b/doc/source/other-implementations.rst @@ -42,7 +42,6 @@ table highlights features that are unique to each implementation. * Save configuration under :envvar:`XDG_CONFIG_HOME` * `i18n`_ * `Find best module`_ - * `Path entry priorities`_ * ``--regexp`` search option * `settarg`_ * `MarkDown support in module help and whatis`_ @@ -76,7 +75,6 @@ table highlights features that are unique to each implementation. .. _Inactive modules: https://lmod.readthedocs.io/en/latest/010_user.html#module-hierarchy .. _Find best module: https://lmod.readthedocs.io/en/latest/060_locating.html .. _i18n: https://lmod.readthedocs.io/en/latest/185_localization.html -.. _Path entry priorities: https://lmod.readthedocs.io/en/latest/077_ref_counting.html#specifying-priorities-for-path-entries .. _Update path entry order: https://lmod.readthedocs.io/en/latest/077_ref_counting.html .. _settarg: https://lmod.readthedocs.io/en/latest/310_settarg.html .. _Hook functions: https://lmod.readthedocs.io/en/latest/170_hooks.html#hook-functions @@ -218,6 +216,8 @@ implementation. - |foo@5.0:7.0|_ * - ``latest("foo")`` - |foo@latest|_ + * - ``prepend_path{"PATH","/foo",priority=100}`` + - :mfcmd:`prepend-path` ``--priority 100 PATH /foo`` * - ``myModuleFullName()`` - :mfcmd:`module-info name` * - ``myModuleName()`` @@ -300,5 +300,5 @@ additional tools that enhance how modulefiles are handled. If you're aware of a ``module``-related project missing from this list, feel free to :ref:`contact us` so we can add it. -.. |modules_version| replace:: Modules 5.7.0 -.. |lmod_version| replace:: Lmod 9.4.2 +.. |modules_version| replace:: Modules 5.8.0 (not yet released) +.. |lmod_version| replace:: Lmod 9.4.5 From 024fc9539692c96654d3eb12301391deb9f02d5c Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Mon, 9 Nov 2026 07:04:00 +0100 Subject: [PATCH 2/2] doc: describe path_entry_reorder effect on prepend-path and use The prepend-path, append-path and use sections state that an element already defined in the variable is neither added again nor moved, which is only true when the path_entry_reorder configuration option is disabled. Describe how these commands behave when this option is enabled and record this behavior change in their version history. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Xavier Delaruelle --- doc/source/module.rst | 9 ++++++++- doc/source/modulefile.rst | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/source/module.rst b/doc/source/module.rst index d7875e557..66dda3756 100644 --- a/doc/source/module.rst +++ b/doc/source/module.rst @@ -3250,7 +3250,10 @@ Module Sub-Commands requests the default prepend behavior. When *directory* is already defined in :envvar:`MODULEPATH`, it is not added - again or moved at the end or at the beginning of the environment variable. + again or moved at the end or at the beginning of the environment variable, + unless the :mconfig:`path_entry_reorder` configuration option is enabled, in + which case *directory* is moved at the beginning of :envvar:`MODULEPATH` or + at its end if the ``--append`` flag is set. The ``--priority`` option assigns a priority *N* to the added *directory*, like the ``--priority`` option of :mfcmd:`prepend-path` and @@ -3284,6 +3287,10 @@ Module Sub-Commands :subcmd:`module use` is called from the command-line or within an initialization modulefile script + .. versionchanged:: 5.7 + *directory* already defined in :envvar:`MODULEPATH` is moved when + :mconfig:`path_entry_reorder` configuration option is enabled + .. versionchanged:: 5.8 Option ``--priority`` added diff --git a/doc/source/modulefile.rst b/doc/source/modulefile.rst index 9a6394898..5411e25d1 100644 --- a/doc/source/modulefile.rst +++ b/doc/source/modulefile.rst @@ -1272,7 +1272,10 @@ the *modulefile* is being loaded. When *value* is already defined in environment *variable*, it is not added again or moved at the end or at the beginning of *variable*. Exception is made when the ``--duplicates`` option is set in which case *value* is added - again to *variable*. + again to *variable*. When the :mconfig:`path_entry_reorder` configuration + option is enabled, *value* is moved at the beginning of *variable* with + :mfcmd:`prepend-path` or at its end with :mfcmd:`append-path`, unless the + ``--duplicates`` option is set. If the *variable* is not set, it is created. When a *modulefile* is unloaded, :mfcmd:`append-path` and :mfcmd:`prepend-path` become @@ -1338,6 +1341,10 @@ the *modulefile* is being loaded. modulefile adding path to :envvar:`MODULEPATH` environment variable is considered a requirement of modulefiles stored in this path. + .. versionchanged:: 5.7 + *value* already defined in *variable* is moved when + :mconfig:`path_entry_reorder` configuration option is enabled + .. versionchanged:: 5.8 Option ``--priority`` added