.. _NEWS:
Release notes
=============
This file describes changes in recent versions of Modules. It primarily
documents those changes that are of interest to users and admins.
.. _5.7 release notes:
Modules 5.7.0 (2026-09-21)
--------------------------
* Script: improve :command:`mrel` to always ask a Fedora Kerberos ticket.
* Use CMake ``EVAL CODE`` to forward arguments passed to ``module`` CMake
function. (fix issue #419 with contribution from Benoit Dumas)
* Doc: update email address in `Code of conduct`_ to report bad behavior to
maintainers.
* Move *modules-interest* mailing-list to HPSF.
* Script: add tests on :command:`mb` utility to track performance of load,
list and purge sub-commands with large number (>100) of modules.
* Script: fix procedure call timing of Tcllib profiler module within
:command:`mlprof` to avoid mixing timers from calls made at different
interpretation level.
* Parse loaded environment in early execution stage and always fail if an
inconsistency is detected.
* Improve performances of loaded module comparison used when checking
conflict and requirement dependencies. (fix issue #603)
* Fix environment variable synchronization issue between modulefile evaluation
interpreters: supersede the ``append`` Tcl command rather sync interpreters
for each environment variable change. A substantial performance improvement
is observed when loading or unloading many modulefiles. (fix issue #603)
* Script: add ``--with-lmod`` option to :command:`mb` command to compare
current Modules version against an installed version of Lmod.
* Update the :subcmd:`sh-to-mod` mechanism to correctly parse shell alias on
Dash shell version 0.5.13.
* Update the :subcmd:`sh-to-mod` mechanism to correctly parse path-like
environment variable on Fish shell version 4.3.
* When fetching user's groups, in case a group name cannot be resolved use
this group gid number as name instead of raising an error. (fix issue #604)
* Introduce :mconfig:`path_entry_reorder` configuration option that change
order of entry in a path-like environment variable when it is added again.
This new configuration option is disabled by default. This option can be
changed at installation time with :instopt:`--enable-path-entry-reorder`.
When :mconfig:`path_entry_reorder` is changed with :subcmd:`config`
sub-command, it sets the :envvar:`MODULES_PATH_ENTRY_REORDER` environment
variable. (fix issue #595 with contribution from Achim Gsell)
* Install: reorder the options in the :file:`configure` script help message
alphabetically.
* Doc: add manual page for :ref:`modulecmd(1)` command.
* Make :mfcmd:`getenv` modulefile command available from module rc file
evaluation context. (fix issue #588)
* Install: add installation option
:instopt:`--disable-compressed-changelog<--enable-compressed-changelog>` to
cope with packaging process handling documentation file compression at their
level. (fix issue #592)
* Add :option:`-p` option as an abbreviated form for :option:`--paginate`.
(fix issue #593)
* Add :option:`-P` option as an abbreviated form for :option:`--no-pager`.
(fix issue #606)
* Doc: add :ref:`organize-tsc-meeting` guide.
* Add the :mconfig:`paginate` configuration option to control whether or not
output message should be piped into defined pager by default. This option
can be changed at installation time with :instopt:`--enable-paginate`. When
:mconfig:`paginate` is changed with :subcmd:`config` sub-command, it sets
the :envvar:`MODULES_PAGINATE` environment variable. (fix issue #594)
* Doc: add :ref:`plan-next-release-content` guide
* Introduce the :mconfig:`non_exportable_tags` configuration option that lists
tags that should not be exported to modules once loaded. When
:mconfig:`non_exportable_tags` is changed with :subcmd:`config` sub-command,
it sets the :envvar:`MODULES_NON_EXPORTABLE_TAGS` environment variable. (fix
issue #608)
* Improve the performance of the module’s column output by removing the costly
optimization that attempts to fit more columns within the available screen
width. (fix issue #622)
* Fix superseding definition of ``source`` Tcl command when
:mconfig:`source_cache` configuration option is enabled to support
``-encoding`` option. (fix issue #627)
* Correctly parse the module specifications passed as argument on
:mfcmd:`depends-on`, mfcmd:`always-load` and :mfcmd:`prereq-all` modulefile
commands. It especially fixes module specification containing the definition
of variants. (fixes issue #626)
* Report the full *via* path for modules on :subcmd:`avail` and
:subcmd:`spider` sub-commands rather the last part of this via information.
JSON output is updated to report the ``via`` key as an array rather as a
string. (fix issue #586)
* Introduce the :mconfig:`info_extension` configuration option to consider
that module extensions have a pure informational purpose and no module alias
is associated to them. Extensions defined with :mfcmd:`provide` modulefile
command are not affected by this mechanism. When :mconfig:`info_extension`
is changed with :subcmd:`config` sub-command, it sets the
:envvar:`MODULES_INFO_EXTENSION` environment variable. (fix issue #585)
* Doc: add :ref:`linked-envvars` design notes.
* Add the :mconfig:`linked_envvars` configuration option to apply the same
value update commands to all linked environment variables. When
:mconfig:`linked_envvars` is changed with :subcmd:`config` sub-command, it
sets the :envvar:`MODULES_LINKED_ENVVARS` environment variable. (fix issue
#609)
* Doc: add :ref:`init-envvars` design notes.
* Add the :mconfig:`init_envvars` configuration option to define initial
values to assign to environment variables before they are modified for the
first time. This option can be changed at installation time with
:instopt:`--with-init-envvars`. When :mconfig:`init_envvars` is changed with
:subcmd:`config` sub-command, it sets the :envvar:`MODULES_INIT_ENVVARS`
environment variable. (fix issue #572)
* Enable lexical binding in Emacs addon file. (contribution from Peter Oliver)
* Script: update :command:`mt` utility to analyze test suite log file when
test suite run is aborted.
* Correctly match loaded modules specified as requirement with a trailing
``/`` character after module name. (fix issue #640)
* Also consider ``-`` in addition to ``.`` as a version number separator
character when selecting a module with the :mconfig:`extended_default`
mechanism. (fix issue #619)
* Rename Modules initialization script for Python ``env_modules.py`` to make
it a proper Python module name.
* Rename the Python initialization script to :file:`env_modules.py` so that it
uses a valid Python module name. Generates a :file:`python.py` symlink onto
:file:`env_modules.py` to preserve compatibility. (contribution from Byron
Boulton)
* Install: introduce the :instopt:`--enable-set-pythonpath` installation
option to prepend Modules ``init`` directory to the :envvar:`PYTHONPATH`
environment variable during Modules initialization. This option is enabled
by default and make it easier to import the ``env_modules`` Python module.
(fix issue #483 with contribution from Byron Boulton)
* Install: add the :instopt:`--enable-append-pythonpath` installation option,
which causes :instopt:`--enable-set-pythonpath` to append the Modules
``init`` directory to :envvar:`PYTHONPATH` instead of prepending it.
(contribution from Byron Boulton)
* Doc: clarify shell script, executed by :mfcmd:`source-sh` modulefile command
or :subcmd:`sh-to-mod` sub-command, does not get access to shell aliases,
functions or completions settings only available in interactive sessions or
defined in profile files. (fix issue #646)
* Report a global known error when Modules Tcl extension library cannot be
loaded. (fix issue #644)
* Add :mconfig:`domainname` configuration option to define the command to run
to fetch domain name. It can be changed at installation time with
:instopt:`--with-domainname` and :instopt:`--with-domainname-opts` options.
When :mconfig:`domainname` is changed with :subcmd:`config` sub-command, it
sets the :envvar:`MODULES_DOMAINNAME` environment variable. (fix issue #645)
* Update the :mfcmd:`source-sh` modulefile command and :subcmd:`sh-to-mod`
sub-command mechanism to produce a more consistent value for a path-like
environment variable change that requires both a prepended and an appended
part expressed with a different delimiter character: a :mfcmd:`setenv`
command is now generated instead in this situation.
* Update the :mfcmd:`source-sh` modulefile command and :subcmd:`sh-to-mod`
sub-command mechanism to no longer de-duplicate a path entry found several
times in the entries it prepends or in the entries it appends, and to add
the ``--duplicates`` option on a generated :mfcmd:`prepend-path` or
:mfcmd:`append-path` command when one of the path entries it adds is
already found in the variable value prior script evaluation, is found
several times in the entries it adds or is found in both the entries it
prepends and the entries it appends, so this entry is not silently
absorbed by these commands' default de-duplication behavior nor relocated
by the :mconfig:`path_entry_reorder` configuration option.
* Resolve an exact ``name/version`` specification without validating every
sibling modulefile found in its directory, by walking versions from the
dictionary-highest to the dictionary-lowest and stopping as soon as the
implicit ``default`` and ``latest`` symbolic versions are settled. A
substantial performance improvement is observed when loading an existing
modulefile out of a directory holding hundreds or thousands of sibling
versions. (fix issue #561)
* Doc: add :ref:`module-find-and-resolution` design notes.
* Doc: add :ref:`devel-testsuite` guide describing the DejaGnu testsuite
structure.
* Doc: document and cross-reference :ref:`commit-message-conventions` in
:ref:`CONTRIBUTING`.
* Doc: document :ref:`code-comments` conventions in :ref:`CONTRIBUTING`.
* Doc: add :ref:`devel-ci` guide describing continuous integration usage.
* Install: rename the shipped ``COPYING.GPLv2`` license file to ``COPYING``,
the name convention recognized by packaging tools.
* Doc: fix favicon rendering with a black background instead of white on
viewers that ignore transparency, by setting its transparent pixels to a
white matte color instead of black.
* Doc: document Windows Terminal profile setup as an alternative way to
initialize Modules on Windows without an install script. (fix issue #634)
* Install: use ``reg add`` instead of ``setx /M`` to persist the system-wide
``PATH`` environment variable in :file:`INSTALL.bat` and
:file:`UNINSTALL.bat`, as ``setx`` silently truncates the value it writes
to 1024 characters, which could corrupt the system ``PATH`` when installing
from a shell with an already long inherited ``PATH`` (e.g. a Visual Studio
Developer Prompt). (fix issue #654)
* Doc: add :ref:`hook-api` design notes.
* Add the ``add-hook`` siteconfig command to register a procedure on one of
4 stable hook events (:mhook:`before-modulefile-eval`,
:mhook:`after-modulefile-eval`, :mhook:`before-modulerc-eval`,
:mhook:`after-modulerc-eval`), so sites no longer need to rely on ``trace``
or procedure renaming, which bind to internal implementation details, to
run code before or after a modulefile or modulerc evaluation. (fix issue
#607)
* Doc: add :ref:`add-new-hook-event` guide describing how to contribute a
new hook event.
* Doc: add :ref:`sync-remote-appdir` cookbook recipe.
* Testsuite: add *completion* testsuite to validate shell Tab completion of
this project. This testsuite can be invoked with ``make testcompletion`` or
``script/mt comp``. It drives a real bash, zsh, fish or tcsh session
through `Expect `_ to press the Tab key
against the built shell completion script and check the resulting
candidate list.
* Init: fix numerous inconsistencies between ``module help``'s usage message
and the option flags and positional arguments each sub-command actually
accepts, and between that usage message and what bash, fish, tcsh and zsh
Tab completion offer for each sub-command. Guarded against regressing with
a new ground-truth check in the *completion* testsuite that compares
``module``/``ml`` Tab completion against the sub-commands, switches,
options and argument kinds parsed straight out of ``module help``.
* Init: no longer offer the legacy :subcmd:`initadd`, :subcmd:`initclear`,
:subcmd:`initlist`, :subcmd:`initprepend` and :subcmd:`initrm`
sub-commands as Tab completion candidates (bash, fish, tcsh, zsh), since
``module help`` does not document them.
* Testsuite: add *cookbook* testsuite to validate the recipes documented
under :ref:`cookbook`. This testsuite can be invoked with ``make
testcookbook`` or ``script/mt cook``. It builds a sandboxed fixture
from the exact files a recipe ships under :file:`doc/example/`, then runs
the commands demonstrated in the recipe's ``Usage example`` documentation
in order and checks that similar output is obtained. Currently covers the
:ref:`sync-remote-appdir` recipe.
* Doc: add :ref:`modulepath-ignore` design notes.
* Add :mfcmd:`modulepath-ignore` modulefile command to define, from rc
files, gitignore-style patterns describing modulepath content to ignore
when searching for modulefiles. Ignored files and directories are handled
as if they do not exist: they are not checked, not walked down, not
reported and not recorded in modulepath cache file. Add
:mconfig:`modulepath_ignore` configuration option and
:option:`--no-modulepath-ignore` command line switch to control whether
pattern definitions are applied. (fix issue #562)
* Install: add the :instopt:`--with-pythondir` installation option to
define the directory where to install the ``env_modules`` Python module.
It enables for instance to install :file:`env_modules.py` with the other
Python modules available on the system. When this option is set,
:instopt:`--enable-set-pythonpath` adds this directory to
:envvar:`PYTHONPATH` instead of the Modules ``init`` directory. (fix issue
#643)
* Introduce :mconfig:`ignore_cache_subcmds` configuration option that
defines a list of module sub-commands on which module cache files are
ignored. It is useful when cache files are large: a sub-command targeting
specific modules (like :subcmd:`load`) may find them faster by walking
through modulepath directories than by evaluating whole cache files. When
:mconfig:`ignore_cache_subcmds` is changed with :subcmd:`config`
sub-command, it sets the :envvar:`MODULES_IGNORE_CACHE_SUBCMDS`
environment variable. (fix issue #563)
* Protect the creation of the Tcl sub-interpreters used to evaluate modulercs
and modulefiles with the quarantine mechanism. Environment variables listed
in the :mconfig:`run_quarantine` configuration option are unset or set to
the value of their corresponding :envvar:`MODULES_RUNENV_\` variable
during this creation step, then restored to their original value. (fix
issue #623)
* Doc: adopt the Linux kernel policy on :ref:`ai-coding-assistants` in
:ref:`CONTRIBUTING`: AI agents must never add their own ``Signed-off-by:``
trailer and their involvement must be disclosed with an ``Assisted-by:``
trailer.
* Doc: add the :ref:`user-guide` document that explains a selection of
useful but lesser known features through practical examples and common
use cases.
* Init: fix command injection in Bash completion when module names contain
shell meta-characters. Completion candidates were passed to ``compgen -W``
which evaluates command substitution syntax. (fix `CVE-2026-85013`_ found
by AISLE in partnership with Red Hat)
* Accept abbreviated upper bounds in version ranges such as ``@3.20:3`` to
select versions starting at ``3.20`` within major version ``3``. (fix issue
#698)
* Fix resolution of relative path entries in :envvar:`MODULEPATH` when a
module is loaded during a modulefile evaluation. Such entry was resolved
against the directory of the evaluating modulefile rather than against the
current working directory. A relative *directory* argument of the
:mfcmd:`is-used` modulefile command or of the :subcmd:`unuse` sub-command
is also resolved against the current working directory to recognize such
entry whatever its form.
* Keep non-sticky requirements of sticky modules loaded during a
:subcmd:`purge` and explicitly report why their unload is skipped according
to the :mconfig:`sticky_purge` configuration. (fix issue #582)
* Fix internal error raised by :subcmd:`switch` sub-command when the unload
of the switched-off module fails after some of its dependent modules were
unloaded for reload, and switch sequence continues as ``switch_unload`` is
not set in :mconfig:`abort_on_error`. Dependent modules restored by the
failed unload are not reloaded anymore.
.. _CVE-2026-85013: https://github.com/envmodules/modules/security/advisories/GHSA-8hrw-p88g-qhmg
.. _5.6 release notes:
Modules 5.6.2 (2026-09-07)
--------------------------
* Init: fix command injection in Bash completion when module names contain
shell meta-characters. Completion candidates were passed to ``compgen -W``
which evaluates command substitution syntax. (fix `CVE-2026-85013`_ found
by AISLE in partnership with Red Hat)
Modules 5.6.1 (2025-11-25)
--------------------------
* Script: improve :command:`mrel` to better support Koji states and not rely
on sudo privileges to test a new release.
* Script: adapt utilities to only use :command:`curl` rather also requiring
:command:`wget`.
* Doc: :ref:`CHARTER` has been approved on September 4, 2025.
* Doc: add :ref:`EESSI` design notes.
* Doc: update :ref:`modulefile(5)` man page to describe the :mfcmd:`report`
modulefile command, which is supported since version 4.0.
* Doc: use `Furo`_ Sphinx theme for the documentation published on Read The
Docs.
* Doc: describe how to call modulefile command from a hook procedure in
:ref:`module(1)` man page. (fix issue #590)
* Doc: add warning in :ref:`INSTALL-win` to mention :command:`ml` command name
conflict with *MSVC x86 toolchain* ``ml.exe``. (fix issue #589)
* Doc: add :ref:`maintainer-guide`.
* Doc: website is now located at https://envmodules.io.
* Doc: precise that no automatic path resolution is performed on
:mfcmd:`prepend-path`, :mfcmd:`append-path` or :mfcmd:`remove-path`
modulefile commands. (fix issue #597)
* Doc: add way to build latexpdf documentation.
* Ensure that a module having the same name than a loaded module from
another modulepath does not inherit its tags. (fix issue #599)
* Drop tags stored in memory that applies to a module when unloading it. It
ensures that tags applied to the module when reloaded from a different
modulepath are not inherited.
* Always apply *abort on error* behavior in case a Dependent Reload sticky
(and :option:`--force` is not set) or super-sticky module fails to reload.
(fix issue #601)
* When loading a module, check already loaded modules and their aliases
exactly matching specification before looking at available modules and their
aliases. (fix issue #602)
.. _Furo: https://github.com/pradyunsg/furo
Modules 5.6.0 (2025-07-31)
--------------------------
* Rename :file:`contrib` directory as :file:`share` in sources to use clearer
name for architecture and configuration independent files.
* Set a `Security policy`_ for the project.
* Add red, white and black SVG logo files of Modules project.
* Doc: improve Links, Community sections in documentation index and README
* Doc: improve Authors and Acknowledgments sections in README
* Doc: add :ref:`create-new-release` guide
* Update repository URL to https://github.com/envmodules/modules.
* Install: update :file:`configure` script to allow running it from a current
working directory different than where this file is stored. (fix issue #558)
* Doc: create *Developer HowTos* section on documentation website to group
development how-to guides.
* Doc: add :ref:`acknowledgments` page in the documentation.
* Doc: describe :ref:`GOVERNANCE`.
* Doc: add :ref:`CHARTER`.
* Escape square brackets (``[]``) used in values within produced shell code as
these characters may have special meaning on some shells (like *csh*). (fix
issue #565)
* Doc: advertise the `Modules chat room`_ (``#modules:matrix.org``) to discuss
with the community.
* Doc: describe the :ref:`developer-certificate-of-origin` process now applied
on contributions.
* Doc: add :ref:`add-new-maintainer` guide
* Fix interpreter variable reset between multiple modulefile or modulerc
evaluations when variable initial value is an invalid list. (fix issue #570)
* Fix :mfcmd:`source-sh` and :subcmd:`sh-to-mod` shell translation when used
with new *fish* shell version (4.0).
* Doc: add :ref:`mode-select` design notes.
* Introduce ``use`` extra specifier to search for :envvar:`MODULEPATH` changes
performed with :mfcmd:`module use`, :mfcmd:`append-path` or
:mfcmd:`prepend-path` modulefile commands on :subcmd:`avail`,
:subcmd:`whatis` and :subcmd:`paths` sub-commands.
* Add :option:`--dumpname` option to report name of current Environment
Modules implementation. Here it returns ``Modules``. This option is also
available on Lmod starting version 8.7.50.
* Add the :mfcmd:`depends-on-any` modulefile command, alias over the
:mfcmd:`prereq` command for compatibility with Lmod Tcl modulefiles.
* Add ``depends-on-any`` extra specifier to query modulefile requirement
definitions. The extra specifier aliases ``prereq``, ``prereq-any`` or
``require`` may also be used to query this modulefile command.
* Introduce the :subcmd:`spider` sub-command that lists available modules
found in enabled modulepaths and recursively found in modulepaths enabled by
available modules. After a first step aimed at collecting all modulepaths,
:subcmd:`spider` proceeds and reports like :subcmd:`avail` sub-command. The
same set of options are supported.
* Introduce the :mconfig:`spider_output` and :mconfig:`spider_terse_output`
configuration options to define the content to report in addition to the
available module names respectively for :subcmd:`spider` sub-command regular
and terse output modes. Excepted value for these configuration options is a
colon separated list of elements to report. Default value is
``modulepath:alias:dirwsym:sym:tag:variantifspec:key`` for
:mconfig:`spider_output` and
``modulepath:alias:dirwsym:sym:tag:variantifspec`` for
:mconfig:`spider_terse_output`. These values can be changed at installation
time respectively with the :instopt:`--with-spider-output` and
:instopt:`--with-spider-terse-output` options. These values can then be
superseded by using the :subcmd:`config` sub-command which sets the
:envvar:`MODULES_SPIDER_OUTPUT` and :envvar:`MODULES_SPIDER_TERSE_OUTPUT`
environment variables.
* Introduce the ability to control whether :subcmd:`spider` command search
results should recursively include or not modulefiles from directories
matching search query by use of the :option:`--indepth` and
:option:`--no-indepth` command-line switches or :mconfig:`spider_indepth`
configuration option (that sets :envvar:`MODULES_SPIDER_INDEPTH` environment
variable through :subcmd:`config` command). Default value (enabled) may also
be changed at installation time with
:instopt:`--disable-spider-indepth<--enable-spider-indepth>` option.
* Doc: add :ref:`spider-sub-command` design notes.
* The :subcmd:`lint` sub-command now also lint any readable modulecache files
when no modulefile specification is passed as argument or if
:file:`.modulecache` file location is specifically passed as argument.
* Add the ``hidden`` element in the allowed value list of the
:mconfig:`avail_output`, :mconfig:`avail_terse_output`,
:mconfig:`list_output`, :mconfig:`list_terse_output`,
:mconfig:`spider_output` and :mconfig:`spider_terse_output` configuration
options. When set, it is equivalent to use :option:`--all` option: hidden
modules are shown.
* Produce a single output for multi pattern :subcmd:`avail` search rather than
a separate output for each submitted pattern.
* Produce a single output for multi pattern :subcmd:`whatis` search rather
than a separate output for each submitted pattern.
* Doc: clarify that character used in version specification like *,* and *:*
cannot be used as variant shortcut.
* Introduce :envvar:`__MODULES_LMUSE` environment variable to keep track of
the loaded modules that enable modulepaths.
* Apply modulepath label defined with :mfcmd:`modulepath-label` also on output
of :subcmd:`whatis` and :subcmd:`search` sub-commands.
* Report *via* information for each module entry on JSON output of
:subcmd:`avail` and :subcmd:`spider` sub-commands. *Via* information is the
name of the loaded or interpreted module that enables the modulepath in
which reported modules are stored.
* Add the ``via`` element in the allowed value list of the
:mconfig:`avail_output` and :mconfig:`spider_output` configuration options.
When set, if a modulepath is enabled by a module, this module name is
reported next to the modulepath name. ``via`` element is not available for
terse output mode. ``via`` is set by default in :mconfig:`spider_output`
configuration option.
* Add ``modules_release`` internal state. It will help to know the current
version of Modules within :file:`siteconfig.tcl` script.
* Introduce :mfcmd:`module-help` modulefile command which defines help text to
print when modulefile is evaluated in ``help`` mode.
* Update :mfcmd:`add-property` modulefile command to use its *value* argument
to define tag on currently loading module.
* Doc: add :ref:`module-warn` design notes.
* Add :mfcmd:`module-warn` modulerc and modulefile command which prints a
warning message when designated modulefile is evaluated. This command
accepts options to emit the warning only for specific users, groups or
times.
* Introduce the ``warning`` informational :ref:`module tag` on
modulefiles targeted by :mfcmd:`module-warn` command. Update default
:mconfig:`tag_abbrev` configuration option to add an abbreviation for the
new tag (``W``) and default light and dark color palettes.
* Change light and dark color palettes for ``nearly-forbidden`` tag (red text
with yellow background), to make it look closer to ``forbidden`` tag (red
background) and distinguish it from new ``warning`` tag (black text and
yellow background).
* No raise of *nearly-forbidden* warning when affected modulefile is evaluated
in ``refresh`` mode.
* Issue the *nearly-forbidden* warning at the end of the affected modulefile
evaluation, ensuring it is always reported at the same stage regardless of
where it is defined.
* Change underlying shell code to set environment variable on *sh*, *bash*,
*ksh*, *zsh* and *fish* shells: enclose value within single quotes rather
escaping each special characters.
* :mfcmd:`setenv` modulefile command now supports environment variable value
containing newline character. Exception is made for *csh* and *tcsh* shells
where newline characters are chopped from value. (fix issue #557)
* Sort modules in JSON output as done on regular output.
* :subcmd:`cachebuild` command now sets the minimal Modules version specified
in the cache file magic cookie header to the oldest Modules version
compatible with this cache file, rather than the version that generated the
cache file. Freshly generated cache files are compatible with Modules 5.3
and above.
* Doc: improve :ref:`enable-modules-in-shells` guidelines.
* Doc: add :ref:`man-path` cookbook recipe.
* Doc: add :ref:`other-implementations` document.
* Add :subcmd:`update` sub-command, an alias of :subcmd:`reload`
* Add :subcmd:`disable` sub-command, an alias of :subcmd:`saverm`
* Add :subcmd:`describe` sub-command, an alias of :subcmd:`saveshow`
* Add ``--show_hidden`` option, an alias of :option:`--all`
* Add :mfcmd:`haveDynamicMPATH` modulefile command
* Fix ``use.own`` example modulefile to report when creating local modulefiles
directory. (fix issue #576)
* Doc: add manual page for :ref:`envml(1)` command. (fix issue #190)
* Introduce Emacs addon files to highlight the modulefile syntax. Installation
of these files, which is enabled by default, is controlled by the
:instopt:`--enable-emacs-addons` and :instopt:`--emacsdatadir` configure
options. (contribution from Laurent Besson)
* Add :mconfig:`require_via` configuration option that controls whether or not
a requirement is considered between a module stored in a modulepath and the
loaded module that enables this modulepath. With :ref:`Automated module
handling mechanisms` enabled, modules stored in a
modulepath are unloaded or reloaded when the module enabling this modulepath
is changed. :mconfig:`require_via` is disabled by default but everyone
willing to hierarchically organize their modulefiles is encouraged to enable
this new option. This option can be changed at installation time with
:instopt:`--enable-require-via`. When :mconfig:`require_via` is changed with
:subcmd:`config` sub-command, it sets the :envvar:`MODULES_REQUIRE_VIA`
environment variable.
* Install: installation option :instopt:`--enable-new-features` is updated to
include :instopt:`--enable-require-via`.
* Doc: add :ref:`require-via` design notes.
* Skip reload of a *Dependent Reload* module if it is not found after a change
in enabled modulepaths. Reload of a not found module is attempted only if it
is tagged *super-sticky* or *sticky* and force mode is disabled. Skipped
module is considered *Dependent Unload* module.
* Script: update :command:`mb` tool to skip test for Modules version below 5.5
if Tcl 9 is selected.
* Introduce the :mfcmd:`provide` modulefile command that defines module alias
over currently evaluating module. This helps convey that the module offers
additional functionality or components. (fix issue #539)
* Change :mfcmd:`extensions` modulefile command to be an alias over the
:mfcmd:`provide` command.
* Add the ``provided-alias`` element in the allowed value list of the
:mconfig:`avail_output`, :mconfig:`avail_terse_output`,
:mconfig:`spider_output` and :mconfig:`spider_terse_output` configuration
options. When set, module aliases are included into the output and the
*extra match search* mechanism is activated to scan modulefiles to get the
module aliases they define.
* Doc: add :ref:`provide` design notes.
* Introduce ``provide`` and ``provided-alias`` extra specifiers to search
modules on :subcmd:`avail`, :subcmd:`spider`, :subcmd:`whatis` and
:subcmd:`paths` sub-commands. ``provided-alias`` extra specifier is an alias
onto ``provide`` and ``family`` extra specifiers.
.. _Security policy: https://github.com/envmodules/modules/blob/main/SECURITY.md
.. _Modules chat room: https://matrix.to/#/#modules:matrix.org
.. _5.5 release notes:
Modules 5.5.0 (2024-11-11)
--------------------------
* Init: update ``cmd`` shell initialization script to correctly define
:envvar:`MODULESHOME` when installation pathname contains dot character.
(fix issue #525 with contribution from V-clone)
* Init: add completion for :command:`ml` command on Tcsh shell. (fix issue
#416 with contribution from Laurent Besson)
* Init: fix completion of :subcmd:`mod-to-sh`'s options on Bash and Tcsh
shells.
* Fix modulepath file search when libtclenvmodules is disabled and modulepath
contains glob characters.
* Lib: correct libtclenvmodules to retrieve all user groups on Darwin systems
when user is member of more than 16 groups.
* Script: output testsuite run progress on :command:`mt` development utility.
* Resolve switched-on module prior testing stickiness preservation.
* Contrib: fix versions modulefiles generated when
:instopt:`--enable-versioning` installation option is set. Use ``--not-req``
option on :mfcmd:`module unload` commands to avoid declaring a
conflict toward these modules to unload. (fix issue #531)
* Add :mfcmd:`hide-modulefile` and :mfcmd:`hide-version` modulerc commands to
support modulerc files written for Lmod.
* Update :subcmd:`autoinit` sub-command to define :command:`mogui` shell
function or alias if `mogui-cmd` command is found in :envvar:`PATH`.
* Add the :mconfig:`hide_auto_loaded` configuration option to tag
automatically loaded modules ``hidden-loaded``. These modules will not
appear on :subcmd:`list` sub-command output unless :option:`--all` option is
set. Option is disabled by default and when set, it defines the
:envvar:`MODULES_HIDE_AUTO_LOADED` environment variable.
* Introduce the ``--modulepath`` option to the :mfcmd:`always-load`,
:mfcmd:`depends-on`, :mfcmd:`prereq`, :mfcmd:`prereq-all` and
:mfcmd:`prereq-any` modulefile commands. When this option is set, required
module should be located in a path listed in the specified list or in an
enabled modulepath matching one path of the list. This information is
recorded in loaded environment in :envvar:`__MODULES_LMPREREQPATH` variable.
* Add :mfcmd:`lsb-release` modulefile command to get certain Linux Standard
Base (LSB) information. It accepts to following sub-commands: ``id``,
``codename`` and ``release``.
* Add information logging capabilities controlled by two new configuration
options: :mconfig:`logger` which defines the command to use to sent
information to the log system and :mconfig:`logged_events` which controls
the information sent to logs.
* :mconfig:`logger` configuration option relies on the :command:`logger`
command by default. It can be changed at installation time with
:instopt:`--with-logger` and :instopt:`--with-logger-opts` options. When
:mconfig:`logger` is changed with :subcmd:`config` sub-command, it sets the
:envvar:`MODULES_LOGGER` environment variable. :mconfig:`logger` can be
declared as a locked configuration option in :mconfig:`locked_configs`.
* :mconfig:`logged_events` configuration option is a list of event names
separated by colon character. It is empty by default, thus nothing is logged
by default. Allowed event names are ``requested_cmd`` (log module commands
directly executed by users), ``requested_eval`` (modulefile evaluations
directly asked by users) and ``auto_eval`` (modulefile evaluations
automatically triggered). Option value can be changed at installation time
with :instopt:`--with-logged-events` option. When :mconfig:`logged_events`
is changed with :subcmd:`config` sub-command, it sets the
:envvar:`MODULES_LOGGED_EVENTS` environment variable.
:mconfig:`logged_events` can be declared as a locked configuration option in
:mconfig:`locked_configs`.
* Add ``log`` channel to the :mfcmd:`puts` modulefile command. String message
passed to :mfcmd:`puts log` is sent to the :mconfig:`logger` command.
* Doc: update :ref:`log-module-command` cookbook recipe with integrated
logging feature.
* Install: update :file:`configure` script to ignore all ``--with-*`` options
if no value is associated to them.
* Install: update :file:`configure` script to set option to an empty string if
specified with ``--without-*`` argument. Exception is made for
:instopt:`--without-icase<--with-icase>` which sets option to the ``never``
value.
* Introduce ``not:`` prefix for extra specifier and variant criteria on module
search context. This prefix allows to negate search criteria on :ref:`Extra
match search` mechanism.
* Adopt stricter naming rule for variant names. Only characters within the
``A-Za-z0-9_-`` range are allowed. Also, a variant name cannot start with
``-`` (minus) character and the overall name cannot just be a number.
* Allow ``+`` and ``~`` characters to be part of module name or version
specification as long as the string following them is not a valid variant
name (e.g., ``foo/1.2+8``). (fix issue #527)
* In case of an issue external to Modules, do not mention at the end of the
error stack trace the web link to report this issue. (fix issue #546)
* When a modulefile performs a :mfcmd:`module unload` command that
fails due to dependent modules loaded, stop unload evaluation right after
this failed command unless :option:`--force` option is used.
* Exclude sticky modules from the useless requirement unload mechanism as they
cannot be unloaded.
* Tag automatically loaded module ``auto-loaded`` prior evaluation to be able
to query this state during modulefile evaluation with :mfcmd:`module-info
tags`.
* Doc: describe in :ref:`module(1)` man page how to initialize Modules in a
Ruby script. (fix issue #535)
* Add PowerShell Core (``pwsh``) shell support. (fix issue #326 with
contribution from Simon Lukas Märtens)
* Lib: adapt Modules Tcl extension library to properly load on Tcl 9.
* Doc: describe how to upgrade Modules in :ref:`INSTALL`. (fix issue #544)
* Set exit code returned by :file:`modulecmd.tcl` script to ``1`` when a
modulefile evaluation fails (modulefile does not exist, is buggy, etc).
(fix issue #540)
* Disable pager when running :file:`modulecmd.tcl` script for script language
(*python*, *perl*, *ruby*, *tcl*, *cmake*, *r* and *lisp*). (fix issue #542)
* Update error and warning messages when attempting to unload a module
required by another. Distinguish if this module is a requirement of an
already loaded or a currently loading module.
* Introduce :mconfig:`conflict_unload` configuration option that controls
whether or not conflicting modules and their dependent should be unloaded
when loading a module. All kind of conflicts are supported: conflicts
defined by already loaded modules, conflict declared by loading module
through :mfcmd:`conflict`, :mfcmd:`family` or :mfcmd:`module unload`
commands. :mconfig:`conflict_unload` also handles the unload of a module
that is loaded again but with different variant values or from a different
modulepath. :mconfig:`conflict_unload` is disabled by default as it changes
behaviors of the :envvar:`automated module handling
mode`. But everyone is encouraged to enable this new
option to benefit from an highly automated experience. This option can be
changed at installation time with :instopt:`--enable-conflict-unload`. When
:mconfig:`conflict_unload` is changed with :subcmd:`config` sub-command, it
sets the :envvar:`MODULES_CONFLICT_UNLOAD` environment variable. Both
:mconfig:`auto_handling` and :mconfig:`conflict_unload` options should be
enabled to activate *Conflict Unload* automated behavior. (fix issue #242)
* When both :mconfig:`auto_handling` and :mconfig:`conflict_unload` options
are enabled, all loaded modules matching module specifications set on
:mfcmd:`conflict` or :mfcmd:`module unload` commands are unloaded.
If both options are not enabled, only one matching loaded module per
specification argument of :mfcmd:`module unload` is unloaded. (fix
issue #215)
* When both :mconfig:`auto_handling` and :mconfig:`conflict_unload` options
are enabled, :option:`--force` option set on :subcmd:`load` sub-command is
taken into account during the *Conflict Unload* mechanism. For instance, it
continues this unload process even if one module unload fails.
* Install: installation option :instopt:`--enable-new-features` is updated to
include :instopt:`--enable-conflict-unload`.
* Fix detection of already loaded module with variant set. If trying to load
same module with compatible variant set, a *module is already loaded*
message is now returned instead of *another variant is loaded*.
* Correctly report module evaluation error in case during the same execution
this module was already evaluated and failed silently during a *Requirement
Load* mechanism.
* Split processing of *Dependent Reload* (DepRe) modules to treat the *DepRe*
modules consequence of *Useless Requirement Unload* (UReqUn) modules
separately, right before unloading the *UReqUn* modules. As a result,
modules in conflict with *UReqUn* modules are unloaded right before *UReqUn*
process and reloaded with the other *DepRe* modules.
* Handle *UReqUn* process in case of :subcmd:`switch` sub-command after the
switch load phase. Unload of these modules were previously occurring at the
end of the switch unload phase. Unload of *DepRe* modules consequence of
*UReqUn* modules is also moved after switch load phase.
* Introduce the *Useless Requirement Unload* (UReqUn) process on
:subcmd:`load` sub-command. It eliminates auto loaded modules that were
requirements of *Conflict Unload* modules. In case of :subcmd:`switch`
sub-command, *UReqUn* modules coming from the switch load phase are handled
with *UReqUn* modules coming from switch unload phase.
* Rework handling of *DepRe* modules that also are *UReqUn* modules to unload
them during the *DepRe* unload phase instead of during *UReqUn* process. As
a consequence these modules part of both *DepRe* and *UReqUn* lists are
unloaded prior main module action and prior unload of the other *UReqUn*
modules. The *DepRe* modules may be also qualified *UReqUn* even if they are
not a dependency of a module unloaded in the current processing.
* Mix unload of *Dependent Unload* and *Dependent Reload* modules to ensure
they are processed in their reverse loading order. As a result, if a module
is part of *DepUn* process and some of its requirements are part of *DepRe*
process, requirements are unloaded after their dependent modules.
* Skip reload of a *Dependent Reload* module if found not loadable (either its
requirements are not loaded or a conflict is spotted with loaded
environment). Reload is attempted only if module is tagged *super-sticky* or
*sticky* and force mode is disabled. Skipped module is considered *Dependent
Unload* module.
* Reload all Dependent Reload modules after the main load, unload or switch
module evaluation rather after the sub module evaluation that triggered the
Dependent Reload unload phase.
* Dependent Unload modules of Conflict Unload modules are merged into the
Dependent Reload module list. An attempt to reload these dependent modules
is tried only if their requirements are satisfied by loaded environment.
* When a loading module requires a Dependent Unload module, the unload of this
module was forced when it was triggered by a Conflict Unload or a
switched-off module. The unload of such Dependent Unload module is not
forced anymore by default and an error is raised if a loading module
requiring the Dependent Unload module is detected.
* When unloading Dependent Reload modules, do not force by default this unload
unless asked with :option:`--force` option. As a result an error is obtained
when trying to reload Dependent Reload modules that conflict with other
loaded modules. This error may be by-passed with :option:`--force`
command-line option.
* Move stickiness check when unloading a module prior processing any automated
module handling mechanism. (fix issue #536)
.. warning:: Variant names are now fully checked instead of just verifying
their first character. Only characters within the ``A-Za-z0-9_-`` range are
allowed. Variant name cannot start with ``-`` character and the overall
name cannot just be a number.
.. warning:: Existing *versions* modulefiles generated by
:instopt:`--enable-versioning` installation option and installed for
Modules 4.7 and upward should be manually fixed by adding the ``--not-req``
option to the :mfcmd:`module unload` commands present in these
modulefiles. Following command should fix these files: ``sed -i "s|module
unload|module unload --not-req|" ``.
.. _5.4 release notes:
Modules 5.4.0 (2024-02-20)
--------------------------
* Allow to designate module by its full path file name on :mfcmd:`module-tag`,
:mfcmd:`module-hide` and :mfcmd:`module-forbid`. (fix issue #485)
* Introduce ``tag`` extra specifier to search modules on :subcmd:`avail`,
:subcmd:`whatis` and :subcmd:`paths` sub-commands based on tags applied.
Tag abbreviation may also be used as extra specifier name.
* Add ability to specify multiple names on one extra specifier criterion to
select modules matching any of these names (e.g.,
``env:PATH,LD_LIBRARY_PATH``)
* Add ability to specify multiple values on one variant criterion to select
modules providing any of these variant values (e.g., ``foo=val1,val2``)
* Add the ``indesym`` element in the allowed value list of the
:mconfig:`list_output` and :mconfig:`list_terse_output` configuration
options. When set, symbolic versions are reported as independent elements
rather along the loaded module they are attached to.
* Add the ``alias`` element in the allowed value list of the
:mconfig:`list_output` and :mconfig:`list_terse_output` configuration
options. When set, module aliases targeting loaded modules are reported.
* Introduce :mconfig:`sticky_purge` configuration option to define behavior
when unloading sticky or super-sticky module during a :subcmd:`purge`
command. Raise an ``error`` (default) or emit a ``warning`` or be
``silent``. When set, it defines the :envvar:`MODULES_STICKY_PURGE`
environment variable. Default value can be changed with
:instopt:`--with-sticky-purge` installation option. (fix issue #502)
* Introduce :mfcmd:`modulepath-label` modulerc command, which defines label
used instead of modulepath directory path in :subcmd:`avail` output.
* More than one global rc file can now be specified in :envvar:`MODULERCFILE`
or via :mconfig:`rcfile` configuration option.
* Add the :mconfig:`unique_name_loaded` configuration option to allow, when
enabled, only one module loaded per module name. When set, it defines the
:envvar:`MODULES_UNIQUE_NAME_LOADED` environment variable. Default value
(disabled) can be changed with :instopt:`--enable-unique-name-loaded`
installation option.
* Add :ref:`evaluation-errors` design notes.
* Add :mconfig:`abort_on_error` configuration option to define module
sub-commands that should abort when a module evaluation fails instead of
continuing their evaluation sequence. When configuration option is set, it
defines the :envvar:`MODULES_ABORT_ON_ERROR` environment variable. Default
value can be changed with :instopt:`--with-abort-on-error` installation
option.
* Add support for :mconfig:`abort_on_error` evaluation behavior on
:subcmd:`load`, :subcmd:`mod-to-sh` and :subcmd:`try-load` sub-commands.
* Report issue on modulefile when it fails to load an erroneous requirement
through :mfcmd:`module try-load` modulefile command.
* Doc/Install: modernize modulefile code example in documentation and
installed example modulefiles.
* Vim: correctly highlight modulefile commands containing a dash character.
* Update requirement load error report to place it only under the message
block of the module requiring this load. This change helps to better
understand the chronology of actions and from where an error occurs.
* Do not report requirement load error when an alternative requirement module
is found and loaded afterward. (fix issue #509)
* Do not render an error exit code on multi-module option requirement when
one module option fails to load but another does. (fix issue #510)
* Do not report *module not found* error when loading a requirement if an
alternative requirement module is found and loaded afterward. (fix issue
#511)
* Add ``--glob`` option to :mfcmd:`remove-path` modulefile command in order to
remove any values in variable matching a glob-style pattern.
* Record module specification on which loaded module stickiness applies in
:envvar:`__MODULES_LMSTICKYRULE` environment variable. It helps to determine
if stickiness is satisfied when changing loaded modules. Which was not
working correctly for virtual modules. (fix issue #506)
* Silently ignore cache file when it requires a greater Modules version. (fix
issue #515)
* Doc: move :ref:`modulefile(5)` man page in section 5. (fix issue #518 with
contribution from Laurent Chardon)
* Add :mconfig:`source_cache` configuration option to cache files evaluated in
modulefiles with ``source`` Tcl command. Files sourced multiple times are
only read once when option is enabled. :mconfig:`source_cache` is disabled
by default. When set, it defines the :envvar:`MODULES_SOURCE_CACHE`
environment variable. Default value can be changed with
:instopt:`--enable-source-cache` installation option.
* Add support for :mconfig:`abort_on_error` evaluation behavior on
:subcmd:`unload` sub-command.
* A modulefile is unloaded anyway even if an evaluation error occurs when
:option:`--force` option is used on :command:`ml`, :subcmd:`purge`,
:subcmd:`reload`, :subcmd:`reset`, :subcmd:`restore`, :subcmd:`stash`,
:subcmd:`stashpop`, :subcmd:`switch` and :subcmd:`unload` sub-commands. To
forbid the unload of a modulefile it is recommended to tag it
``super-sticky`` with :mfcmd:`module-tag` command.
* Disable :mconfig:`abort_on_error` when :option:`--force` option is used. In
this case, behavior is to continue when an error occurs.
* Add support for :mconfig:`abort_on_error` evaluation behavior on
:command:`ml` command. *Abort on error* behavior is on by default with
:command:`ml`. Removing it from :mconfig:`abort_on_error`'s value enables
the *continue on error* behavior.
* Add support for :mconfig:`abort_on_error` evaluation behavior on
:subcmd:`reload` command. *Abort on error* behavior is on by default with
:subcmd:`reload`. Removing it from :mconfig:`abort_on_error`'s value enables
the *continue on error* behavior.
* Add support for :mconfig:`abort_on_error` evaluation behavior on
:subcmd:`purge` sub-command.
* Add support for :mconfig:`abort_on_error` evaluation behavior on unload
phase of :subcmd:`switch` command. *Abort on error* behavior is on by
default there. Removing ``switch_unload`` from :mconfig:`abort_on_error`'s
value enables the *continue on error* behavior.
* Add support for :mconfig:`abort_on_error` evaluation behavior on
:subcmd:`switch` command. *Abort on error* behavior is applied if ``switch``
value is set in :mconfig:`abort_on_error` and either switch unload or switch
load phase fails.
* Install: installation option :instopt:`--enable-new-features` is updated to
enable *abort on error* behavior on :subcmd:`load` and :subcmd:`switch`
sub-commands.
* Lib: slightly adapt code of Modules Tcl extension library to properly build
against Tcl 9.0.
* Adapt alias unset shell code for *sh*-kind shells to avoid errors when alias
to unset is not defined.
* Adapt function unset shell code for *sh*-kind shells to avoid errors when
function to unset is not defined.
* No output of *unload of switched-off failed* and *load of switched-on
failed* error messages when :mfcmd:`module switch` command is run
from a modulefile.
* No *Switching* block message report when :mfcmd:`module switch`
command is run from a modulefile.
* Report all error and warning messages locally under *Loading* or *Unloading*
block message rather reporting some of them under the block message of the
main action. These errors and warnings are thus reported where they occur.
* Report switched-on load failure as error rather warning.
* Report switched-on module locating or access issues only once.
* Report conflict error message when it occurs rather than after modulefile
evaluation.
* Update conflict error message to report all conflicting modules name and
version rather conflict module specification.
* Fix conflict error check to avoid reporting both *unloading conflict failed*
and *conflict is loading* messages.
* Raise an error and stop modulefile evaluation when :mfcmd:`module
switch` command fails unless if :option:`--force` option is set.
* When a *useless requirement unload* fails, do not increase error count as
this failure is reported as a warning and main unload process is not
affected.
* Path element equals to delimiter character is allowed on
:mfcmd:`append-path` and :mfcmd:`prepend-path` modulefile commands. (fix
issue #522)
* Add ``bash-eval`` shell mode to :mfcmd:`source-sh` modulefile command and
:subcmd:`sh-to-mod` sub-command. With this mode, the generated output of the
bash shell script is evaluated to get the environment changes instead of
sourcing this script. (fix issue #519)
* Add ``--ignore`` option to :mfcmd:`source-sh` modulefile command to define
shell elements changed by shell script that should be ignored. (fix issue
#503)
* Init: Improve Tcsh shell completion script to complete against existing
files when pattern starts with ``/``, ``.`` or ``~/``. (fix issue #523)
* Add ``--user`` option to :mfcmd:`module-forbid`, :mfcmd:`module-hide` and
:mfcmd:`module-tag` modulefile commands to forbid, hide or tag only if user
is listed in the value of this new option. (fix issue #520 with contribution
from Jérémy Déchard)
* Add ``--group`` option to :mfcmd:`module-forbid`, :mfcmd:`module-hide` and
:mfcmd:`module-tag` modulefile commands to forbid, hide or tag only if one
user's group is listed in the value of this new option. (fix issue #520 with
contribution from Jérémy Déchard)
.. _5.3 release notes:
Modules 5.3.2 (2026-09-07)
--------------------------
* Init: fix command injection in Bash completion when module names contain
shell meta-characters. Completion candidates were passed to ``compgen -W``
which evaluates command substitution syntax. (fix `CVE-2026-85013`_ found
by AISLE in partnership with Red Hat)
Modules 5.3.1 (2023-06-27)
--------------------------
* Fix additional `ShellCheck`_ warning reports over sh and bash shell scripts.
* Install: distribute ``ChangeLog`` as a zipped file to reduce installation
size. As a consequence, :command:`gzip` becomes a requirement when building
Modules from git repository.
* Install: adapt RPM spec file to install module initialization script for
fish as configuration snippet for this shell.
* Fix extra specifier search to evaluate module matching requirement query.
(fix issue #494)
* Fix extra specifier requirement search when module searched is also defining
a requirement and is the sole module to define it. (fix issue #495)
* Script: update :command:`pre-commit` and :command:`commit-msg` git hook
scripts to use `Hunspell`_ as spell checker instead of Aspell.
* Fix unaligned :subcmd:`list` output when 100 or more modules are loaded.
(fix issue #496)
* Fix extra specifier search when an identical module name and version is
available in several modulepaths. (fix issue #497)
* Do not match module commands with :mfcmd:`--not-req` option set on
``require`` or ``incompat`` extra specifier queries. (fix issue #498)
* When one variant is specified multiple times on search context
(:subcmd:`avail`, :subcmd:`paths` or :subcmd:`whatis` sub-commands),
available modules returned are those providing all variant values set. (fix
issue #499)
* Add the ``indesym`` element in the allowed value list of the
:mconfig:`avail_output` and :mconfig:`avail_terse_output` configuration
options. When set, symbolic versions are reported as independent elements
rather along the module or directory they are attached to.
* Init: fix completion scripts to report module symbolic versions and aliases
among available modules. (fix issue #500)
.. _Hunspell: https://hunspell.github.io/
Modules 5.3.0 (2023-05-14)
--------------------------
* Add :ref:`module-cache` design notes.
* Add :subcmd:`cachebuild` sub-command to create cache for modulepaths
enabled or specified on the command line. Cache files are named
``.modulecache`` and stored at the root of modulepath directories.
* Add :subcmd:`cacheclear` sub-command to delete cache file in all enabled
modulepaths.
* Use cache file if available rather search the content of modulepath
directories when searching for modules (e.g., during :subcmd:`avail`,
:subcmd:`load`, :subcmd:`display`, etc).
* Script: add cache-enabled version of *avail*, *whatis* and *load* tests on
:command:`mb` benchmark utility.
* Add the :mconfig:`ignore_cache` configuration option to ignore module cache
file. Option is disabled by default and when set, it defines
:envvar:`MODULES_IGNORE_CACHE` environment variable.
* Add :option:`--ignore-cache` command-line switch to enable
:mconfig:`ignore_cache` configuration option and ignore module cache file
for current execution.
* Add :mconfig:`cache_buffer_bytes` configuration option to define buffer size
when reading or writing cache files. Option is set to ``32768`` by default.
When set it defines :envvar:`MODULES_CACHE_BUFFER_BYTES` environment
variable.
* Add :mconfig:`cache_expiry_secs` configuration option that defines the
number of seconds a cache file is considered valid after being generated.
Option is set to ``0`` by default which means cache files never expire. When
option is set it defines :envvar:`MODULES_CACHE_EXPIRY_SECS` environment
variable.
* Modulefiles and directories that are not accessible by everyone are not
recorded in cache file. A *limited access* directive is recorded instead to
indicate these modulefiles have to be tested and directories have to be
walked down to determine what the running user can access.
* Doc: update :ref:`reduce-io-load` cookbook recipe with module cache
description.
* Correctly apply extra tag set when loading a module whose variant has value
automatically set. (fix issue #484)
* Catch collection directory creation error and report appropriate message.
(fix issue #482)
* Fix :mfcmd:`source-sh` and :subcmd:`sh-to-mod` shell alias translation when
used with new *fish* shell version (3.6).
* Install: allow to build Modules from a short-depth git repository. (fix
issue #486)
* Install: ensure git log format is not influenced by user's configuration in
:command:`gitlog2changelog.py`. (fix issue #487)
* Init: fix bash shell completion script to be able to complete full name of
available modules. (fix issue #490)
* Install: move license name to SPDX format in RPM spec file.
* Doc: add :ref:`extra-match-search` design notes.
* Introduce *extra match search* mechanism that evaluates available
modulefiles during a module search to find those matching an extra query
on a variant value, a dependency or an environment variable definition.
During this specific evaluation, modulefiles are interpreted in *scan*
mode.
* ``scan`` string is returned by :mfcmd:`module-info mode` when
queried during a *scan* modulefile evaluation.
* Add the ``variant`` element in the allowed value list of the
:mconfig:`avail_output` and :mconfig:`avail_terse_output` configuration
options. When set, variants and their possible values are reported along the
module they are associated to on :subcmd:`avail` command output. Adding
variant information to this output activates the *extra match search*
mechanism that scan modulefiles to find variants they define. (fix issue
#407)
* Apply graphic rendition of default version (``de`` SGR key) to default
variant value on either :subcmd:`list` and :subcmd:`avail` command output.
* Apply either loaded or auto-loaded graphic rendition to the loaded variant
value on :subcmd:`avail` command output.
* Update :subcmd:`avail`, :subcmd:`paths` and :subcmd:`whatis` sub-commands to
take into account variant set in module specification. Available modules are
filtered with *extra match search* mechanism to only return those matching
the variant specification.
* Update :subcmd:`avail`, :subcmd:`paths` and :subcmd:`whatis` sub-commands to
accept module specification with just a variant set (no module name and
version). Available modules are filtered with *extra match search* mechanism
to only return those matching the variant specification.
* Update :subcmd:`list` sub-command to accept module specification with just a
variant set (no module name and version). Loaded modules are filtered to
only return those matching the variant specification.
* Highlight searched variant name and value (``hi`` SGR key) on either
:subcmd:`list` and :subcmd:`avail` command output.
* Doc: add :ref:`Extra match search` description in :ref:`module(1)` man page.
* Introduce *extra specifiers* to query content of modulefiles. *Extra
specifiers* can be specified with *element:name* syntax as part of module
specification on module search commands (:subcmd:`avail`, :subcmd:`paths`
and :subcmd:`whatis`). For instance with the ``module avail
append-path:PATH`` command, all modulefiles defining the ``append-path``
command on ``PATH`` environment variable are returned.
* Add ``variant`` extra specifier to query modulefile variant definitions.
(fix issue #408)
* Add ``setenv``, ``unsetenv``, ``append-path``, ``prepend-path``,
``remove-path`` and ``pushenv`` extra specifiers to query modulefile
environment variable definitions. The extra specifier alias ``envvar`` may
also be used to query any of these modulefile commands.
* Add ``complete`` and ``uncomplete`` extra specifiers to query modulefile
shell completion definitions.
* Add ``set-alias`` and ``unset-alias`` extra specifiers to query modulefile
shell alias definitions.
* Add ``set-function`` and ``unset-function`` extra specifiers to query
modulefile shell function definitions.
* Add ``chdir`` extra specifier to query modulefile current working directory
change definitions.
* Add ``family`` extra specifier to query modulefile family definitions.
* Add ``prereq``, ``prereq-any``, ``prereq-all``, ``depends-on``,
``always-load``, ``load``, ``load-any``, ``try-load``, ``switch`` and
``switch-on`` extra specifiers to query modulefile requirement definitions.
The extra specifier alias ``require`` may also be used to query any of these
modulefile commands.
* Add ``conflict``, ``unload``, ``switch`` and ``switch-off`` extra specifiers
to query modulefile incompatibility definitions. The extra specifier alias
``incompat`` may also be used to query any of these modulefile commands.
* Requirement and incompatibility extra specifiers accept module specification
as value.
* Doc: add :ref:`Extra specifier` description in :ref:`module(1)` man page.
* Mark loaded modules as qualified for refresh evaluation when they send
content to ``stdout`` or ``prestdout`` channels with :mfcmd:`puts`
modulefile command. (fix issue #488)
* Add the :mconfig:`ignore_user_rc` configuration option to skip evaluation of
user-specific module rc file. Option is disabled by default and when set, it
defines :envvar:`MODULES_IGNORE_USER_RC` environment variable.
* Add :option:`--ignore-user-rc` command-line switch to enable
:mconfig:`ignore_user_rc` configuration option and ignore user-specific
module rc file for current execution.
* Add the ``variantifspec`` element in the allowed value list of the
:mconfig:`avail_output` and :mconfig:`avail_terse_output` configuration
options. Set this new element in the default value list of both options.
When set and if a variant is specified in search query, variants and their
possible values are reported along the module they are associated to on
:subcmd:`avail` command output.
* Accept value starting with ``+`` or ``-`` characters on
:option:`--output`/:option:`-o` command-line switches to indicate value
should respectively be appended to or subtracted from current configuration
option value.
* Accept value starting with ``+`` or ``-`` characters on
:mconfig:`avail_output`, :mconfig:`avail_terse_output`,
:mconfig:`list_output`, :mconfig:`list_terse_output`, :mconfig:`colors`,
:mconfig:`protected_envvars`, :mconfig:`shells_with_ksh_fpath`,
:mconfig:`tag_abbrev`, :mconfig:`tag_color_name`,
:mconfig:`variant_shortcut` configuration options to indicate value
should respectively be appended to or subtracted from current configuration
option value.
* Fix :subcmd:`switch` sub-command not to unload *sticky* module when
switched-on module does not exist. (fix issue #492)
.. _5.2 release notes:
Modules 5.2.0 (2022-11-08)
--------------------------
* Introduce the ``--optional`` option on :mfcmd:`prereq`, :mfcmd:`prereq-all`,
:mfcmd:`depends-on` and :mfcmd:`always-load` modulefile commands. Expressed
optional dependency is considered satisfied even if modulefile is not
loaded. If optional requirement is loaded afterward, dependent module is
automatically reloaded, unless if the :mconfig:`auto_handling` configuration
option is disabled.
* A dependency expressed in modulefile with :mfcmd:`module try-load`
command is considered optional. Dependent module is automatically reloaded
if the optional requirement is loaded afterward, unless if the
:mconfig:`auto_handling` configuration option is disabled.
* Raise error in case of unknown or misplaced option set on :mfcmd:`prereq`,
:mfcmd:`prereq-all`, :mfcmd:`depends-on` or :mfcmd:`always-load` modulefile
commands.
* Add the :option:`--timer` command-line switch to report the total execution
time of the :command:`module` command. Also report the execution time of
every internal procedure calls when mixed with :option:`--debug` option.
* Init: move :envvar:`PATH` setup (to locate Modules' binaries location) from
shell initialization scripts to the :subcmd:`autoinit` sub-command. (fix
issue #462)
* Init: move :envvar:`MANPATH` setup (to locate Modules' man-pages) from
shell initialization scripts to the :subcmd:`autoinit` sub-command. (fix
issue #462)
* Init: move shell completion setup from shell initialization scripts to the
:subcmd:`autoinit` sub-command. (fix issue #462)
* Enclose installation path references in shell code produced by
:subcmd:`autoinit`, in initialization scripts and Makefiles to guaranty
correct evaluation in case these paths contain a space character. Note that
the quarantine mechanism is not compatible with such installation paths.
* Fix :mfcmd:`source-sh` and :subcmd:`sh-to-mod` when used with *fish* shell
script if ``regex-easyesc`` fish option is enabled. (fix issue #463)
* Add the :mconfig:`protected_envvars` configuration option to define a list
of environment variables that cannot be modified by modulefile commands.
When set, :mconfig:`protected_envvars` defines
:envvar:`MODULES_PROTECTED_ENVVARS` environment variable. (fix issue #429
with contribution from Adrien Cotte)
* Introduce the :subcmd:`lint` sub-command to statically analyze syntax of
modulefiles, modulerc and global/user rc. (fix issue #451)
* Add the :mconfig:`tcl_linter` configuration option to define the program
used to analyze files with :subcmd:`lint` sub-command. This option is set to
``nagelfar.tcl`` by default. When changed from default value, the
:envvar:`MODULES_TCL_LINTER` environment variable is defined. Default value
can be changed with :instopt:`--with-tcl-linter` and
:instopt:`--with-tcl-linter-opts` installation options.
* Add the :instopt:`--enable-nagelfar-addons` installation option (enabled by
default) to install specific syntax databases and plugins to lint
modulefiles, modulerc and global/user rc with `Nagelfar`_. These files are
installed in the directory designated by the :instopt:`--nagelfardatadir`
(``DATAROOTDIR/nagelfar`` by default).
* Doc: add :ref:`lint-sub-command` design notes.
* Install: use :command:`install` command rather :command:`cp` or
:command:`mkdir` to install Modules and guaranty consistent permission modes
on deployed files.
* Also unset :mfcmd:`pushenv` value stacks on :subcmd:`clear` sub-command.
* Doc: add :ref:`mod-to-sh-sub-command` design notes.
* Introduce the :subcmd:`mod-to-sh` sub-command to translate designated
modulefile(s) into code for specified shell. (fix issue #447)
* Make :subcmd:`source` sub-command accepts modulefile specification as
argument. If argument does not correspond to a file path, search it among
available modulefiles. (fix issue #424)
* Doc: clarify :mfcmd:`set-alias` only define shell alias and not shell
function.
* Add the ability to filter the list of collections returned by
:subcmd:`savelist` sub-command. Filtering pattern is matched in a case
insensitive manner by default.
* Add support for :option:`--starts-with` and :option:`--contains` options on
:subcmd:`savelist` sub-command.
* Highlight all search patterns on :subcmd:`list` sub-command output instead
of only the first one..
* Highlight all search patterns on :subcmd:`savelist` sub-command output.
* Add support for :option:`--all` option on :subcmd:`savelist` sub-command not
to limit result to the collection matching currently defined
:mconfig:`collection_target`.
* Doc: add :ref:`Shell support` section in :ref:`modulefile(5)` man page to
describe how shells support the different kind of environment changes that
can be defined in modulefiles.
* Record during :subcmd:`autoinit` sub-command the initial environment state
in :envvar:`__MODULES_LMINIT`. Enabled modulepaths and loaded modulefiles
through :file:`modulespath` and :file:`initrc` initialization configuration
files are recorded in this new environment variable.
* Add :subcmd:`reset` sub-command to restore initial environment. It takes
recorded environment in :envvar:`__MODULES_LMINIT` and restores it.
* Initial environment is restored when collection name specified on
:subcmd:`restore` sub-command equals ``__init__``.
* When no argument is provided to :subcmd:`restore` sub-command and if
*default* collection does not exist, initial environment is restored.
* Initial environment content is displayed when collection name specified on
:subcmd:`saveshow` sub-command equals ``__init__``.
* When no argument is provided to :subcmd:`saveshow` sub-command and if
*default* collection does not exist, initial environment content is
displayed.
* Add :mconfig:`reset_target_state` configuration option to determine behavior
of :subcmd:`reset` sub-command. When set to ``__init__`` (default value)
initial environment is restored. When set to ``__purge__``, a
:subcmd:`purge` sub-command is performed. Any other value, corresponds to
the name of a collection to :subcmd:`restore`. When set,
:mconfig:`reset_target_state` defines :envvar:`MODULES_RESET_TARGET_STATE`
environment variable.
* Doc: add :ref:`initial-environment` design notes.
* Unload *sticky* modules on :subcmd:`restore` and :subcmd:`reset`
sub-commands to fully set environment in collection or initial state.
* Testsuite: add *lint* testsuite to validate syntax of shell and Tcl scripts
of this project. This testsuite can be invoked with ``make testlint`` or
``script/mt lint``. sh, bash and ksh scripts are checked with `ShellCheck`_
tool and tcl scripts are checked with `Nagelfar`_.
* Update :file:`modulecmd.tcl` code and add Nagelfar inline comments to fix
linter reports.
* Script: add usage message and support for ``-h``/``--help`` option on
:command:`mrel`, :command:`mpub`, :command:`mt`, :command:`mtreview`,
:command:`nglfar2ccov`, :command:`mb` and :command:`mlprof` development
utilities.
* Doc: describe :command:`script/mt` and :command:`script/mb` utilities in
:ref:`CONTRIBUTING` guide.
* Fix `ShellCheck`_ error, warning and info reports over all sh, bash and ksh
shell scripts. (fix issue #470 with contribution from Lukáš Zaoral)
* Init: update profile script for sh-like shells to only source sh or bash
initialization script when BASH environment variable is found set. (fix
issue #473)
* Add :subcmd:`stash` sub-command to save current environment and restore
initial one.
* Add :subcmd:`stashpop` sub-command to restore stash collection then delete
this collection file.
* Add :subcmd:`stashrm` sub-command to delete stash collection file.
* Add :subcmd:`stashshow` sub-command to display stash collection file.
* Add :subcmd:`stashclear` sub-command to delete all stash collection files.
* Add :subcmd:`stashlist` sub-command to list all stash collection files.
* Update :subcmd:`savelist` sub-command to filter out stash collections unless
if :option:`--all` option is set.
* Doc: ensure current user environment does not break logging system in
:ref:`log-module-command` recipe. (fix issue #475)
* Rename the default git branch from *master* to *main* to use inclusive
terminology.
* Mark loaded modules that could benefit from a refresh evaluation in the
:envvar:`__MODULES_LMREFRESH` environment variable.
* Optimize :subcmd:`refresh` sub-command to only evaluate loaded modules that
defines volatile environment changes (shell completion, alias or function).
(fix issue #477)
* Add :sitevar:`modulefile_extra_cmds` hook variable that could be defined in
:file:`siteconfig.tcl` file to define specific commands in modulefile
interpreter context. :sitevar:`modulefile_extra_cmds` is a list of command
name and relative procedure pairs. (fix issue #286)
* Add :sitevar:`modulefile_extra_vars` hook variable that could be defined in
:file:`siteconfig.tcl` file to define specific variables in modulefile
interpreter context. :sitevar:`modulefile_extra_vars` is a list of variable
name and value pairs. (fix issue #286)
* Add :sitevar:`modulerc_extra_cmds` hook variable that could be defined in
:file:`siteconfig.tcl` file to define specific commands in modulerc
interpreter context. :sitevar:`modulerc_extra_cmds` is a list of command
name and relative procedure pairs. (fix issue #286)
* Add :sitevar:`modulerc_extra_vars` hook variable that could be defined in
:file:`siteconfig.tcl` file to define specific variables in modulerc
interpreter context. :sitevar:`modulerc_extra_vars` is a list of variable
name and value pairs. (fix issue #286)
* Doc: Add :ref:`Site-specific configuration` section in :ref:`module(1)` man
page.
* Doc: extend :ref:`Collections` section with examples in :ref:`module(1)` man
page.
.. _Nagelfar: http://nagelfar.sourceforge.net/
.. _ShellCheck: https://www.shellcheck.net/
.. _5.1 release notes:
Modules 5.1.1 (2022-05-31)
--------------------------
* Install: add :command:`rpmlint` rc configuration file to filter false
positive warning messages.
* Install: better guess ``libdir64`` and ``libdir32`` directory locations
when ``libdir`` does not end with *64* but contains *64*.
* Install: update RPM spec file to move libtclenvmodules in an
environment-modules directory under ``libdir``.
* Fix rendering of loading or unloading module designation when configured
color palette does not set the ``hi`` color key. (fix issue #455)
* Remove the *already loaded* message displayed when verbosity level is higher
or equal to ``verbose2`` if new tags are applied to the loaded module. (fix
issue #456)
* Report a global known error when current working directory cannot be
retrieved due to the removal of this directory. (fix issue #457)
* Update tags set through :mfcmd:`prereq` command on all already loaded
requirements. (fix issue #459)
* Update module designation with the tags set by reloading dependent module.
(fix issue #460)
* Install: include the ``lib/config.guess`` and ``lib/config.sub`` scripts in
distribution tarball if generated by :command:`autoreconf`.
* Install: call ``git`` command in ``Makefile`` only if the definitions of
``version.inc`` need to get built or refreshed.
Modules 5.1.0 (2022-04-30)
--------------------------
* Allow to declare :mfcmd:`variant` with no list of accepted value. Such
variant accepts any value specified. (fix issue #405)
* Add the :mconfig:`redirect_output` configuration option to control on *sh*,
*bash*, *ksh*, *zsh* and *fish* shells whether or not the output of the
:command:`module` function should be redirected from stderr to stdout. When
set, :mconfig:`redirect_output` defines :envvar:`MODULES_REDIRECT_OUTPUT`
environment variable.
* Introduce the :option:`--redirect`/:option:`--no-redirect` command-line
switches to supersede the value of the :mconfig:`redirect_output`
configuration option on *sh*, *bash*, *ksh*, *zsh* and *fish* shells. (fix
issue #410)
* Add the ``--return-value`` option to the :mfcmd:`getenv` and
:mfcmd:`getvariant` modulefile commands to force to return the value of
respectively designated environment variable or variant when modulefile is
evaluated in *display* mode. (fix issue #422)
* Introduce the :subcmd:`state` sub-command to display Modules states.
* Add the ``supported_shells`` state to get the list of the shells that are
supported by :file:`modulecmd.tcl` through the :subcmd:`state` sub-command .
(fix issue #426)
* Filter out the variables intended for Modules private usage when processing
the environment changes made by a script evaluated by :subcmd:`sh-to-mod`
sub-command or :mfcmd:`source-sh` modulefile command. (fix issue #427)
* Doc: add :ref:`control-mode-behaviors` design notes.
* Doc: add :ref:`add-new-config-option` design notes.
* Set a `Code of conduct`_ for the project and its community based on the
widely adopted Contributor Covenant.
* Doc: add :ref:`add-new-sub-command` design notes.
* Add the ``--remove-on-unload`` option to the :mfcmd:`remove-path` to also
remove value when modulefile is unloaded.
* Raise error when an unknown option is set on :mfcmd:`module use` or
:mfcmd:`module unuse` modulefile command.
* Rework emitted debug messages to remove obvious ones and systematically
report each modulefile command processed with their arguments.
* Add the ``--append-on-unload`` option to the :mfcmd:`remove-path` and
:mfcmd:`module unuse` modulefile commands to append back when
modulefile is unloaded the value removed at load time or a specific value
set after this option.
* Add the ``--prepend-on-unload`` option to the :mfcmd:`remove-path` and
:mfcmd:`module unuse` modulefile commands to prepend back when
modulefile is unloaded the value removed at load time or a specific value
set after this option.
* Add the ``--noop-on-unload`` option to the :mfcmd:`unsetenv`,
:mfcmd:`remove-path` and :mfcmd:`module unuse` modulefile commands
to perform no operation when modulefile is unloaded.
* Add the ``--unset-on-unload`` option to the :mfcmd:`unsetenv` modulefile
command to also unset environment variable when modulefile is unloaded.
* Add the ``--set-if-undef`` option to the :mfcmd:`setenv` modulefile command
to set environment variable when modulefile is loaded only this variable is
not yet defined.
* Install: add the :instopt:`--with-bashcompletiondir`,
:instopt:`--with-fishcompletiondir` and :instopt:`--with-zshcompletiondir`
installation options to install shell completion scripts in their
system-wide location. (fix issue #428)
* Doc: add :ref:`lmod-tcl-modulefile-compat` design notes.
* Introduce the ``add-property``, ``remove-property`` and ``extensions``
modulefile commands for compatibility with Lmod Tcl modulefiles. These
commands are evaluated as a *no-operation* command.
* Introduce the :mfcmd:`prereq-any` modulefile command for compatibility with
Lmod Tcl modulefiles. :mfcmd:`prereq-any` is an alias of :mfcmd:`prereq`
command.
* Produce a clear error message when wrong number of argument is received by
:mfcmd:`prereq` command.
* Doc: describe :mfvar:`ModulesVersion` in *Modules Variables* section in
:ref:`modulefile(5)` man page.
* Set ``ModuleVersion`` as an alias over :mfvar:`ModulesVersion` modulefile
variable for compatibility with Lmod Tcl modulefiles.
* Doc: describe :mfcmd:`reportError` and :mfcmd:`reportWarning` modulefile
commands.
* Add the :mfcmd:`require-fullname` modulefile command for compatibility with
Lmod Tcl modulefiles. This command aborts modulefile *load* evaluation if
modulefile's name is not fully specified.
* Add the :mfcmd:`prereq-all` modulefile command, alias over the
:mfcmd:`prereq` command which acts as an *AND* operation when multiple
modulefiles are specified.
* Add the :mfcmd:`depends-on` modulefile command, alias over the
:mfcmd:`prereq-all` command for compatibility with Lmod Tcl modulefiles.
* Introduce the ``keep-loaded`` :ref:`module tag` that avoids an
auto-loaded module to get automatically unloaded when its dependent modules
are getting unloaded. Update default :mconfig:`tag_abbrev` configuration
option to add an abbreviation for the new tag (``kL``) and default light and
dark color palettes.
* Add the :mfcmd:`always-load` modulefile command for compatibility with Lmod
Tcl modulefiles. This command loads designated modulefile and applies the
``keep-loaded`` tag to it.
* Add the :subcmd:`load-any` sub-command and :mfcmd:`module load-any`
modulefile command for compatibility with Lmod Tcl modulefiles. This command
loads one modulefile from specified list.
* Add support for ``--not-req`` option on :mfcmd:`module try-load` and
:mfcmd:`module load-any` modulefile commands.
* Doc: add :ref:`magic-cookie-check` design notes.
* Add the :mconfig:`mcookie_check` configuration option that control whether
the magic cookie at the start of modulefile (i.e., ``#%Module`` file
signature) need to get checked or not. When set to ``eval`` the number of
file checks is significantly reduced when walking through modulepaths to
search for modulefiles. Default value for this option is overridden by the
:envvar:`MODULES_MCOOKIE_CHECK` environment variable.
* Doc: describe :mfcmd:`puts` Tcl command and its specific feature when used
in modulefile.
* Create the ``prestdout`` channel for :mfcmd:`puts` modulefile command to be
able to send content that will be evaluated in current shell session prior
any other content. (fix issue #432)
* Add the :mfcmd:`family` modulefile command for compatibility with Lmod Tcl
modulefiles. This command defines family name as a module alias over
currently loading module and express a conflict over this name to ensure
only one member of a family can be loaded in user environment.
:mfcmd:`family` also defines the :envvar:`MODULES_FAMILY_\` and
:envvar:`LMOD_FAMILY_\` environment variables.
* Doc: add :ref:`reduce-io-load` cookbook recipe.
* Add the ability to filter the list of loaded modules returned by
:subcmd:`list` sub-command. Filtering pattern could be part of module name,
symbolic version or alias and is matched in a case insensitive manner by
default. It could also leverage the :ref:`Advanced module version
specifiers` syntax.
* Add support for :option:`--starts-with` and :option:`--contains` options on
:subcmd:`list` sub-command.
* Doc: add :ref:`shell-completion` design notes.
* Introduce :mfcmd:`complete` and :mfcmd:`uncomplete` modulefile commands to
respectively enable and disable shell completion for a given command name.
*bash*, *tcsh* and *fish* shells are supported.
* Track shell completion changes of *bash*, *tcsh* and *fish* shell scripts on
:subcmd:`sh-to-mod` sub-command and :mfcmd:`source-sh` modulefile command.
* Fix typos found in code, tests and documentation. (contribution from Dimitri
Papadopoulos Orfanos)
* Update the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to support
nested function definition on fish shell.
* Fix the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to correctly
detect functions with a ``_`` character in their name on fish shell.
* Update the :command:`module` shell function definition for sh-kind shell to
enclose the output generated by :file:`modulecmd.tcl` in quotes in order to
pass it to the eval command. This change fixes definition of shell function,
especially when coming from shell script evaluation over the
:subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms. (fix issue #434)
* Fix csh shell alias detection on :subcmd:`sh-to-mod` and :mfcmd:`source-sh`
mechanisms when enclosed in parenthesis. (fix issue #434)
* Include for fish shell environment analysis on :subcmd:`sh-to-mod` and
:mfcmd:`source-sh` mechanisms the private functions defined by evaluated
script, in order to catch all definitions that may be useful for shell
completion.
* Fix the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to correctly
detect empty function on fish shell.
* Script: add :command:`pre-commit` git hook script to help verify if commits
are free of misspellings (with `codespell`_ tool) and trailing spaces.
* Doc: fix typos found in documentation with Aspell utility.
* Doc: describe :ref:`Dependencies between modulefiles` in
:ref:`modulefile(5)` man page. (fix issues #431 and #433)
* Script: update :command:`pre-commit` git hook script to spell check
documentation files with `Aspell`_ tool.
* Script: add :command:`commit-msg` git hook script to spell check commit
message with `Aspell`_ tool.
* Doc: clarify that ``#%Module`` is a file signature also called Modules magic
cookie.
* Doc: update the :ref:`module ENVIRONMENT` section in :ref:`module(1)` man
page to provide for each Modules environment variable the name of the
configuration option that could be used to set the variable with the
:subcmd:`config` sub-command.
* Doc: clarify in :ref:`module(1)` man page that
:envvar:`MODULES_SET_SHELL_STARTUP`, :envvar:`MODULES_SHELLS_WITH_KSH_FPATH`
and :envvar:`MODULES_WA_277` should be set prior Modules initialization to
get taken into account.
* Doc: update :ref:`INSTALL` document to provide the name of the configuration
option linked the installation options.
* Doc: describe in :ref:`module(1)` man page the default value of each
configuration option and linked installation option and command-line
switches.
* Doc: add *Configuration options* section in :ref:`INSTALL` document with a
table summarizing all configuration options and their relative installation
options and environment variables.
* Add the :mfcmd:`pushenv` modulefile command for compatibility with Lmod Tcl
modulefiles. This command sets designated environment variable with
specified value and save the previous value set to restore it when the
modulefile is unloaded. Previous values are saved in a
:envvar:`__MODULES_PUSHENV_\` environment variable.
* Doc: add :ref:`Compatibility with Lmod Tcl modulefile` section in
:ref:`modulefile(5)` man page.
* Update definition of the ``module()`` python function and python
initialization script to explicitly send output to ``sys.stderr`` to get the
ability to catch this content.
* Lib: handle ``sysconf`` error in function implementing the
``initStateUsergroups`` procedure. (contribution from Lukáš Zaoral)
* Introduce the :option:`--tag` option for the :subcmd:`load`,
:subcmd:`try-load`, :subcmd:`load-any`, :subcmd:`switch` sub-commands and
associated :mfcmd:`module` modulefile commands and :mfcmd:`prereq`,
:mfcmd:`prereq-all`, :mfcmd:`depends-on` and :mfcmd:`always-load` modulefile
commands. This new option applies specified tags to the module to load.
* Record tags set to loaded modules with the :option:`--tag` option in the
:envvar:`__MODULES_LMEXTRATAG` environment variable to make this information
persists after module being loaded.
* When saving a collection, record loaded module tags set with the
:option:`--tag` option and those resulting from module load states (like
``auto-loaded`` and ``keep-loaded``). The ``--notuasked`` string previously
used to designate auto-loaded modules in collection is changed into the
``--tag=auto-loaded`` option.
* Introduce the :mconfig:`collection_pin_tag` configuration option, that
records in collection all tags set on loaded modules when enabled. Option is
disabled by default and when set it defines the :envvar:`MODULES_COLLECTION\
_PIN_TAG` environment variable.
* When a collection is saved, its content starts with a ``#%Module5.1`` file
signature if :option:`--tag` option is recorded in it.
* Update the :subcmd:`restore`, :subcmd:`savelist`, :subcmd:`saveshow` and
:subcmd:`is-saved` sub-commands to exclude from result or return an error
when checking a collection expressing a higher Modules version requirement
in its header signature than the one currently in use.
* Doc: describe :ref:`differences between run-command file and modulefile
interpretation` in
:ref:`modulefile(5)` man page.
* Doc: describe :mfcmd:`module` sub-commands available as modulefile Tcl
command for each interpretation context in :ref:`modulefile(5)` man page.
* When loading a module with some extra tags defined through the
:option:`--tag` option, if this module is already loaded the new tags are
added to those already set.
* When reporting result of :subcmd:`avail` or :subcmd:`list` sub-commands,
enclose module names in single quotes if they contain a space character.
* When mentioning the loading, unloading or refreshing evaluation of a module,
report the tags associated to this module as done when printing results of
:subcmd:`list` sub-command.
* Fix :ref:`log-module-command` cookbook recipe not to break Modules
initialization when using provided :file:`siteconfig.tcl` file. (fix issue
#453 with contribution from Eric Burgueño)
* Mention tagging evaluation of a module, when tag list of an already loaded
module is updated.
.. _Code of conduct: https://github.com/envmodules/modules/blob/main/CODE_OF_CONDUCT.md
.. _codespell: https://github.com/codespell-project/codespell
.. _Aspell: http://aspell.net/
.. _5.0 release notes:
Modules 5.0.1 (2021-10-16)
--------------------------
* Doc: add *How to preserve my loaded environment when running screen* entry
in :ref:`FAQ`.
* Fix the advanced version specifier resolution when the
:mconfig:`extended_default` option is off and :mconfig:`icase` option is on
when resolving version list specification. (fix issue #411)
* Doc: improve the :ref:`log-module-command` cookbook to rely on the ``trace``
Tcl command to track every modulefile evaluation and module/ml procedure
calls. (fix issue #412)
* Doc: fix missing space between list entries in :ref:`variants` design doc.
(fix issue #413)
* Correctly detect tags set on loaded modules when refreshing them.
* Set the :envvar:`__MODULES_AUTOINIT_INPROGRESS` environment variable when
running the :subcmd:`autoinit` sub-command and quit autoinit process if this
variable is found defined and equal to 1 when starting it. Ensure this way
that an autoinit process will not be triggered indefinitely by itself when
the :mconfig:`set_shell_startup` option is enabled and some module loaded at
initialization time relies on the execution of a bash script. (fix issue
#414)
* Remove warning message when unloading a :mfcmd:`prepend-path` or
:mfcmd:`append-path` modulefile command with ``--duplicates`` option set.
(fix issue #421)
* Clarify the module sub-commands that are allowed to be used within a
modulefile. (fix issue #423)
* Install: set in the module magic cookie of the :file:`initrc` configuration
file installed by default the version of Modules required to evaluate this
file.
* Doc: fix documentation of :mfcmd:`getenv` modulefile command to describe
that an empty string is now returned when designated environment variable is
not defined and no default value to return is specified.
Modules 5.0.0 (2021-09-12)
--------------------------
* Remove deprecated :command:`createmodule.sh` and :command:`createmodule.py`
tools as shell script to modulefile conversion is now achieved with the
:subcmd:`sh-to-mod` sub-command.
* Remove mention of the :subcmd:`init*` sub-commands in module usage
message to put focus on the collection handling sub-commands.
* Do not declare anymore the ``chdir``, ``module``, ``module-trace``,
``module-verbosity``, ``module-user`` and ``module-log`` commands under the
modulerc Tcl interpreter as no-op commands. A clear error message is
obtained if these commands are still used in modulerc files instead of
silently ignoring them.
* Return by default an empty string rather ``_UNDEFINED_`` on :mfcmd:`getenv`
modulefile command if passed environment variable is not defined.
* Align empty directory name error message obtained on :subcmd:`use`
sub-command with message obtained when module or collection name is empty.
* Accept non-existent modulepath on :subcmd:`use` sub-command.
* Install: installation option :instopt:`--enable-auto-handling` is set on by
default which enables the automated module handling mode (see
:envvar:`MODULES_AUTO_HANDLING`).
* Install: installation option :instopt:`--enable-extended-default` is set on
by default which allows partial module version specification (see
:envvar:`MODULES_EXTENDED_DEFAULT`).
* Install: installation option :instopt:`--enable-advanced-version-spec` is
set on by default which activates the :ref:`Advanced module version
specifiers`
* Install: installation option :instopt:`--enable-color` is set on by default
which enables the ``auto`` output color mode (see :envvar:`MODULES_COLOR`).
* Install: installation option :instopt:`--with-icase` is set to ``search``
by default to activate case insensitive match on search contexts (see
:envvar:`MODULES_ICASE`).
* Install: installation option :instopt:`--enable-new-features` has been reset
following major version change as all the options it implied are now enabled
by default.
* Install: installation option :instopt:`--enable-set-shell-startup` is set
off by default but could be enabled once installed through the
:file:`initrc` configuration file.
* Install: installation option :instopt:`--with-initconf-in` is set to
``etcdir`` by default to locate configuration files in the directory
designated by the :instopt:`--etcdir` option. Therefore the initialization
configuration file is named :file:`initrc` in this directory, and the
modulepath-specific configuration file is named :file:`modulespath`.
* Only look at configuration files found in the location designated by the
:instopt:`--etcdir` or :instopt:`--initdir` option (depending on the value
of :instopt:`--with-initconf-in` option). Configuration files were
previously searched in both locations.
* Install: remove installation option ``--enable-compat-version``.
Compatibility version co-installation is discontinued. :command:`switchml`
shell function and :envvar:`MODULES_USE_COMPAT_VERSION` are thus removed as
well.
* Testsuite: introduce the non-regression quick test mode. When the
:envvar:`QUICKTEST` environment variable is set to ``1``, only the main
tests from the non-regression testsuite are run. When first argument of the
:command:`mt` script is ``quick``, tests are run in quick mode.
* Install: run non-regression testsuite in quick mode in RPM spec file.
* Rename the environment variables that are used by Modules to track loaded
environment state (variables whose name starts with ``MODULES_LM``). A
``__`` prefix is added to the name of these variables to indicate that they
are intended for internal use only.
* Rename the environment variables used to indirectly pass to
:file:`modulecmd.tcl` the value of variables set in quarantine (variables
whose name finishes with ``_modquar``). A
:envvar:`__MODULES_QUAR_<__MODULES_QUAR_\>` prefix is applied to the
name of these variables instead of the ``_modquar`` suffix to indicate they
are intended for Modules internal use of only.
* Update Tcl requirement to version 8.5 as Tcl 8.4 is deprecated since a long
time and this version is not available anymore on recent OS distributions.
Update internal code of :file:`modulecmd.tcl` to take benefit from the
features brought by Tcl 8.5.
* Split source code in several Tcl files hosted in ``tcl`` directory. When
building Modules, the Tcl files are concatenated to make the
:file:`modulecmd.tcl` script.
* Record ``auto-loaded`` tag of loaded modules in :envvar:`__MODULES_LMTAG`
environment variable rather set a specific entry for module in the
``__MODULES_LMNOTUASKED`` environment variable.
* Rename the environment variables used by the reference counting mechanism
of path-like environment variables. A
:envvar:`__MODULES_SHARE_<__MODULES_SHARE_\>` prefix is applied to the
name of these variables instead of the ``_modshare`` suffix to clearly
indicate they are intended for Modules internal use of only.
* Reference counting mechanism is not anymore applied to the Modules-specific
path variables (like :envvar:`LOADEDMODULES`). As a result no
:envvar:`__MODULES_SHARE_\` variable is set in user environment for
these variables. Exception is made for :envvar:`MODULEPATH` environment
variable where the mechanism still applies.
* When an element is added to a path-like variable through the
:mfcmd:`append-path` or :mfcmd:`prepend-path` modulefile commands, add this
element to the associated reference counter variable (named
:envvar:`__MODULES_SHARE_\`) only when this element is added multiple
times to the path-like variable. When an element is removed from a path-like
variable, this element is removed from the reference counter variable when
its counter is equal to 1.
* When the :subcmd:`use` and :subcmd:`unuse` module sub-commands are not
called during a modulefile evaluation, the reference counter associated with
each entry in :envvar:`MODULEPATH` environment variable is ignored. In such
context, a :subcmd:`module use