- Init: update
cmd
shell initialization script to correctly defineMODULESHOME
when installation pathname contains dot character. (fix issue #525 with contribution from V-clone) - Init: add completion for
ml
command on Tcsh shell. (fix issue #416 with contribution from Laurent Besson) - Init: fix completion of
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
mt
development utility. - Resolve switched-on module prior testing stickiness preservation.
- Contrib: fix versions modulefiles generated when
--enable-versioning
installation option is set. Use--not-req
option onmodule unload
commands to avoid declaring a conflict toward these modules to unload. (fix issue #531) - Add
hide-modulefile
andhide-version
modulerc commands to support modulerc files written for Lmod. - Update
autoinit
sub-command to definemogui
shell function or alias ifmogui-cmd
command is found inPATH
. - Add the
hide_auto_loaded
configuration option to tag automatically loaded moduleshidden-loaded
. These modules will not appear onlist
sub-command output unless--all
option is set. Option is disabled by default and when set, it defines theMODULES_HIDE_AUTO_LOADED
environment variable. - Introduce the
--modulepath
option to thealways-load
,depends-on
,prereq
,prereq-all
andprereq-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__MODULES_LMPREREQPATH
variable. - Add
lsb-release
modulefile command to get certain Linux Standard Base (LSB) information. It accepts to following sub-commands:id
,codename
andrelease
. - Add information logging capabilities controlled by two new configuration options:
logger
which defines the command to use to sent information to the log system andlogged_events
which controls the information sent to logs. logger
configuration option relies on thelogger
command by default. It can be changed at installation time with--with-logger
and--with-logger-opts
options. Whenlogger
is changed withconfig
sub-command, it sets theMODULES_LOGGER
environment variable.logger
can be declared as a locked configuration option inlocked_configs
.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 arerequested_cmd
(log module commands directly executed by users),requested_eval
(modulefile evaluations directly asked by users) andauto_eval
(modulefile evaluations automatically triggered). Option value can be changed at installation time with--with-logged-events
option. Whenlogged_events
is changed withconfig
sub-command, it sets theMODULES_LOGGED_EVENTS
environment variable.logged_events
can be declared as a locked configuration option inlocked_configs
.- Add
log
channel to theputs
modulefile command. String message passed toputs log
is sent to thelogger
command. - Doc: update
log-module-command
cookbook recipe with integrated logging feature. - Install: update
configure
script to ignore all--with-*
options if no value is associated to them. - Install: update
configure
script to set option to an empty string if specified with--without-*
argument. Exception is made for--without-icase
which sets option to thenever
value. - Introduce
not:
prefix for extra specifier and variant criteria on module search context. This prefix allows to negate search criteria onExtra 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
module unload
command that fails due to dependent modules loaded, stop unload evaluation right after this failed command unless--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 withmodule-info tags
. - Doc: describe in
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
INSTALL
. (fix issue #544) - Set exit code returned by
modulecmd.tcl
script to1
when a modulefile evaluation fails (modulefile does not exist, is buggy, etc). (fix issue #540) - Disable pager when running
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
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 throughconflict
,family
ormodule unload
commands.conflict_unload
also handles the unload of a module that is loaded again but with different variant values or from a different modulepath.conflict_unload
is disabled by default as it changes behaviors of the 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--enable-conflict-unload
. Whenconflict_unload
is changed withconfig
sub-command, it sets theMODULES_CONFLICT_UNLOAD
environment variable. Bothauto_handling
andconflict_unload
options should be enabled to activate Conflict Unload automated behavior. (fix issue #242) - When both
auto_handling
andconflict_unload
options are enabled, all loaded modules matching module specifications set onconflict
ormodule unload
commands are unloaded. If both options are not enabled, only one matching loaded module per specification argument ofmodule unload
is unloaded. (fix issue #215) - When both
auto_handling
andconflict_unload
options are enabled,--force
option set onload
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
--enable-new-features
is updated to include--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
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
load
sub-command. It eliminates auto loaded modules that were requirements of Conflict Unload modules. In case ofswitch
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
--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--force
command-line option. - Move stickiness check when unloading a module prior processing any automated module handling mechanism. (fix issue #536)
Caution
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 --enable-versioning
installation option and installed for Modules 4.7 and upward should be manually fixed by adding the --not-req
option to the module unload
commands present in these modulefiles. Following command should fix these files: sed -i "s|module unload|module unload --not-req|" <version_modulefile>
.