Releases: envmodules/modules
4.1.3
- Make
setenv
command alterenv
Tcl global array duringhelp
,test
orwhatis
evaluation modes. (fix issue#160) - Doc: describe MANPATH variable special treatment on compatibility version in diff_v3_v4 document.
- Initialize and export _moduleraw SH shell function if
stderr
is attached to a terminal. Was previously checkingstdout
. (fix issue#169) - For
csh
shells, quote code generated by modulecmd.tcl to pass it to theeval
shell command. - Escape special characters when producing code to define shell aliases (fix issue#165)
- Correct modulefile lookup when a modulefile directory is overwritten by a module alias definition but it contains an empty sub-directory. (fix issue#170)
- Doc: describe
getenv
command in modulefile(4) man page. - Improve SH shell detection in profile.sh initialization script to use shell variable on
bash
orzsh
to determine current shell name. (fix issue#173)
4.1.2
- Add an example global rc file in
contrib/etc
directory that ensuresMODULEPATH
is always defined. - Check
HOME
environment variable is defined onsavelist
andis-saved
commands or raise error if not. - Fix saving of deep module default version in collection when version pinning is disabled: if
foo/bar/version
is default version forfoo
, collection will retain justfoo
(was retainingfoo/bar
). - Enable to save and restore collections containing full path modulefiles eventually with no modulepath defined.
- Run
puts
command not related tostderr
orstdout
channels in calling modulefile context to correctly get access to the targeted file channel. (fix issue#157) - Quote
autoinit
result for eval interpretation on SH-kind shells to avoid parameter expansion to randomly occur on generated code depending on file or directory names of current working directory. (fix RH bug#1549664) - Ignore empty elements found in
MODULEPATH
,LOADEDMODULES
or_LMFILES_
to ensure all elements in these variables are non-empty strings. - Raise error if loaded environment is in an inconsistent state when calling commands requiring correlation of information from the
LOADEDMODULES
and the_LMFILES_
environment variables. Error raised onload
,unload
,switch
,reload
,purge
,list
,save
andrestore
commands. May affectinfo-loaded
oris-loaded
commands if module passed as argument to these command is specified as a full path modulefile. - Fix
list
command to process loaded modules information before performing any content output. - Install: adapt
configure
script and Makefiles to support installation on Cygwin system. - Detect terminal width on Windows
cmd
terminal withmode
command. - Improve Windows
cmd
shell support: error code returned, echoing text, shell alias creation and removal, working directory change. - Raise error when an empty module name is passed to module sub-commands like
load
,display
orunload
. - Raise error when an empty collection name is passed to module sub-commands like
save
,saveshow
orrestore
. - Raise error when an empty path is passed to module
unuse
sub-command, like already done onuse
sub-command. - Clear argument list if an empty module command name is passed.
- Fix
module
function definition for all shells inautoinit
command to correctly handle empty-string parameters or parameters containing white-spaces, quotes, escape characters. - Fix
module
function definition for Python to accept being called with no argument. - Fix parameter expansion on
module
function for all SH-kind shells when quarantine mode is activated. - Escape
\
character when producing R shell code.
4.1.1
- Make separator lines, used on
display
command result for instance, fit small screen width. - Install: give ability to build and install Modules from git repository without documentation if
sphinx-build
cannot be found. - Install: adapt
configure
script and Makefiles to support installation on FreeBSD, Solaris and OS X systems. (fix issue#147) - Rework code generated by
autoinit
for sh-kind shells to avoid use of local variables as those are defined differently through the sh variants. (also fix issue#147) - Init: use a default value on undefined variables in sh-kind scripts to avoid unbound variables in bash
-eu
mode. (fix issue#151) - Correctly detect terminal column number on Solaris.
- Init: fix csh init script to get compatibility with pure csh shell
- Sanitize content of
MODULEPATH
before using it at run-time, to make potential relative paths absolute, remove trailing slashes, etc. (fix issue#152) - Check loaded modulefiles still exists before displaying statistics on them during a
list
action. - Use a specific reference counter variable name (
MODULES_MODSHARE_<VAR>
instead of<VAR>_modshare
) for DYLD-specific variables. (fix issue#153) - No error raise when updating a DYLD or LD path-like variable on OS X when System Integrity Protection (SIP) is enabled. In this situation, these variables are not exported in subshell context, so they appear undefined.
- Init: protect arguments passed to the
_moduleraw
sh function from interfering content of current working directory. (fix issue#154) - Install: move
hostname
RPM requirement to the compat sub-package. - Start pager process only if some text has to be printed. (partially fix issue#146)
- Ignore
PAGER
environment variable to configure Modules pager to avoid side effects coming from a general pager configuration not compatible with Modules pager handling. (fix issue#146) - Do not blank anymore default Modules pager options if default pager is
less
when theLESS
environment variable is defined. (fix issue#146)
Warning: With this bugfix release, changes have been made on the pager setup to avoid side effects coming from the system general pager configuration. As a result PAGER
environment variable is now ignored and MODULES_PAGER
should be used instead to adapt Modules pager configuration at run-time.
4.1.0
- Extend stderr output redirection on sh-kind shells to all terminal-attached shell session, not only interactive shell session.
- Extend shell code produced by the
autoinit
command to perform the same environment initialization as done ininit
shell scripts (default value set for module-specific environment variables, parse or source of configuration files). - Make init shell scripts rely on
autoinit
command to define themodule
command and setup its default environment. - Fix error rendering code for Tcl shell by producing a call to the
error
procedure. - Introduce pager support to handle informational messages, using
less
command with-eFKRX
options by default. Environment variableMODULES_PAGER
orPAGER
may be used to supersede default pager command and options.--paginate
and--no-pager
switches enable or disable pager from the command line. - Install: add
--with-pager
and--with-pager-opts
configure options to define default pager command and its relative command-line options. - Introduce quarantine mechanism to protect module execution against side effect coming from the current environment definition. Variables whose name has been put in
MODULES_RUN_QUARANTINE
will be emptied or set to the value hold byMODULES_RUNENV_<VAR>
in the modulecmd.tcl run-time environment. Quarantine variable original value is then restored within modulecmd.tcl execution context once it has started. - Install: add
--with-quarantine-vars
configure option to define at build time theMODULES_RUN_QUARANTINE
andMODULES_RUNENV_<VAR>
environment variables set in initialization scripts. - Add
MODULES_SILENT_SHELL_DEBUG
environment variable to disable on sh shell and derivatives anyxtrace
orverbose
debugging property for the duration of either the module command or the module shell initialization script. (fix issue#121) - Change error code produced by modulecmd.tcl for the Tcl, Perl, Python, Ruby, CMake and R scripting languages to return a 'false' boolean value in case of error rather raising a fatal exception.
- Adapt module function definition for Tcl, Perl, Python, Ruby, CMake and R scripting languages to always return a value, result of the modulecmd.tcl run. When modulecmd.tcl run does not produce a specific status, a 'true' boolean value is returned. On CMake, resulting value is returned though a
module_result
global variable. - Spool content sent to the stdout channel with
puts
command during a modulefile interpretation, to effectively transmit this content to stdout after rendering the environment changes made by this modulefile. (fix issue#113) - Introduce
append-path
,prepend-path
,remove-path
andis-loaded
module sub-commands, based on existing modulefile-specific Tcl commands. (fix issue#116) - Introduce
is-saved
,is-used
andis-avail
modulefile Tcl commands and module sub-commands to test availability of collection, modulepath or modulefile. - Raise error when a call to
path
orpaths
module sub-commands is attempted during a modulefile interpretation. Both commands now return text rather print text on scripting languages. An empty string is returned in no match case instead of a false boolean value. - Introduce
module-info loaded
modulefile command and its module sub-command counterpartinfo-loaded
. This new command returns name of the modules currently loaded corresponding to the name passed as argument. (fix issue#3) - Fix
is-loaded
command to correctly handle multiple module names passed as argument (fix issue#138) - Support no argument on
is-loaded
,is-saved
andis-used
commands to return if anything is respectively loaded, saved or used. - Interpret
module source
command set in modulefile inunload
mode when the modulefile itself is interpreted in this mode. - Consider a modulefile passed with name starting by
./
or../
a full path name modulefile, like those starting by/
. These kind of names are converted to absolute path names, for instance to register them in loaded modulefile list during aload
command. - Correlate modulefile passed as full path name (starting by either
./
,../
or/
) to already loaded modulefile registered with regular module name (file name without its modulepath prefix) to prevent for instance from loading twice same modulefile. Correlate in the same way regular module name to already loaded full path name modulefile. - Introduce
MODULES_COLLECTION_PIN_VERSION
environment variable to record modulefile version number when saving collections even if version corresponds to the default one. (fix issue#89) - Fix location of
etc/rc
global RC file to@prefix@/etc/rc
instead of$MODULESHOME/etc/rc
not to depend onMODULESHOME
environment variable value. - Strengthen argument check for
append-path
,prepend-path
andremove-path
modulefile Tcl commands and module sub-commands. Raise error if argument list is not correct. - Fix support for the
--delim=C
argument form onappend-path
,prepend-path
andremove-path
commands. - Fix path reference counter handling in case path element is an empty string. Distinguish an empty path element from a variable set empty to clear it.
- Pass multiple path elements separated by delimiter character as one string on
append-path
,prepend-path
andremove-path
commands. - Accept multiple path element arguments on
append-path
,prepend-path
andremove-path
commands. - Introduce the
--duplicates
argument option toappend-path
andprepend-path
commands to add a path element already registered in variable. - Introduce the
--index
argument option toremove-path
command to delete a path entry by passing its position index in variable. - Provide the ability to setup a site-specific configuration sourced at the start of
modulecmd.tcl
main procedure. This configuration is a Tcl script namedsiteconfig.tcl
which enables to supersede any Tcl definition made inmodulecmd.tcl
. Location of this file is controlled at configure time with the--etcdir
option. - Add the ability to handle paths containing reference to environment variable in
MODULEPATH
. When these kind of paths are used bymodule
command, the variable references are converted to their corresponding value or to an empty string if they are not defined. - Enclose value set to environment variable on Tcl within curly braces rather double quotes to protect special characters in it from interpretation.
- Correctly parse
.modulespath
initialization file to handle lines without any#
character or to handle files with no content to extract. - Re-introduce the
--enable-versioning
configure option, which appends Modules version to installation prefix and deploy aversions
modulepath shared between all versioning enabled Modules installation. A modulefile corresponding to Modules version is added to the shared modulepath and enables to switch from one Modules version to another. - Fix removal of CMake generated temporary script file by stripping newline character from script file name.
- Add
MODULES_CMD
environment variable to expose path to the currently active module command script. This variable is set at initialization time. - Introduce
modulecmd
wrapper script, installed in binary directory, which executes the active module command. - Fix modulefile Tcl interpreter reset when handling list variables. (fix issue#145)
- Introduce 'module-virtual' modulefile Tcl command to associate a virtual module name to a modulefile. This module can be located with its virtual name and the associated modulefile is the script interpreted when loading, unloading, etc.
- Resolution of relative paths occurring during a modulefile interpretation to target a modulefile or a modulepath now takes the directory of the currently interpreted modulefile as the current working directory to solve the relative paths.
4.0.0
Starting with this release, modules-tcl has become Modules. The following changes describe the differences with last modules-tcl release (1.923). To learn about the changes between this release and last Modules 3.2 release, please see the MIGRATING document.
- Relax constraint on command-line argument position so options and switches can be passed either before or after command name.
- Report
unsupported option
warning rather stop on error when compatibility-version specific command-line switches are passed (--force
,--human
,--verbose
,--silent
,--create
,--icase
,--userlvl
). - Keep empty
module load
line in shell configuration files after running theinitrm
orinitclear
commands. - Always return the value of
tcl_platform(osVersion)
foruname release
- Optimize code output, for Perl to only return
1;
once for a no-operation situation and for Python to notimport os
when there is only an error to render. - Use value of system command
uname -n
foruname nodename
. - Add support for CMake shell
- Ignore
/
character used as suffix in modulefile name passed on command line. - Rename Perl initialization script in
perl.pm
and Python inpython.py
. - Add support for Ruby shell (with contribution from Tammo Tjarks)
- Add support for R shell (with contribution from Roy Storey)
- When a default is set for a given module name, target modulefile can be referred on as modulename/default in addition to just modulename.
- Locate symbolic versions on
avail
command even these symbols are set over a module alias or another symbolic version. In this situation the symbol spread along the resolution path until reaching a modulefile. - Define a more standard shebang on modulecmd.tcl script.
- Determine modulefile corresponding to given module name using the loaded context only on
unload
situation. - Enable to unload mod/dir/subdir/vers when unload of mod or mod/dir asked. Was previously working only if deep module to unload was also the default version for these root names.
- Make -l/-t switches mutually exclusive. Last switch mentioned on the command-line is honored.
- Output parsable modulepath header when -l/-t switches are enabled.
- When searching for a module in a given modulepath directory, if a module alias or a symbolic version matches searched module but the target of this alias or symbol is not found in current modulepath directory,
search for this target restarting search from the first modulepath in list to ensure modulepath priority. - Solve aliases or symbolic versions looking for all modulepaths on
search
andpaths
commands. Was previously solved if their target was found in same modulepath directory. - Add support for hidden dot modulefiles. A hidden modulefile does not appear in case of wild search, it is only returned when search is about its exact name.
- No table header print in --long mode on an
avail
command if no result are returned. - Add blank line between displayed list of elements, for instance between modulepath content on
avail
command. - Improve readability of error messages encountered during modulefile execution by putting Tcl error message first after the
Module ERROR
prefix. - Do not exit immediately when an internal error occurs in currently interpreted modulefile. Consider this interpretation as failed and continue to proceed the other modulefile arguments.
- When multiple modulefiles are passed on
display
,help
andtest
commands only output one separator line between 2 interpreted modulefiles. - Fix environment settings stack handling issue when restoring stack after a failed attempt to load a modulefile in a modulefile.
- Failed attempt to load or unload a modulefile within a modulefile now leads to this upper modulefile load or unload failure. Previously upper modulefile were loaded respectively unloaded even if its dependent sub-modulefile failed to load or unload.
- During a
switch
command, if the unloading part fails the loading part will not be tried. Unloading part fails if module to unload does not exist or its unload interpretation raise error. - Init: use
module source
rather shell commandsource
to load modulerc system configuration in sh-kind, csh-kind and fish shell init scripts. - Install: transform configuration options to bind to an existing compatibility Modules version into option (--enable-compat-version) to build and install this compatibility version along with main version.
- Init: adapt initialization scripts to handle both main and compatibility version. By default a shell script enables main version and if the environment variable MODULES_USE_COMPAT_VERSION is set to 1, the compatibility version is enabled instead of main version.
- Install: import from compatibility version and install
add.modules
andmkroot
utility scripts (scripts developed by R.K. Owen). - Install: update RPM spec file to handle compatibility version as a
compat
sub-package. - Add completion script for Fish shell (contribution from BEFH).
- Doc: extend content of diff_v3_v4 to details all noticeable changes between v3.2 and v4.0.
- Doc: introduce MIGRATING guide to learn the major changes when moving from v3.2 to v4.0.
- Fix
list
command when full pathname modulefile is loaded (fix bug#132) - Install: handle version number though git tags in scripts, documentation and RPM spec file.
- Doc: migrate documents from POD format to reStructuredText to benefit from Sphinx documentation framework and Read The Docs publishing capabilities.
Above changes describe the differences with modules-tcl release 1.923. To learn about the changes between Modules 4.0 and last Modules 3.2 release, please see the MIGRATING document.
4.0.0-beta
Starting with this release, modules-tcl has become Modules. The following changes describe the differences with last modules-tcl release (1.923). To learn about the changes between this release and last Modules 3.2 release, please see MIGRATING.
- Relax constraint on command-line argument position so options and switches can be passed either before or after command name.
- Report 'unsupported option' warning rather stop on error when compatibility-version specific command-line switches are passed (
--force
,--human
,--verbose
,--silent
,--create
,--icase
,--userlvl
). - Keep empty
module load
line in shell configuration files after running theinitrm
orinitclear
commands. - Always return the value of
tcl_platform(osVersion)
foruname release
- Optimize code output, for Perl to only return
1;
once for a no-operation situation and for Python to not 'import os' when there is only an error to render. - Use value of system command
uname -n
foruname nodename
. - Add support for CMake 'shell'
- Ignore '/' character used as suffix in modulefile name passed on command line.
- Rename Perl initialization script in
perl.pm
and Python inpython.py
. - Add support for Ruby 'shell' (with contribution from Tammo Tjarks)
- Add support for R 'shell' (with contribution from Roy Storey)
- When a 'default' is set for a given module name, target modulefile can be referred on as 'modulename/default' in addition to just 'modulename'.
- Locate symbolic versions on 'avail' command even these symbols are set over a module alias or another symbolic version. In this situation the symbol spread along the resolution path until reaching a modulefile.
- Define a more standard shebang on
modulecmd.tcl
script. - Determine modulefile corresponding to given module name using the loaded context only on
unload
situation. - Enable to unload 'mod/dir/subdir/vers' when unload of 'mod' or 'mod/dir' asked. Was previously working only if deep module to unload was also the default version for these root names.
- Make
-l
/-t
switches mutually exclusive. Last switch mentioned on the command-line is honored. - Output parsable modulepath header when
-l
/-t
switches are enabled. - When searching for a module in a given modulepath directory, if a module alias or a symbolic version matches searched module but the target of this alias or symbol is not found in current modulepath directory, search for this target restarting search from the first modulepath in list to ensure modulepath priority.
- Solve aliases or symbolic versions looking for all modulepaths on 'search' and paths' commands. Was previously solved if their target was found in same modulepath directory.
- Add support for hidden 'dot' modulefiles. A hidden modulefile does not appear in case of wild search, it is only returned when search is about its exact name.
- No table header print in
--long
mode on anavail
command if no result are returned. - Add blank line between displayed list of elements, for instance between modulepath content on 'avail' command.
- Improve readability of error messages encountered during modulefile execution by putting Tcl error message first after the
Module ERROR
prefix. - Do not exit immediately when an internal error occurs in currently interpreted modulefile. Consider this interpretation as failed and continue to proceed the other modulefile arguments.
- When multiple modulefiles are passed on 'display', 'help' and 'test' commands only output one separator line between 2 interpreted modulefiles.
- Fix environment settings stack handling issue when restoring stack after a failed attempt to load a modulefile in a modulefile.
- Failed attempt to load or unload a modulefile within a modulefile now leads to this upper modulefile load or unload failure. Previously upper modulefile were loaded respectively unloaded even if its dependent sub-modulefile failed to load or unload.
- During a 'switch' command, if the unloading part fails the loading part will not be tried. Unloading part fails if module to unload does not exist or its unload interpretation raise error.
- Init: use 'module source' rather shell command 'source' to load modulerc system configuration in sh-kind, csh-kind and fish shell init scripts.
- Install: transform configuration options to bind to an existing compatibility Modules version into option (
--enable-compat-version
) to build and install this compatibility version along with main version. - Init: adapt initialization scripts to handle both main and compatibility version. By default a shell script enables main version and if the environment variable
MODULES_USE_COMPAT_VERSION
is set to 1, the compatibility version is enabled instead of main version. - Install: import from compatibility version and install 'add.modules' and 'mkroot' utility scripts (scripts developed by R.K. Owen).
- Install: update RPM spec file to handle compatibility version as a 'compat' sub-package.
- Add completion script for Fish shell (contribution from BEFH).
- Doc: extend content of
diff_v3_v4
to details all noticeable changes between v3.2 and v4.0. - Doc: introduce
MIGRATING
guide to learn the major changes when moving from v3.2 to v4.0.