Skip to content

Releases: cea-hpc/modules

5.5.0

11 Nov 12:36
Compare
Choose a tag to compare
  • Init: update cmd shell initialization script to correctly define MODULESHOME 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 on module unload commands to avoid declaring a conflict toward these modules to unload. (fix issue #531)
  • Add hide-modulefile and hide-version modulerc commands to support modulerc files written for Lmod.
  • Update autoinit sub-command to define mogui shell function or alias if mogui-cmd command is found in PATH.
  • Add the hide_auto_loaded configuration option to tag automatically loaded modules hidden-loaded. These modules will not appear on list sub-command output unless --all option is set. Option is disabled by default and when set, it defines the MODULES_HIDE_AUTO_LOADED environment variable.
  • Introduce the --modulepath option to the always-load, depends-on, prereq, prereq-all and 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 __MODULES_LMPREREQPATH variable.
  • Add 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: logger which defines the command to use to sent information to the log system and logged_events which controls the information sent to logs.
  • logger configuration option relies on the logger command by default. It can be changed at installation time with --with-logger and --with-logger-opts options. When logger is changed with config sub-command, it sets the MODULES_LOGGER environment variable. logger can be declared as a locked configuration option in locked_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 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 --with-logged-events option. When logged_events is changed with config sub-command, it sets the MODULES_LOGGED_EVENTS environment variable. logged_events can be declared as a locked configuration option in locked_configs.
  • Add log channel to the puts modulefile command. String message passed to puts log is sent to the logger 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 the never value.
  • Introduce not: prefix for extra specifier and variant criteria on module search context. This prefix allows to negate search criteria on 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 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 with module-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 to 1 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 through conflict, family or module 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. When conflict_unload is changed with config sub-command, it sets the MODULES_CONFLICT_UNLOAD environment variable. Both auto_handling and conflict_unload options should be enabled to activate Conflict Unload automated behavior. (fix issue #242)
  • When both auto_handling and conflict_unload options are enabled, all loaded modules matching module specifications set on conflict or module unload commands are unloaded. If both options are not enabled, only one matching loaded module per specification argument of module unload is unloaded. (fix issue #215)
  • When both auto_handling and conflict_unload options are enabled, --force option set on 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 --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 of 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...
Read more

5.4.0

20 Feb 12:00
Compare
Choose a tag to compare
  • Allow to designate module by its full path file name on module-tag, module-hide and module-forbid. (fix issue #485)
  • Introduce tag extra specifier to search modules on avail, whatis and 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 list_output and 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 list_output and list_terse_output configuration options. When set, module aliases targeting loaded modules are reported.
  • Introduce sticky_purge configuration option to define behavior when unloading sticky or super-sticky module during a purge command. Raise an error (default) or emit a warning or be silent. When set, it defines the MODULES_STICKY_PURGE environment variable. Default value can be changed with --with-sticky-purge installation option. (fix issue #502)
  • Introduce modulepath-label modulerc command, which defines label used instead of modulepath directory path in avail output.
  • More than one global rc file can now be specified in MODULERCFILE or via rcfile configuration option.
  • Add the unique_name_loaded configuration option to allow, when enabled, only one module loaded per module name. When set, it defines the MODULES_UNIQUE_NAME_LOADED environment variable. Default value (disabled) can be changed with --enable-unique-name-loaded installation option.
  • Add evaluation-errors design notes.
  • Add 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 MODULES_ABORT_ON_ERROR environment variable. Default value can be changed with --with-abort-on-error installation option.
  • Add support for abort_on_error evaluation behavior on load, mod-to-sh and try-load sub-commands.
  • Report issue on modulefile when it fails to load an erroneous requirement through 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 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 __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 modulefile(5) man page in section 5. (fix issue #518 with contribution from Laurent Chardon)
  • Add 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. source_cache is disabled by default. When set, it defines the MODULES_SOURCE_CACHE environment variable. Default value can be changed with --enable-source-cache installation option.
  • Add support for abort_on_error evaluation behavior on unload sub-command.
  • A modulefile is unloaded anyway even if an evaluation error occurs when --force option is used on ml, purge, reload, reset, restore, stash, stashpop, switch and unload sub-commands. To forbid the unload of a modulefile it is recommended to tag it super-sticky with module-tag command.
  • Disable abort_on_error when --force option is used. In this case, behavior is to continue when an error occurs.
  • Add support for abort_on_error evaluation behavior on ml command. Abort on error behavior is on by default with ml. Removing it from abort_on_error's value enables the continue on error behavior.
  • Add support for abort_on_error evaluation behavior on reload command. Abort on error behavior is on by default with reload. Removing it from abort_on_error's value enables the continue on error behavior.
  • Add support for abort_on_error evaluation behavior on purge sub-command.
  • Add support for abort_on_error evaluation behavior on unload phase of switch command. Abort on error behavior is on by default there. Removing switch_unload from abort_on_error's value enables the continue on error behavior.
  • Add support for abort_on_error evaluation behavior on switch command. Abort on error behavior is applied if switch value is set in abort_on_error and either switch unload or switch load phase fails.
  • Install: installation option --enable-new-features is updated to enable abort on error behavior on load and 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 module switch command is run from a modulefile.
  • No Switching block message report when 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 module switch command fails unless if --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 append-path and prepend-path modulefile commands. (fix issue #522)
  • Add bash-eval shell mode to source-sh modulefile command and 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 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 module-forbid, module-hide and 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 module-forbid, module-hide and 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.1

27 Jun 18:51
Compare
Choose a tag to compare
  • 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, 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 pre-commit and commit-msg git hook scripts to use Hunspell as spell checker instead of Aspell.
  • Fix unaligned 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 --not-req option set on require or incompat extra specifier queries. (fix issue #498)
  • When one variant is specified multiple times on search context (avail, paths or 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 avail_output and 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)

5.3.0

14 May 19:05
Compare
Choose a tag to compare
  • Add module-cache design notes.
  • Add 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 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 avail, load, display, etc).
  • Script: add cache-enabled version of avail, whatis and load tests on mb benchmark utility.
  • Add the ignore_cache configuration option to ignore module cache file. Option is disabled by default and when set, it defines MODULES_IGNORE_CACHE environment variable.
  • Add --ignore-cache command-line switch to enable ignore_cache configuration option and ignore module cache file for current execution.
  • Add 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 MODULES_CACHE_BUFFER_BYTES environment variable.
  • Add 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 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 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 source-sh and 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 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 licence name to SPDX format in RPM spec file.
  • Doc: add 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 module-info mode when queried during a scan modulefile evaluation.
  • Add the variant element in the allowed value list of the avail_output and avail_terse_output configuration options. When set, variants and their possible values are reported along the module they are associated to on 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 list and avail command output.
  • Apply either loaded or auto-loaded graphic rendition to the loaded variant value on avail command output.
  • Update avail, paths and 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 avail, paths and 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 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 list and avail command output.
  • Doc: add Extra match search description in 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 (avail, paths and 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 Extra specifier description in module(1) man page.
  • Mark loaded modules as qualified for refresh evaluation when they send content to stdout or prestdout channels with puts modulefile command. (fix issue #488)
  • Add the ignore_user_rc configuration option to skip evaluation of user-specific module rc file. Option is disabled by default and when set, it defines MODULES_IGNORE_USER_RC environment variable.
  • Add --ignore-user-rc command-line switch to enable 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 avail_output and 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 avail command output.
  • Accept value starting with + or - characters on --output/-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 avail_output, avail_terse_output, list_output, list_terse_output, colors, protected_envvars, shells_with_ksh_fpath, tag_abbrev, tag_color_name, variant_shortcut configuration options to indicate value should respectively be appended to or subtracted from current configuration option value.
  • Fix switch sub-command not to unload sticky module when switched-on module does not exist. (fix issue #492)

5.2.0

08 Nov 06:06
Compare
Choose a tag to compare
  • Introduce the --optional option on prereq, prereq-all, depends-on and 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 auto_handling configuration option is disabled.
  • A dependency expressed in modulefile with module try-load<module> command is considered optional. Dependent module is automatically reloaded if the optional requirement is loaded afterward, unless if the auto_handling configuration option is disabled.
  • Raise error in case of unknown or misplaced option set on prereq, prereq-all, depends-on or always-load modulefile commands.
  • Add the --timer command-line switch to report the total execution time of the module command. Also report the execution time of every internal procedure calls when mixed with --debug option.
  • Init: move PATH setup (to locate Modules' binaries location) from shell initialization scripts to the autoinit sub-command. (fix issue #462)
  • Init: move MANPATH setup (to locate Modules' man-pages) from shell initialization scripts to the autoinit sub-command. (fix issue #462)
  • Init: move shell completion setup from shell initialization scripts to the autoinit sub-command. (fix issue #462)
  • Enclose installation path references in shell code produced by 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 source-sh and sh-to-mod when used with fish shell script if regex-easyesc fish option is enabled. (fix issue #463)
  • Add the protected_envvars configuration option to define a list of environment variables that cannot be modified by modulefile commands. When set, protected_envvars defines MODULES_PROTECTED_ENVVARS environment variable. (fix issue #429 with contribution from Adrien Cotte)
  • Introduce the lint sub-command to statically analyze syntax of modulefiles, modulerc and global/user rc. (fix issue #451)
  • Add the tcl_linter configuration option to define the program used to analyze files with lint sub-command. This option is set to nagelfar.tcl by default. When changed from default value, the MODULES_TCL_LINTER environment variable is defined. Default value can be changed with --with-tcl-linter and --with-tcl-linter-opts installation options.
  • Add the --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 --nagelfardatadir (DATAROOTDIR/nagelfar by default).
  • Doc: add lint-sub-command design notes.
  • Install: use install command rather cp or mkdir to install Modules and guaranty consistent permission modes on deployed files.
  • Also unset pushenv value stacks on clear sub-command.
  • Doc: add mod-to-sh-sub-command design notes.
  • Introduce the mod-to-sh sub-command to translate designated modulefile(s) into code for specified shell. (fix issue #447)
  • Make 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 set-alias only define shell alias and not shell function.
  • Add the ability to filter the list of collections returned by savelist sub-command. Filtering pattern is matched in a case insensitive manner by default.
  • Add support for --starts-with and --contains options on savelist sub-command.
  • Highlight all search patterns on list sub-command output instead of only the first one..
  • Highlight all search patterns on savelist sub-command output.
  • Add support for --all option on savelist sub-command not to limit result to the collection matching currently defined collection_target.
  • Doc: add Shell support section in modulefile(4) man page to describe how shells support the different kind of environment changes that can be defined in modulefiles.
  • Record during autoinit sub-command the initial environment state in __MODULES_LMINIT. Enabled modulepaths and loaded modulefiles through modulespath and initrc initialization configuration files are recorded in this new environment variable.
  • Add reset sub-command to restore initial environment. It takes recorded environment in __MODULES_LMINIT and restores it.
  • Initial environment is restored when collection name specified on restore sub-command equals __init__.
  • When no argument is provided to restore sub-command and if default collection does not exist, initial environment is restored.
  • Initial environment content is displayed when collection name specified on saveshow sub-command equals __init__.
  • When no argument is provided to saveshow sub-command and if default collection does not exist, initial environment content is displayed.
  • Add reset_target_state configuration option to determine behavior of reset sub-command. When set to __init__ (default value) initial environment is restored. When set to __purge__, a purge sub-command is performed. Any other value, corresponds to the name of a collection to restore. When set, reset_target_state defines MODULES_RESET_TARGET_STATE environment variable.
  • Doc: add initial-environment design notes.
  • Unload sticky modules on restore and 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 modulecmd.tcl code and add Nagelfar inline comments to fix linter reports.
  • Script: add usage message and support for -h/--help option on mrel, mpub, mt, mtreview, nglfar2ccov, mb and mlprof development utilities.
  • Doc: describe script/mt and script/mb utilities in 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 stash sub-command to save current environment and restore initial one.
  • Add stashpop sub-command to restore stash collection then delete this collection file.
  • Add stashrm sub-command to delete stash collection file.
  • Add stashshow sub-command to display stash collection file.
  • Add stashclear sub-command to delete all stash collection files.
  • Add stashlist sub-command to list all stash collection files.
  • Update savelist sub-command to filter out stash collections unless if --all option is set.
  • Doc: ensure current user environment does not break logging system in 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 __MODULES_LMREFRESH environment variable.
  • Optimize refresh sub-command to only evaluate loaded modules that defines volatile environment changes (shell completion, alias or function). (fix issue #477)
  • Add modulefile_extra_cmds hook variable that could be defined in siteconfig.tcl file to define specific commands in modulefile interpreter context. modulefile_extra_cmds is a list of command name and relative procedure pairs. (fix issue #286)
  • Add modulefile_extra_vars hook variable that could be defined in siteconfig.tcl file to define specific variables in modulefile interpreter context. modulefile_extra_vars is a list of variable name and value pairs. (fix issue #286)
  • Add modulerc_extra_cmds hook variable that could be defined in siteconfig.tcl file to define specific commands in modulerc interpreter context. modulerc_extra_cmds is a list of command name and relative procedure pairs. (fix issue #286)
  • Add modulerc_extra_vars hook variable that could be defined in siteconfig.tcl file to define specific variables in modulerc interpreter context. modulerc_extra_vars is a list of variable name and value pairs. (fix issue #286)
  • Doc: Add Site-specific configuration section in module(1) man page.
  • Doc: extend Collections section with examples in module(1) man page.

5.1.1

31 May 19:31
Compare
Choose a tag to compare
  • Install: add 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 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 autoreconf.
  • Install: call git command in Makefile only if the definitions of version.inc need to get built or refreshed.

5.1.0

30 Apr 08:35
Compare
Choose a tag to compare
  • Allow to declare variant with no list of accepted value. Such variant accepts any value specified. (fix issue #405)
  • Add the redirect_output configuration option to control on sh, bash, ksh, zsh and fish shells whether or not the output of the module function should be redirected from stderr to stdout. When set, redirect_output defines MODULES_REDIRECT_OUTPUT environment variable.
  • Introduce the --redirect/--no-redirect command-line switches to supersede the value of the redirect_output configuration option on sh, bash, ksh, zsh and fish shells. (fix issue #410)
  • Add the --return-value option to the getenv and 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 state sub-command to display Modules states.
  • Add the supported_shells state to get the list of the shells that are supported by modulecmd.tcl through the 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 sh-to-mod sub-command or source-sh modulefile command. (fix issue #427)
  • Doc: add control-mode-behaviors design notes.
  • Doc: add 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 add-new-sub-command design notes.
  • Add the --remove-on-unload option to the remove-path to also remove value when modulefile is unloaded.
  • Raise error when an unknown option is set on module use or 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 remove-path and 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 remove-path and 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 unsetenv, remove-path and module unuse modulefile commands to perform no operation when modulefile is unloaded.
  • Add the --unset-on-unload option to the unsetenv modulefile command to also unset environment variable when modulefile is unloaded.
  • Add the --set-if-undef option to the setenv modulefile command to set environment variable when modulefile is loaded only this variable is not yet defined.
  • Install: add the --with-bashcompletiondir, --with-fishcompletiondir and --with-zshcompletiondir installation options to install shell completion scripts in their system-wide location. (fix issue #428)
  • Doc: add 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 prereq-any modulefile command for compatibility with Lmod Tcl modulefiles. prereq-any is an alias of prereq command.
  • Produce a clear error message when wrong number of argument is received by prereq command.
  • Doc: describe ModulesVersion in Modules Variables section in modulefile(4) man page.
  • Set ModuleVersion as an alias over ModulesVersion modulefile variable for compatibility with Lmod Tcl modulefiles.
  • Doc: describe reportError and reportWarning modulefile commands.
  • Add the 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 prereq-all modulefile command, alias over the prereq command which acts as an AND operation when multiple modulefiles are specified.
  • Add the depends-on modulefile command, alias over the prereq-all command for compatibility with Lmod Tcl modulefiles.
  • Introduce the keep-loaded module tag that avoids an auto-loaded module to get automatically unloaded when its dependent modules are getting unloaded. Update default tag_abbrev configuration option to add an abbreviation for the new tag (kL) and default light and dark color palettes.
  • Add the 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 load-any sub-command and 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 module try-load and module load-any modulefile commands.
  • Doc: add magic-cookie-check design notes.
  • Add the 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 MODULES_MCOOKIE_CHECK environment variable.
  • Doc: describe puts Tcl command and its specific feature when used in modulefile.
  • Create the prestdout channel for 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 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. family also defines the MODULES_FAMILY_<NAME> and LMOD_FAMILY_<NAME> environment variables.
  • Doc: add reduce-io-load cookbook recipe.
  • Add the ability to filter the list of loaded modules returned by 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 Advanced module version specifiers syntax.
  • Add support for --starts-with and --contains options on list sub-command.
  • Doc: add shell-completion design notes.
  • Introduce complete and 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 sh-to-mod sub-command and source-sh modulefile command.
  • Fix typos found in code, tests and documentation. (contribution from Dimitri Papadopoulos Orfanos)
  • Update the sh-to-mod and source-sh mechanisms to support nested function definition on fish shell.
  • Fix the sh-to-mod and source-sh mechanisms to correctly detect functions with a _ character in their name on fish shell.
  • Update the module shell function definition for sh-kind shell to enclose the output generated by 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 sh-to-mod and source-sh mechanisms. (fix issue #434)
  • Fix csh shell alias detection on sh-to-mod and source-sh mechanisms when enclosed in parenthesis. (fix issue #434)
  • Include for fish shell environment analysis on sh-to-mod and 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 sh-to-mod and source-sh mechanisms to correctly detect empty function on fish shell.
  • Script: add 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 Dependencies between modulefiles in modulefile(4) man page. (fix issues #431 and #433)
  • Script: update pre-commit git hook script to spell check documentation files with Aspell tool.
  • Script: add 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 module ENVIRONMENT section in 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 config sub-command.
  • Doc: clarify in module(1) man page that MODULES_SET_SHELL_STARTUP, MODULES_SHELLS_WITH_KSH_FPATH and MODULES_WA_277 should be set prior Modules initialization to get taken into account.
  • Doc: update INSTALL document to provide the name of the configuration option linked the installation options.
  • Doc: describe in 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 INSTALL document with a table summarizing all configuration options and their relative installation options and environment variables.
  • Add the 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 __MODULES_PUSHENV_<VAR> environment variable.
  • Doc: add Compatibility with Lmod Tcl modulefile section in modulefile(4) man page.
  • Update defini...
Read more

5.0.1

17 Oct 13:08
Compare
Choose a tag to compare
  • Doc: add How to preserve my loaded environment when running screen entry in FAQ.
  • Fix the advanced version specifier resolution when the extended_default option is off and icase option is on when resolving version list specification. (fix issue #411)
  • Doc: improve the 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 variants design doc. (fix issue #413)
  • Correctly detect tags set on loaded modules when refreshing them.
  • Set the __MODULES_AUTOINIT_INPROGRESS environment variable when running the 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 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 prepend-path or 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 initrc configuration file installed by default the version of Modules required to evaluate this file.
  • Doc: fix documentation of 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.

5.0.0

12 Sep 12:42
Compare
Choose a tag to compare
  • Remove deprecated createmodule.sh and createmodule.py tools as shell script to modulefile conversion is now achieved with the sh-to-mod sub-command.
  • Remove mention of the 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 getenv modulefile command if passed environment variable is not defined.
  • Align empty directory name error message obtained on use sub-command with message obtained when module or collection name is empty.
  • Accept non-existent modulepath on use sub-command.
  • Install: installation option --enable-auto-handling is set on by default which enables the automated module handling mode (see MODULES_AUTO_HANDLING).
  • Install: installation option --enable-extended-default is set on by default which allows partial module version specification (see MODULES_EXTENDED_DEFAULT).
  • Install: installation option --enable-advanced-version-spec is set on by default which activates the Advanced module version specifiers
  • Install: installation option --enable-color is set on by default which enables the auto output color mode (see MODULES_COLOR).
  • Install: installation option --with-icase is set to search by default to activate case insensitive match on search contexts (see MODULES_ICASE).
  • Install: installation option --enable-new-features has been reset following major version change as all the options it implied are now enabled by default.
  • Install: installation option --enable-set-shell-startup is set off by default but could be enabled once installed through the initrc configuration file.
  • Install: installation option --with-initconf-in is set to etcdir by default to locate configuration files in the directory designated by the --etcdir option. Therefore the initialization configuration file is named initrc in this directory, and the modulepath-specific configuration file is named modulespath.
  • Only look at configuration files found in the location designated by the --etcdir or --initdir option (depending on the value of --with-initconf-in option). Configuration files were previously searched in both locations.
  • Install: remove installation option --enable-compat-version. Compatiblity version co-installation is discontinued. switchml shell function and MODULES_USE_COMPAT_VERSION are thus removed as well.
  • Testsuite: introduce the non-regression quick test mode. When the QUICKTEST environment variable is set to 1, only the main tests from the non-regression testsuite are run. When first argument of the 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 modulecmd.tcl the value of variables set in quarantine (variables whose name finishes with _modquar). A __MODULES_QUAR_<VAR> 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 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 modulecmd.tcl script.
  • Record auto-loaded tag of loaded modules in __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 __MODULES_SHARE_<VAR> 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 LOADEDMODULES). As a result no __MODULES_SHARE_<VAR> variable is set in user environment for these variables. Exception is made for MODULEPATH environment variable where the mechanism still applies.
  • When an element is added to a path-like variable through the append-path or prepend-path modulefile commands, add this element to the associated reference counter variable (named __MODULES_SHARE_<VAR>) 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 use and unuse module sub-commands are not called during a modulefile evaluation, the reference counter associated with each entry in MODULEPATH environment variable is ignored. In such context, a module use will not increase the reference counter of a path entry already defined and a module unuse will remove specified path whatever its reference counter value.
  • When the append-path, prepend-path and remove-path module sub-commands are not called during a modulefile evaluation, the reference counter associated with each entry in targeted environment variable is ignored. In such context, a module append-path/prepend-path will not increase the reference counter of a path entry already defined and a module remove-path will remove specified path whatever its reference counter value.
  • Fix unuse sub-command when sereval modulepaths are specified as a single argument (i.e., /path/to/dir1:/path/to/dir2). Enabled modulepaths were not correctly detected when specified this way.
  • Doc: clarify that an already defined path is not added again or moved when passed to the use sub-command or the append-path/prepend-path modulefile commands. (fix issue #60)
  • Change the refresh sub-command to evaluate all loaded modulefiles and re-apply the non-persistent environment changes they define (i.e., shell aliases and functions). With this change the refresh sub-command is restored to the behavior it had on Modules version 3.2.
  • Evaluate the modulefile commands resulting from a source-sh command through the current modulefile Tcl interpreter in order to evaluate them according to the current modulefile evaluation mode.
  • When initializing Modules, refresh the loaded modules in case some user environment is already configured. This is especially useful when starting a sub-shell session as it ensures that the loaded environment in parent shell is correctly inherited, as the refresh sub-command re-applies the non-persistent environment configuration (i.e., shell alias and function that are not exported to the sub-shell). (fix issue #86)
  • Init: add example code in default initrc, the initialization script of Modules, to either restore user's default collection if it exists or load a predefined module list at the end of the initialization process.
  • When initializing Modules, evaluate the initrc configuration file in addition to the the modulespath configuration file and not instead of this file. initrc is evaluated after modulespath file.
  • When the installation option --enable-modulespath is set, the list of modulepath to enable by default is now only defined in the modulespath configuration file and not anymore in the initrc configuration file.
  • No error is raised when evaluating in display mode a modulefile without a value specified for the variant it defines. This change helps to learn all the variant a modulefile defines. As a result, the unspecified variant is not instantiated in the ModuleVariant array variable. (fix issue #406)
  • When running the unsetenv modulefile command on an unload evaluation, do not unset designated environment variable if no value to restore is provided.
  • Fix unsetenv to distinguish between being called on a unload evaluation without a value to restore or with an empty string value to restore.
  • Make system modulefile command available from a modulerc evaluation context whatever the underlying module evaluation mode.
  • Make is-used modulefile command available from a modulerc evaluation context.
  • Remove internal state tcl_version_lt85 as Tcl 8.5+ is now a requirement.
  • Forbid use of module source<source> command in modulefile or in an initialization rc file, the source Tcl command should be used instead. source sub-command should only be called from the command-line.
  • Report the modules loading and unloading during the module command initialization (i.e., during the evaluation of the initrc configuration file). These report messages are disabled when the verbosity configuration option is set to concise or silent.
  • During a module restore or source, only report the module load and unload directly triggered by these sub-commands. Load and unload triggered by other modules are reported through the automated module handling messages of the main modules.
  • Enforce use of the module magic cookie (i.e., #%Module) at the start of global or user rc files, initrc configuration file or any scriptfile passed for evaluation to the source sub-command. These files are not evaluated and an error is produced if the magic cookie is missing or if the optional version number placed after the cookie string...
Read more

5.0.0-alpha

25 Jul 21:06
Compare
Choose a tag to compare
5.0.0-alpha Pre-release
Pre-release
  • Remove deprecated createmodule.sh and createmodule.py tools as shell script to modulefile conversion is now achieved with the sh-to-mod sub-command.
  • Remove mention of the 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 getenv modulefile command if passed environment variable is not defined.
  • Align empty directory name error message obtained on use sub-command with message obtained when module or collection name is empty.
  • Accept non-existent modulepath on use sub-command.
  • Install: installation option --enable-auto-handling is set on by default which enables the automated module handling mode (see MODULES_AUTO_HANDLING).
  • Install: installation option --enable-extended-default is set on by default which allows partial module version specification (see MODULES_EXTENDED_DEFAULT).
  • Install: installation option --enable-advanced-version-spec is set on by default which activates the Advanced module version specifiers
  • Install: installation option --enable-color is set on by default which enables the auto output color mode (see MODULES_COLOR).
  • Install: installation option --with-icase is set to search by default to activate case insensitive match on search contexts (see MODULES_ICASE).
  • Install: installation option --enable-new-features has been reset following major version change as all the options it implied are now enabled by default.
  • Install: installation option --enable-set-shell-startup is set off by default but could be enabled once installed through the initrc configuration file.
  • Install: installation option --with-initconf-in is set to etcdir by default to locate configuration files in the directory designated by the --etcdir option. Therefore the initialization configuration file is named initrc in this directory, and the modulepath-specific configuration file is named modulespath.
  • Only look at configuration files found in the location designated by the --etcdir or --initdir option (depending on the value of --with-initconf-in option). Configuration files were previously searched in both locations.
  • Install: remove installation option --enable-compat-version. Compatiblity version co-installation is discontinued. switchml shell function and MODULES_USE_COMPAT_VERSION are thus removed as well.
  • Testsuite: introduce the non-regression quick test mode. When the QUICKTEST environment variable is set to 1, only the main tests from the non-regression testsuite are run. When first argument of the 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 modulecmd.tcl the value of variables set in quarantine (variables whose name finishes with _modquar). A __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 modulecmd.tcl to take benefit from the features brought by Tcl 8.5.