Skip to content

Releases: cea-hpc/modules

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.

4.8.0

14 Jul 11:42
Compare
Choose a tag to compare
  • Introduce the edit sub-command that opens modulefile passed as argument in a text editor. Modulefile can be specified like with any other sub-command, leveraging defined symbolic versions, aliases or using advanced version specifiers.
  • Add the editor configuration option to select the text editor to use with edit sub-command. When this option is set through the config sub-command, the MODULES_EDITOR environment variable is set. The --with-editor installation option controls the default value of editor configuration option. If not set at installation time, vi is set as default editor.
  • Default value of editor configuration option is overridden by the VISUAL or the EDITOR environment variables, which are both in turn overridden by the MODULES_EDITOR environment variable.
  • Doc: fix modulecmd.tcl internal state check in recipes example codes. (fix issue #396)
  • The Advanced module version specifiers mechanism now allows the use of version range in version list (for instance mod@:1.2,1.4:1.6,1.8:). Such specification helps to exclude specific versions. (fix issue #397)
  • Install: fix installation scripts to allow building Modules when its repository is set as a git submodule. (fix issue #398)
  • Doc: demonstrate in the source-script-in-modulefile recipe how to use the source-sh command when software provide a specific initialization script for each shell it supports. (fix issue #399)
  • When defining a shell function with the set-function modulefile command, only export this function when using the Bash shell (using the export -f shell command) to make it available in sub-shell contexts. Shell function export is not supported on other kind of sh shell (sh, ksh and zsh). (fix issue #401)
  • Doc: add variants design notes.
  • Add the variant modulefile command that enables to pass down arguments, specified when designating the module to evaluate, within modulefile evaluation context. This command defines a variant name and a list of allowed values. When evaluated, variant instantiates an element in the ModuleVariant array whose name equals variant name and value is set with value specified for variant when module is designated. If specified value does not correspond to an allowed value or if no value is specified for variant an error is raised.
  • Enhance the Advanced module version specifiers to handle variant specification following Spack_'s syntax (e.g., name=value). When the advanced_version_spec configuration is enabled, variant could be specified anywhere a module can be specified.
  • Add the --default option to the variant modulefile command to indicate the default value of the variant to apply when the designation of the evaluating module does not mention this variant.
  • Add the --boolean option to the variant modulefile command to indicate that the variant defined is of the Boolean type, thus no list of accepted value is expected.
  • Enhance the Advanced module version specifiers to handle Boolean variant specification following Spack_'s syntax (e.g., +name, ~name and -name). The -name syntax is not supported on ml(1) command as the minus sign already means to unload designated module.
  • Accept any minus argument (-word) set after the sub-command name when the advanced_version_spec configuration is enabled and if sub-command accepts Advanced module version specifiers (like load or unload sub-commands). A false value may be set to Boolean variant this way.
  • Add the variant_shortcut configuration option to define shortcut characters that could be used to specify and report module variants. Default value for this option could be set at installation time with the --with-variant-shortcut option. No variant shortcut is defined by default. This value could be superseded by setting up the variant_shortcut option with config sub-command. Which sets the MODULES_VARIANT_SHORTCUT environment variable.
  • Enhance the Advanced module version specifiers to handle variant shortcut specification (e.g., value).
  • Record in user loaded environment, with MODULES_LMVARIANT environment variable, the value specified for the variants defined in the loaded modulefiles and their properties (if it is a Boolean variant and if the value set is the default one).
  • Add the variant element in the allowed value list of the list_output and list_terse_output configuration options. Set this new element in the default value list of the list_output option. When set, the variant defined for loaded modules are reported on module list command output.
  • Add the va color key in default light and dark color palettes to graphically enhance the report of variant value.
  • Update the key section to explain on list sub-command output the reported variant elements (name=value, +name, -name or value)
  • Record variant specification of loaded modules when saving collections and reload specified variants when restoring these collections.
  • When collection_pin_version configuration is disabled, only record in collections the variants whose value is not the default one.
  • Update module designation in error, warning or informational messages to report variant specification enclosed in curly braces ({}), enclose module name and version or variant specification in single quotes ('') if they contain a space character and highlight the module designation in report message if configured.
  • Introduce the getvariant modulefile command to query for currently evaluating module the value of a given variant name.
  • When translating the @loaded version specifier also retrieve the variant specified for corresponding loaded module.
  • Update hide, forbid and tag mechanisms to apply them only if they match selected module variant.
  • Any variant defined in module specification passed as argument to search sub-commands (avail, whatis, is-avail, path and paths) is ignored.
  • Raise an error if a variant named version is declared in a modulefile to let room for the future implementation of this specific variant.
  • Doc: describe in the diff_v3_v4 document argument handling change on setenv since v3.2. (fix issue #402)
  • Introduce the try-load sub-command which like load sub-command tries to load the modulefile passed as argument, but does not complain if this modulefile cannot be found. (fix issue #392)
  • Init: fix stderr redirection in fish shell initialization script, now that use of the ^ character to redirect stderr is disabled by default (fish >=3.3).
  • Protect quarantine mechanism code from rcexpandparam Zsh option when initializing the module command on this shell. (fix issue #403)