/usr/share/doc/environment-modules
Edit: /usr/share/doc/environment-modules/ChangeLog (1785173B)
2023-05-14 Xavier Delaruelle
* MIGRATING.rst, NEWS.rst, contrib/rpm/environment-modules.spec.in,
doc/source/conf.py, testsuite/modules.51-scan/020-avail_output-variant.exp,
version.inc.in: Release of version 5.3.0
* MIGRATING.rst: doc: desc +/- value prefix for opts/configs in MIGRATING
* NEWS.rst, tcl/subcmd.tcl.in, testsuite/modulefiles.3/bar/2.0,
testsuite/modules.50-cmds/460-sticky.exp,
testsuite/modules.50-cmds/461-super-sticky.exp: No sticky mod unload if
switched-on mod does not exist Fix switch sub-command not to unload sticky
or super-sticky module when switched-on module does not exist. Fixes #492
2023-05-13 Xavier Delaruelle
* configure: install: fix SC20{04,28,86} warnings in configure
* doc/source/module.rst: doc: desc +/- value prefix for opts/configs in man
2023-05-12 Xavier Delaruelle
* NEWS.rst, doc/source/changes.rst: doc: desc +/- value prefix for
opts/configs in NEWS/CHANGES
2023-05-11 Xavier Delaruelle
* testsuite/modules.70-maint/360-avail_output.exp,
testsuite/modules.70-maint/361-list_output.exp: ts: test -o/--output value
append/subtract in 70/36{0,1}
2023-05-10 Xavier Delaruelle
* tcl/init.tcl.in, tcl/main.tcl.in: Allow append/subtract value with
--output option Allow to append or subtract value on avail_*output and
list_*output configuration options through --output command line switch. If
value associated to --output/-o switch starts with '+' or '-', this new
value is respectively appended or subtracted from existing configuration
value.
* tcl/main.tcl.in: Fix duplicate space character in option parsing code
2023-05-09 Xavier Delaruelle
* testsuite/modules.70-maint/220-config.exp: ts: test append/subtract config
option value in 70/220
* tcl/main.tcl.in, testsuite/modules.70-maint/220-config.exp: Allow to pass
value starting with '-' on config subcmd Allow to pass configuration option
value starting with minus sign (-) on config sub-command. Was previously
mistaken with command-line switches. This change allows to subtract a value
to a configuration option already set.
* tcl/subcmd.tcl.in: Config option value append or subtract for list option
Allow to update colon-separated list configuration option with config
sub-command. If new value starts with '+' or '-', this new value is
respectively appended or subtracted from existing configuration value.
* doc/source/design/add-new-config-option.rst, tcl/init.tcl.in,
tcl/main.tcl.in, tcl/subcmd.tcl.in, testsuite/example/siteconfig.tcl-1: Add
value kind attribute in config option definition array Update configuration
option definition array (g_config_defs) to add value kind attribute as 4th
entry in definition list. This attribute has following possible values: 'i'
for integer, 's' for string, 'b' for boolean, 'l' for colon-separated list,
'o' for other.
2023-05-08 Xavier Delaruelle
* tcl/report.tcl.in: Mention 'variant' as --output example value in usage
msg
* doc/source/changes.rst: doc: desc. avail/paths/whatis/list search query
changes
* .aspell.en.pws, MIGRATING.rst, NEWS.rst: doc: desc. variantifspec in
NEWS/MIGRATING
2023-05-07 Xavier Delaruelle
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/370-variant.exp: ts: adapt and add variantifspec
tests in 70/370
* testsuite/modules.70-maint/220-config.exp,
testsuite/modules.70-maint/360-avail_output.exp: ts: adapt tests for
variantifspec val in avail_*output cfgs in 70/{220,360}
* INSTALL.rst, configure, doc/source/changes.rst, doc/source/module.rst:
install/doc: desc. variantifspec addition to avail_{,terse_}output
variantifspec new value is also added to the default list of value for these
configuration options.
* doc/source/design/output-configuration.rst,
doc/source/design/variants.rst: doc: desc. variantifspec report on avail in
design notes
* .aspell.en.pws, tcl/init.tcl.in, tcl/report.tcl.in: Add variantifspec
value to avail_{,terse_}output config Report defined variants on avail
regular or terse output if some variant is specified in search query.
2023-05-06 Xavier Delaruelle
* testsuite/modules.20-locate/070-homerc.exp: ts: add
ignore_user_rc/--ignore-user-rc tests in 20/070
* doc/source/module.rst: doc: desc ignore_user_rc/--ignore-user-rc in man
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/220-config.exp: ts: test ignore_user_rc config
option
* INSTALL.rst, NEWS.rst: doc: desc ignore_user_rc/--ignore-user-rc in
NEWS/INSTALL
* doc/source/changes.rst: doc: desc --ignore-user-rc/ignore_user_rc in
changes
* init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init:
add ignore_user_rc/--ignore-user-rc to comp script
* tcl/modfind.tcl.in: Ignore user rc when ignore_user_rc enabled Do not
evaluate user-specific module rc file when ignore_user_rc configuration is
enabled. Fixes #479
* tcl/init.tcl.in, tcl/main.tcl.in, tcl/report.tcl.in: Add ignore_user_rc
configuration option Add ignore_user_rc configuration option that controls
whether or not the $HOME/.modulerc file should be ignored. Disabled by
default. When configuration is modified it sets the MODULES_IGNORE_USER_RC
environment variable. --ignore-user-rc command line switch can be used to
enable ignore_user_rc for current execution.
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst,
tcl/mfinterp.tcl.in, testsuite/modulefiles.3/refresh/1.0,
testsuite/modulefiles.3/refresh/2.0,
testsuite/modules.50-cmds/078-refresh.exp,
testsuite/modules.50-cmds/083-info-mode.exp,
testsuite/modules.50-cmds/084-info-mode-exp.exp,
testsuite/modules.50-cmds/085-info-flags.exp,
testsuite/modules.50-cmds/310-puts.exp,
testsuite/modules.50-cmds/311-puts-prestdout.exp,
testsuite/modules.70-maint/230-verbosity.exp: Refresh modules that put
content to stdout/prestdout Mark modulefile qualified for refresh
evaluation when puts command is used to send content to stdout or prestdout
channels. Such loaded modules where wrongly skipped during refresh unless
if they declared another volatile environment change. Choice is made to
also refresh modules that put content to stdout/prestdout to keep the
behavior of Modules 3.2 Fixes #488
2023-05-03 Xavier Delaruelle
* NEWS.rst, doc/source/module.rst: doc: desc. extra specifier in man
2023-05-02 Xavier Delaruelle
* MIGRATING.rst: doc: desc. extra specifier work in MIGRATING
* NEWS.rst: doc: desc. extra specifier work in NEWS
2023-04-24 Xavier Delaruelle
* testsuite/modulefiles.4/extra/1.0,
.../modules.51-scan/042-extra_spec-conflict.exp,
.../modules.51-scan/043-extra_spec-require.exp: ts: add module switch extra
spec tests in 51/04{2,3}
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/042-extra_spec-conflict.exp: ts: add conflict
extra spec tests in 51/042
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/042-extra_spec-conflict.exp: ts: add module unload
extra spec tests in 51/042
2023-04-23 Xavier Delaruelle
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/043-extra_spec-require.exp: ts: add module
load-any extra spec tests in 51/043
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/043-extra_spec-require.exp: ts: add module
try-load extra spec tests in 51/043
* testsuite/modulefiles.4/extra/1.0,
.../modules.51-scan/043-extra_spec-require.exp: ts: add module erroneous
extra spec tests in 51/043
* testsuite/modulefiles.4/extra/1.0,
.../modules.51-scan/043-extra_spec-require.exp: ts: add module load extra
spec tests in 51/043
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/043-extra_spec-require.exp: ts: add always-load
extra spec tests in 51/043
2023-04-20 Xavier Delaruelle
* .aspell.en.pws, doc/source/design/extra-match-search.rst: doc: desc. mod
spec filtering in EMS spec
2023-04-17 Xavier Delaruelle
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/043-extra_spec-require.exp: ts: add
prereq-all/depends-on extra spec tests in 51/043
2023-04-08 Xavier Delaruelle
* testsuite/modulefiles.4/.modulerc,
testsuite/modulefiles.4/extra/.modulerc, testsuite/modulefiles.4/extra/1.0,
testsuite/modulefiles.4/xtbar/1.0, testsuite/modulefiles.4/xtbar/2.0,
testsuite/modulefiles.4/xtfoo/1.0,
.../modules.51-scan/043-extra_spec-require.exp: ts: add prereq/prereq-any
extra specifier tests in 51/043
2023-04-12 Xavier Delaruelle
* tcl/modscan.tcl, tcl/modspec.tcl: Parse mod spec in extra specifier value
with getavails on For some extra specifier, a module specification is
expected as value. For them parse this module specification with resolution
of all matching available modules. During extra match search process, test
match of specification against all matching available modules recorded when
parsing spec. modEq procedures have been updated to fetch available module
names recorded in module version spec structure as alternative names for
spec when ismodlo argument is set to 5. modVariantCmp procedure has been
updated to let a missing variant definition of mod be considered as a match.
As compared pattern and mod are switched on extra specifier context (pattern
is definition found in modulefile and mod is also a pattern used for extra
specifier definition on command line). Note that this methodology is not
yet perfect as aliases, symbolic versions and modules that do not exist are
not part of the list of available modules returned.
2023-04-11 Xavier Delaruelle
* .aspell.en.pws, tcl/coll.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in,
tcl/modeval.tcl, tcl/modfind.tcl.in, tcl/modscan.tcl, tcl/modspec.tcl,
tcl/subcmd.tcl.in, testsuite/example/siteconfig.tcl-1: Record avail mods
matching mod spec when parsing it Update module specification parsing
mechanism to add a getavails argument. It indicates that available modules
matching spec should be searched in enabled modulepaths to record them in
module version specification structure. When searching for available
matching modules, disable extra match search to avoid an infinite resolution
loop.
2023-04-10 Xavier Delaruelle
* tcl/modspec.tcl: Parse extra specifier prior variant Give more priority
to extra specifier (name:value) than variant specification (name=value) as
extra specifier accepting a module specification as value may contain a
variant specification. For instance: "prereq:mod@1.0 foo=value".
* tcl/modspec.tcl: Skip arg split when parsing modspec if extra spec
detected Update module specification parsing to skip argument split when an
extra specifier is detected. Value for extra specifier may be a module
specification, thus argument split on version specifier or variant shortcut
should be skipped to keep extra specifier value as one string.
2023-04-09 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.51-scan/030-scan_eval-avail.exp,
testsuite/modules.51-scan/031-scan_eval-whatis.exp,
testsuite/modules.51-scan/032-scan_eval-paths.exp: ts: adapt existing tests
to extra specifier changes
* tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in, tcl/modfind.tcl.in,
tcl/modspec.tcl, tcl/report.tcl.in, tcl/util.tcl: Refer to string index with
M+N notation As M+N notation is now a valid syntax to refer to a string
index (starting Tcl 8.5), change code to use this syntax rather using expr
to compute an index value.
2023-04-05 Xavier Delaruelle
* tcl/mfinterp.tcl.in, tcl/modscan.tcl, tcl/modspec.tcl: Record conflict
during scan eval conflict command is an extra specifier. incompat is an
alias of it.
* tcl/modscan.tcl, tcl/modspec.tcl: Record module switch during scan eval
switch sub-command name is an extra specifier. Switched-on module
specification also matches switch-on and require extra specifier aliases.
With two-arg form module switch, switched-off module specification also
matches switch-off and incompat extra specifier aliases.
2023-04-04 Xavier Delaruelle
* tcl/modscan.tcl, tcl/modspec.tcl: Record module unload during scan eval
unload sub-command name is an extra specifier. incompat is an alias of it.
* tcl/mfinterp.tcl.in, tcl/modscan.tcl, tcl/modspec.tcl: Record module
load/load-any/try-load during scan eval load, try-load and load-any
sub-command names are an extra specifier. require is an alias of them.
2023-04-03 Xavier Delaruelle
* tcl/mfinterp.tcl.in, tcl/modscan.tcl, tcl/modspec.tcl: Record always-load
definitions during scan eval require is an alias of always-load extra
specifier.
* tcl/mfinterp.tcl.in, tcl/modscan.tcl, tcl/modspec.tcl: Record
prereq-all/depends-on definitions during scan eval require, prereq-all and
depends-on are aliases of prereq-all and depends-on extra specifiers.
2023-03-12 Xavier Delaruelle
* tcl/modscan.tcl: Match module designation for some extra specifiers
Update extra specifier query test for those whose value is a module
specification. Currently prereq, require and prereq-any extra specifiers
accept a module specification as value. This module specification is
matched against the specification passe to the corresponding modulefile Tcl
command. Match is done with modEq procedure. LIMITATION: not all module
specification currently works as modEq is made to compare a module
specification against a qualified module name and version. Using module
generic name or advanced version specifiers on extra specifier value will
not currently work.
2023-03-11 Xavier Delaruelle
* tcl/mfinterp.tcl.in, tcl/modscan.tcl, tcl/modspec.tcl: Record
prereq/prereq-any definitions during scan eval require and prereq-any are
aliases of prereq and prereq-any extra specifiers.
2023-03-16 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.51-scan/040-extra_spec.exp: ts: test extra spec on
non-search cmds in 51/040
* tcl/coll.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl,
tcl/modfind.tcl.in, tcl/modspec.tcl, tcl/subcmd.tcl.in,
testsuite/example/siteconfig.tcl-1: Raise error when extra spec on
non-search cmds Extra specification in module search query is only allowed
on search sub-commands (avail, paths, whatis). An error is raised when
parsing a module specification if it contains an extra specification on a
non-search context. xtspec argument is added to parseModuleSpecification
procedure to know if extra specification is allowed or not.
2023-03-09 Xavier Delaruelle
* .aspell.en.pws, doc/source/design/extra-match-search.rst: doc: desc. extra
specifier in EMS design
2023-03-12 Xavier Delaruelle
* tcl/modspec.tcl, testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.51-scan/040-extra_spec.exp,
testsuite/modules.51-scan/041-extra_spec-env.exp: Raise error when unknown
extra specifier used
* testsuite/modulefiles.4/extra/1.0,
.../modules.51-scan/042-extra_spec-conflict.exp: ts: add family extra
specifier tests in 51/042
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record family definitions during
scan eval
2023-03-11 Xavier Delaruelle
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/041-extra_spec-env.exp: ts: add setenv duplicate
definition test in 51/041
* tcl/modscan.tcl: Rework extra specifier filtering Update extra match
search process to filter results with extra specifiers only one after all
modulefile scan evaluations. As g_scanModuleElt global structure
consolidates all modules matching a given extra specifier criteria (element
> name = list of matching modules), with one test per extra specifier
criteria result can be obtain. Instead of testing each module against the
criteria independently. doesModExtraMatch procedure is removed and replaced
by getModMatchingExtraSpec to achieve this single global criteria match
test.
* tcl/util.tcl: Add getIntersectBetweenList helper procedure Compute
intersection of multiple lists with getIntersectBetweenList procedure.
2023-03-10 Xavier Delaruelle
* testsuite/modules.51-scan/040-extra_spec.exp: ts: test unknown extra
specifier and special char in 50/040
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/041-extra_spec-env.exp: ts: add extra specifier
tests with source-sh in 51/041
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/041-extra_spec-env.exp: ts: add erroneous env
extra specifier tests in 51/041
* testsuite/modulefiles.4/extra/1.0,
testsuite/modules.51-scan/041-extra_spec-env.exp: ts: add other env extra
specifier tests in 51/041
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record chdir definitions during scan
eval
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record unset-function definitions
during scan eval
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record set-function definitions
during scan eval
2023-03-09 Xavier Delaruelle
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record unset-alias definitions
during scan eval
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record set-alias definitions during
scan eval
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record uncomplete definitions during
scan eval
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record complete definitions during
scan eval
2023-03-08 Xavier Delaruelle
* testsuite/modulefiles.4/extra/1.0, testsuite/modulefiles.4/extra/2.0,
testsuite/modules.51-scan/041-extra_spec-env.exp: ts: add envvar extra
specifier tests in 51/041
* testsuite/modulefiles.4/extra/1.0, testsuite/modulefiles.4/extra/2.0,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.51-scan/040-extra_spec.exp: ts: initial tests for extra
specifiers in 51/040
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record unsetenv definitions during
scan eval
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record pushenv definitions during
scan eval
2023-03-07 Xavier Delaruelle
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record *-path definitions during
scan eval
2023-03-05 Xavier Delaruelle
* tcl/mfinterp.tcl.in, tcl/modscan.tcl: Record setenv definition during scan
eval
* tcl/modscan.tcl: Record variant name in scanned mod element When
evaluating a variant command in scan mode, record that this module defines a
variant with its name. This information is saved in g_scanModuleElt global
structure (Tcl dict). This structure is then used to test if extra
specifiers of search query match definition of available modules. Fixes
#408
* tcl/modscan.tcl: Filter avail module based on extra specifier Update
extra match search process to allow specification of extra specifiers in
addition to module name, version and variants. Filter results through extra
match search to only return modules matching extra specifiers (where
specified element and name is defined by module).
* tcl/modscan.tcl: EMS required if mod spec contains extra specifier During
avail, paths or whatis sub-commands
* tcl/modspec.tcl: Parse extra specifiers in module specification When
parsing module specification, take into account extra specifiers (elt:name)
and record them in g_moduleVersSpec structure. Add getExtraListFromVersSpec
utility procedure to get the extra specifiers of the specification.
2023-04-27 Xavier Delaruelle
* MIGRATING.rst, doc/source/_static/terminal_output.css, doc/source/conf.py:
doc: desc. Querying available module variants in MIGRATING
2023-04-24 Xavier Delaruelle
* .github/workflows/windows_tests.yaml: gh: install new tcl-devel package on
MSYS2
2023-03-07 Xavier Delaruelle
* doc/source/design/extra-match-search.rst, tcl/modfind.tcl.in,
testsuite/modulefiles.4/scan/.modulerc, testsuite/modulefiles.4/scan/1.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp: Fix EMS filter against
alias overriding dir Directory information override alias in result
structure if extra match search is required.
2023-03-06 Xavier Delaruelle
* tcl/modscan.tcl, testsuite/modules.51-scan/030-scan_eval-avail.exp: Fix
EMS filter against not matching dot hidden symbol
2023-03-02 Xavier Delaruelle
* .aspell.en.pws, doc/source/design/extra-match-search.rst: doc: desc extra
match search query grammar in design
2023-02-28 Xavier Delaruelle
* NEWS.rst, doc/source/module.rst: doc: desc extra match search process in
man
* doc/source/module.rst: doc: use pattern terminology on whatis/paths desc.
* NEWS.rst: doc: desc. search variant name/value highlight in NEWS
2023-02-27 Xavier Delaruelle
* doc/source/design/extra-match-search.rst,
doc/source/design/source-shell-script-in-modulefile.rst,
tcl/mfinterp.tcl.in: Interpret source-sh cmd on scan mode as on load mode
* doc/source/design/extra-match-search.rst: doc: update extra match search
spec for error entries
2023-02-26 Xavier Delaruelle
* testsuite/modulefiles.4/scan/1.0, testsuite/modulefiles.4/scan/2.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp,
testsuite/modules.51-scan/031-scan_eval-whatis.exp,
testsuite/modules.51-scan/032-scan_eval-paths.exp: ts: access issue and EMS
on avail/whatis/paths
* testsuite/modulefiles.4/scan/1.0, testsuite/modulefiles.4/scan/2.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp,
testsuite/modules.51-scan/031-scan_eval-whatis.exp,
testsuite/modules.51-scan/032-scan_eval-paths.exp: ts: special chars and EMS
on avail/whatis/paths
* testsuite/modulefiles.4/scan/1.0, testsuite/modulefiles.4/scan/2.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp: ts: add no-indepth avail
EMS tests in 51/030
* doc/source/design/extra-match-search.rst, tcl/modfind.tcl.in: Fetch all
files if no-indepth mode and EMS asked In case no-indepth mode is asked and
extra match search should be performed, traditional file lookup (by
``findModules``) is made to return all existing files. Not only those
matching depth level. As extra match filtering process may eliminate some
entries, all of them should be tested to obtain accurate result.
2023-02-24 Xavier Delaruelle
* testsuite/modulefiles.4/scan/.modulerc, testsuite/modulefiles.4/scan/1.0,
testsuite/modulefiles.4/scan/2.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp,
testsuite/modules.51-scan/031-scan_eval-whatis.exp,
testsuite/modules.51-scan/032-scan_eval-paths.exp: ts: auto symbols and EMS
on avail/whatis/paths
2023-02-23 Xavier Delaruelle
* testsuite/modulefiles.4/scan/.modulerc, testsuite/modulefiles.4/scan/1.0,
testsuite/modulefiles.4/scan/2.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp,
testsuite/modules.51-scan/031-scan_eval-whatis.exp,
testsuite/modules.51-scan/032-scan_eval-paths.exp: ts: default symbol and
EMS on avail/whatis/paths
* testsuite/modules.51-scan/030-scan_eval-avail.exp,
testsuite/modules.51-scan/031-scan_eval-whatis.exp,
testsuite/modules.51-scan/032-scan_eval-paths.exp: ts: adapt wild variant
avail/whatis/paths tests in 51/03{0,1,2}
* tcl/modfind.tcl.in, tcl/modspec.tcl: Disable auto symbols on wild search
with variant Do not compute auto symbols if search query does not contain a
module name and version but contain variant specification. Add
isSpecWildWithVariant procedure to determine if search query is wild with
variant specification. Disabling auto symbols is especially useful for
sub-commands like 'paths' that take getModules result and try to resolve
each entry. In this situation it is important not to have any auto symbol
that indirectly targets an element withdrawn from extra match filter.
* doc/source/design/extra-match-search.rst, tcl/modfind.tcl.in: Correctly
handle auto symbols during EMS Move extra match search in getModules from
phase 3 to phase 4 to proceed after auto symbols computation. Add auto
symbols defined in versmod_list structure so extra match search filtering
can unset these elements if their target is filtered out.
2023-02-21 Xavier Delaruelle
* testsuite/modules.51-scan/032-scan_eval-paths.exp: ts: test alias/sym
filtering during EMS on paths
* testsuite/modulefiles.4/scan/1.0, testsuite/modulefiles.4/scan/2.0,
testsuite/modules.51-scan/031-scan_eval-whatis.exp: ts: test alias/sym
filtering during EMS on whatis
2023-02-20 Xavier Delaruelle
* doc/source/design/extra-match-search.rst: doc: update extra match search
spec for alias/sym
* testsuite/etc/modulerc.scan, testsuite/modulefiles.4/scan/.modulerc,
testsuite/modulefiles.4/scan/1.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp: ts: test alias filtering
during extra match search in 51/030
2023-02-19 Xavier Delaruelle
* testsuite/etc/modulerc.scan, testsuite/modulefiles.4/foo/.modulerc,
testsuite/modulefiles.4/foo/1.0, testsuite/modulefiles.4/scan/.modulerc,
testsuite/modulefiles.4/scan/1.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp: ts: test symbol filtering
during extra match search in 51/030
2023-02-18 Xavier Delaruelle
* tcl/modfind.tcl.in, tcl/modscan.tcl: Filter sym ver if target unset during
extra match Unset the symbolic version elements targeting an element
removed during the extra match search.
* testsuite/modules.70-maint/370-variant.exp: ts: no mod name/vers but vr
spec on avail/paths in 70/370
* testsuite/modules.70-maint/375-variant-whatis.exp: ts: no mod name/vers
but vr spec on whatis in 70/375
2023-02-17 Xavier Delaruelle
* .../021-avail_output-variant-sgr.exp: ts: no mod name/vers but vr spec on
colored avail in 51/021
* testsuite/modules.70-maint/370-variant.exp: ts: test variant spec only on
module list in 70/370
2023-02-16 Xavier Delaruelle
* testsuite/modules.70-maint/370-variant.exp: ts: test variant spec
highlight on module list in 70/370
* testsuite/modulefiles.3/variant/6.0,
testsuite/modules.70-maint/370-variant.exp,
testsuite/modules.70-maint/375-variant-whatis.exp: ts: test free value
variant spec on av/is-avail/wh/paths
2023-02-15 Xavier Delaruelle
* testsuite/modulefiles.3/variant/1.0, .../021-avail_output-variant-sgr.exp:
ts: test to color selected variant name and value in 51/021
2023-02-11 Xavier Delaruelle
* .../021-avail_output-variant-sgr.exp,
testsuite/modules.70-maint/370-variant.exp,
testsuite/modules.70-maint/371-variant-msg.exp,
.../modules.70-maint/377-variant-shortcut.exp: ts: adapt existing sgr
variant tests Take into account sgr output code change due to variant sgr
highlight feature.
2023-02-09 Xavier Delaruelle
* tcl/modfind.tcl.in, tcl/report.tcl.in: Highlight searched variant name and
value in output
2023-02-05 Xavier Delaruelle
* tcl/mfinterp.tcl.in: No error count raise during scan evaluation If the
evaluation of a modulefile aborts (due to a break or exit error), do not
increase error count if evaluation mode is scan. As scan is a global
operation, like an avail search, an error on one modulefile should not
impact the overall result of the scan.
2023-02-03 Xavier Delaruelle
* testsuite/install.00-init/030-options.exp: ts: fix version module avail
resolution in install 00/030
* testsuite/modules.70-maint/376-variant-tag.exp: ts: add hide/forbid tag
tests applying to variant in 70/376
2023-02-01 Xavier Delaruelle
* tcl/modscan.tcl: Inhibit error report during scan mode evaluations
Disable error reporting to avoid modulefile errors to pollute output. This
is particularly useful when dealing with modulefile that does not cope with
scan mode evaluation.
2023-01-31 Xavier Delaruelle
* testsuite/modulefiles.3/variant/6.0,
testsuite/modules.70-maint/370-variant.exp,
testsuite/modules.70-maint/375-variant-whatis.exp,
testsuite/modules.70-maint/376-variant-tag.exp: ts: test variant spec on
avail/whatis/paths Adapt existing avail, whatis, is-avail, path and paths
tests that demonstrate whether sub-command takes variant specification into
account or not. Add boolean variant, shortcut variant tests. Add also more
tests of scan evaluation for avail/whatis/paths when module is forbidden.
2023-01-30 Xavier Delaruelle
* NEWS.rst: doc: desc variant spec on avail/list/paths/whatis in NEWS
2023-01-29 Xavier Delaruelle
* .aspell.en.pws, doc/source/design/module-selection-contexts.rst,
doc/source/design/variants.rst: doc: desc extra match search in
variant/selection notes
2023-01-26 Xavier Delaruelle
* tcl/coll.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl,
tcl/modfind.tcl.in, tcl/modspec.tcl, tcl/subcmd.tcl.in,
testsuite/example/siteconfig.tcl-1: Allow module spec without name on
several subcmds Allow module specification with variant definition and no
module name version for avail, list, paths and whatis sub-commands.
2023-01-19 Xavier Delaruelle
* tcl/modscan.tcl: Filter avail module based on variant specification
Update extra match search process to allow specification of module variants
in addition to module name and version. Filter results through extra match
search to only return modules matching variant specification (where
specified variant name and value is defined for module).
2023-01-17 Xavier Delaruelle
* contrib/modulefiles/module-info: contrib: fix module-info example
modulefile for scan mode
* tcl/modscan.tcl: Extra match search required if mod spec contains variant
During avail, paths or whatis sub-commands
2023-01-14 Xavier Delaruelle
* testsuite/modulefiles.4/scan/.modulerc, testsuite/modulefiles.4/scan/1.0,
testsuite/modulefiles.4/scan/2.0,
testsuite/modules.51-scan/030-scan_eval-avail.exp: ts: add diverse scan mode
eval tests in 51/030
2023-01-12 Xavier Delaruelle
* testsuite/modulefiles.4/variant1/.modulerc,
testsuite/modulefiles.4/variant1/1.0, testsuite/modulefiles.4/variant1/2.0,
.../modules.51-scan/020-avail_output-variant.exp: ts: test scan evaluation
and output with variants in 51/020
2023-01-08 Xavier Delaruelle
* testsuite/modulefiles.3/variant/1.0, .../021-avail_output-variant-sgr.exp:
ts: add avail report sgr tests for free-value variant in 51/021
* tcl/modfind.tcl.in: Adapt report for free-value variant When reporting
value list of free-value variant, mention '*' to indicate all kind of values
are accepted. If a default value is defined or if module is loaded report
these values among variant value list.
2023-01-07 Xavier Delaruelle
* testsuite/modulefiles.3/variant/1.0,
testsuite/modules.51-scan/010-init_ts.exp,
.../021-avail_output-variant-sgr.exp,
testsuite/modules.51-scan/999-cleanup.exp: ts: test avail output with
rendition of default/loaded variant
2023-01-04 Xavier Delaruelle
* testsuite/modules.70-maint/370-variant.exp,
.../modules.70-maint/377-variant-shortcut.exp: ts: test list output with
rendition of default variant
2023-01-02 Xavier Delaruelle
* NEWS.rst: doc: desc. default/loaded variant value SGR in NEWS
* tcl/modfind.tcl.in, tcl/report.tcl.in: Adapt loaded variant report to
loaded kind To highlight loaded variant value use the sgr key associated to
the loaded kind (loaded or auto-loaded). Resolve abbreviation used for these
module tag to apply the correct SGR key.
* tcl/modfind.tcl.in: Fix boolean variant key report issue on avail output
2023-01-01 Xavier Delaruelle
* tcl/modfind.tcl.in, tcl/report.tcl.in: Adapt variant report to highlight
loaded variant value Update variant report mechanism to highlight variant
value if it is the loaded one (if this module is currently loaded). Use 'L'
sgr code highlight loaded variant value, like done for loaded module name
and version.
* tcl/modfind.tcl.in, tcl/modscan.tcl, tcl/report.tcl.in: Adapt variant
report to highlight default variant value Update variant report mechanism
to highlight variant value if it is the default one. Use 'de' sgr code
highlight default variant value, like done for default version. Both avail
and list output reports benefit from this highlight enhancement.
* tcl/modfind.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Adapt
multiple-value variant report to highlight comma Update variant report
mechanism to highlight comma separator when all available values of a
variant is reported. Use 'se' sgr code to highlight comma, like done for '{'
and '}'. The link to 'name=value' key entry is this way reinforced.
Introduce report mechanism #7 in getVariantList procedure to achieve this.
getVariantList will need refactoring.
2022-12-31 Xavier Delaruelle
* testsuite/modulefiles.4/info/mode7, testsuite/modulefiles.4/info/mode8,
testsuite/modules.50-cmds/083-info-mode.exp,
testsuite/modules.50-cmds/084-info-mode-exp.exp: ts: test scan mode on
module-info in 50/{083,084}
* doc/source/modulefile.rst: doc: desc. scan string returned by module-info
mode
* testsuite/modules.70-maint/220-config.exp,
testsuite/modules.70-maint/360-avail_output.exp: ts: adapt tests for variant
val in avail_*output cfgs in 70/{220,360}
* NEWS.rst: doc: desc. extra-match-search and variant report in NEWS
* INSTALL.rst, configure, doc/source/changes.rst, doc/source/module.rst:
install/doc: desc. variant addition to avail_{,terse_}output
* doc/source/design/output-configuration.rst,
doc/source/design/variants.rst: doc: desc. variant report on avail in design
notes
* tcl/init.tcl.in, tcl/modfind.tcl.in, tcl/report.tcl.in: Add variant value
to avail_{,terse_}output config Add the ability to report defined variants
on avail regular or terse output. Variant report is updated to output all
possible values in the name=value1,value2,... form. This form also applies
to boolean variant with on,off as possible values. Fixes #407
2022-12-30 Xavier Delaruelle
* .aspell.en.pws, tcl/mfinterp.tcl.in, tcl/modeval.tcl, tcl/modscan.tcl:
Configure scan evaluation mode for modulefile Add scan evaluation mode for
modulefile. It will analyzes modulefile content for extra match search
process. To define environment variable in modulefile context during
evaluation, use whatis-variant of environment variable edition modulefile
commands. Setup first specific scan-variant of a modulefile command with
variant-sc procedure. Reuse code from whatis-variant to initialize variant
value in environment when evaluating modulefile. Also gather variant
definition for modules in a global array structure.
* tcl/modfind.tcl.in, tcl/modscan.tcl: Add extra match search process
Update getModules procedure to insert extra match search at phase 3.
filterExtraMatchSearch procedure codes the extra match search process. As a
start, all modules in result are evaluated in scan mode.
* tcl/modscan.tcl: Add isExtraMatchSearchRequired proc Add
isExtraMatchSearchRequired procedure that determine if current module search
requires an extra match search. Extra match search is required currently if
variant should be reported in resulting output.
* .aspell.en.pws, Makefile, tcl/modscan.tcl: Add modscan.tcl code file Add
modscan.tcl code file that will host Tcl procedures for the scan modulefile
evaluation mode and the extra match search process.
* .aspell.en.pws, doc/source/design/extra-match-search.rst,
doc/source/design/module-cache.rst: doc: add initial version of
extra-match-search design
2023-04-14 Xavier Delaruelle
* NEWS.rst, contrib/rpm/environment-modules.spec.in: install: migrate to
SPDX licence format in RPM spec file
* NEWS.rst, init/bash_completion.in: init: fix nospace activation in bash
completion script Fix bash shell completion script to be able to complete
full name of available modules. Fixes #490.
2023-04-04 Xavier Delaruelle
* doc/source/module.rst: doc: clarify python initialization example Update
Python initialization example to precise that the init script should be
exec-ed in the global scope. This is important when init script is executed
from a function. This change helps to clarify a question asked on #483.
2023-03-21 Xavier Delaruelle
* NEWS.rst, script/gitlog2changelog.py.in: install: fix expected log format
in gitlog2changelog.py Update gitlog2changelog.py script to ensure git log
format is not influenced by user git configuration. Fixes #487.
2023-03-12 Xavier Delaruelle
* .codespellrc, .github/workflows/windows_tests.yaml: codespell: ignore
additional generated content
2023-03-04 Xavier Delaruelle
* Makefile, NEWS.rst: install: allow to build from short-depth git repo Fix
Makefile to allow building Modules from a git repository with short commit
depth. Fixes #486
2023-02-26 Xavier Delaruelle
* testsuite/config/base-config.exp: ts: escape shell text output for regexp
enabled tests
* .cirrus.yml: cirrus: tcl-tk homebrew pkg now use default location
2023-02-12 Xavier Delaruelle
* testsuite/modules.50-cmds/400-source-sh.exp,
testsuite/modules.70-maint/410-timer.exp: ts: fix tests when run with Tcl
9.0
* testsuite/config/base-config.exp: ts: update procedure to allow tests to
fail Provide a way to track tests that are expected to fail. Add failcmd
argument on all test procedure to indicate the fail command to use to report
test failure. Use fail command by default. When using xfail command, it
indicates that test is expected to fail.
2023-02-11 Xavier Delaruelle
* .github/workflows/linux_tests.yaml: gh: add new Linux test case for Tcl
9.0
* .github/workflows/linux_tests.yaml: gh: add new Linux test case for Tcl
8.7
* testsuite/modules.70-maint/451-stashpop.exp,
testsuite/modules.70-maint/452-stashrm.exp,
testsuite/modules.70-maint/453-stashshow.exp: ts: fix tests when run with
Tcl 8.7
2023-01-24 Xavier Delaruelle
* .aspell.en.pws, .cirrus.yml: cirrus: fix Codecov run on MacOS M1
environment Codecov tool is not available on arm64 platform. Use arch
utility to run x86_64 codecov binary on MacOS M1 virtual machine.
* NEWS.rst, tcl/mfinterp.tcl.in: Fix shell alias translation with fish shell
3.6 A '$argv' string is added in fish 3.6 at the end of shell alias
definition when reported with functions command.
2023-01-16 Xavier Delaruelle
* testsuite/modules.70-maint/210-clear.exp: ts: adapt 70/210 test result for
MSYS platform
* NEWS.rst, tcl/subcmd.tcl.in, testsuite/example/siteconfig.tcl-1,
testsuite/modules.61-coll/030-save.exp: Catch collection dir error and
report correct msg Fixes #482
2023-01-15 Xavier Delaruelle
* .aspell.en.pws, .cirrus.yml: cirrus: use new macOS images for M1 instead
of Intel
* NEWS.rst, tcl/mfinterp.tcl.in, testsuite/modulefiles.3/foo/1.0,
testsuite/modulefiles.3/tag/.modulerc, testsuite/modulefiles.3/tag/8.0,
testsuite/modules.50-cmds/465-tag-opt.exp: Correctly apply extra tag when
variant not set Correctly apply extra tag set when loading a module whose
variant has no specific value set (default value used). Fixes #484
2022-12-28 Xavier Delaruelle
* NEWS.rst, doc/source/cookbook/reduce-io-load.rst: doc: update
reduce-io-load recipe with module cache
* MIGRATING.rst: doc: desc. Module cache in MIGRATING
2022-12-27 Xavier Delaruelle
* NEWS.rst, doc/source/module.rst, doc/source/modulefile.rst: doc: desc.
limited-access & cache in NEWS/man
2022-12-24 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
.../045-cache-use-misc-inconsistent.exp: ts: add more cache not in sync
tests in 30/045
2022-12-23 Xavier Delaruelle
* doc/source/design/module-cache.rst: doc: desc. in design notes when cache
is not in sync
* .../044-cache-use-limited-access-inconsistent.exp: ts: add tests for
inconsistent limited accesses in 30/044
2022-12-22 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.20-locate/057-mcookie.exp,
testsuite/modules.20-locate/080-access.exp,
testsuite/modules.20-locate/081-access-rc.exp,
testsuite/modules.20-locate/090-memcache.exp,
testsuite/modules.20-locate/113-hide-all-opt.exp,
.../modules.20-locate/130-mcookie_check_eval.exp,
testsuite/modules.70-maint/240-icase.exp,
testsuite/modules.70-maint/260-extended_default.exp,
testsuite/modules.70-maint/290-json.exp,
testsuite/modules.70-maint/330-large-file.exp,
testsuite/modules.70-maint/420-lint.exp,
testsuite/modules.80-deep/080-access-deep.exp: ts: ignore pre-built cache
for tests changing file access
* testsuite/modules.70-maint/120-autoinit.exp: ts: fix shell completion
script file tests in 70/120
* .cirrus.yml, .github/workflows/linux_tests.yaml, script/mt,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.00-init/060-build_cache.exp,
.../modules.30-cache/051-cache-buffer-bytes.exp,
testsuite/modules.70-maint/220-config.exp,
testsuite/modules.99-finish/999-cleanup.exp: ts: optionally build cache
files to run tests When TESTSUITE_ENABLE_MODULECACHE environment variable
is set, cache file is built for all modulepaths of the testsuite. Tests are
run using the cache files to resolve available modules.
2022-12-21 Xavier Delaruelle
* doc/source/design/module-cache.rst: doc: additional notes on module cache
design
* testsuite/modules.30-cache/010-init_ts.exp,
.../modules.30-cache/043-cache-use-limited-access.exp: ts: add
limited-access hidden module tests in 30/043
2022-12-20 Xavier Delaruelle
* testsuite/modules.30-cache/010-init_ts.exp,
testsuite/modules.30-cache/031-cachebuild-full.exp,
.../032-cachebuild-limited-access.exp,
testsuite/modules.30-cache/040-cache-use.exp,
.../043-cache-use-limited-access.exp: ts: add ignored files and dirs in
cache test structure
* .../043-cache-use-limited-access.exp: ts: add tests for limited-access
cache elt resolution in 30/043
2022-12-17 Xavier Delaruelle
* testsuite/modules.30-cache/040-cache-use.exp: ts: adapt existing tests for
limited-access resolution
* .aspell.en.pws, tcl/cache.tcl.in, tcl/modfind.tcl.in: Resolve limited
access files/dirs when using cache When searching modules through cache
files resolve files and directories marked as limited access. First check
such entries match the search query, then test if these files and
directories can be accessed by current user. The access test relies on the
findModulesFromDirsAndFiles procedure, as if module search was not performed
with cache file, but just for the limited-access entries.
2022-12-16 Xavier Delaruelle
* tcl/modfind.tcl.in: Create findModulesFromDirsAndFiles from findModules
Split code from findModules procedure that walk through a list of files and
directories to find modules. Create a new procedure named
findModulesFromDirsAndFiles for that purpose. This new procedure will be
helpful to resolve limited access files and directories spotted in cache
file.
2022-12-14 Xavier Delaruelle
* tcl/cache.tcl.in, tcl/mfinterp.tcl.in: Add limited-access-directory
cachefile command Add limited-access-directory cachefile command to record
all directories with limited access in modulepath.
* tcl/cache.tcl.in, tcl/mfinterp.tcl.in: Add limited-access-file cachefile
command Add limited-access-file cachefile command to record all files with
limited access in modulepath.
2022-12-13 Xavier Delaruelle
* testsuite/modules.30-cache/010-init_ts.exp,
.../032-cachebuild-limited-access.exp: ts: add limited-access cachebuild
tests in 30/032
2022-12-10 Xavier Delaruelle
* doc/source/design/module-cache.rst: doc: elaborate limited access in
module cache design
* testsuite/modules.30-cache/031-cachebuild-full.exp: ts: adapt existing
tests now limited access are recorded
* tcl/cache.tcl.in: Register files/dir with limited access in cache When
building cache, check all files and directory within modulepath that have
limited access. Limited access is when user building cache or others cannot
read file or cannot either read or search directory. Limited access file or
directory are recorded in cache file with respectively limited-access-file
and limited-access-directory cachefile commands. Limited access commands
replace modulefile/modulerc definitions in the cache if files or their
parent directory has limited access.
2022-12-07 Xavier Delaruelle
* .../modules.30-cache/052-cache-expiry-secs.exp: ts: add cache_expiry_secs
tests in 30/051
* doc/source/module.rst: doc: desc cache_expiry_secs in man
* INSTALL.rst, NEWS.rst: doc: desc cache_expiry_secs in NEWS/INSTALL
* doc/source/changes.rst, doc/source/design/module-cache.rst: doc: desc
cache_expiry_secs in design/changes
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.30-cache/040-cache-use.exp,
testsuite/modules.70-maint/220-config.exp: ts: test cache_expiry_secs config
option
* init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init:
add cache_expiry_secs config to completion script
* tcl/cache.tcl.in, tcl/init.tcl.in: Introduce cache_expiry_secs
configuration option Add cache_expiry_secs configuration option to control
after how many seconds (after last modification) to consider cache file
expired and ignore it. Set to 0 by default which means cache file never
expires. Value can vary from 0 to 31536000 which corresponds to the number
of seconds during one year. When configuration option is set, it defies the
MODULES_CACHE_EXPIRY_SECS environment variable.
* .../modules.30-cache/051-cache-buffer-bytes.exp: ts: add
cache_buffer_bytes tests in 30/051
2022-12-06 Xavier Delaruelle
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/220-config.exp: ts: test cache_buffer_bytes
config option
* doc/source/module.rst: doc: desc cache_buffer_bytes in man
* INSTALL.rst, NEWS.rst: doc: desc cache_buffer_bytes in NEWS/INSTALL
* doc/source/changes.rst, doc/source/design/module-cache.rst: doc: desc
cache_buffer_bytes in design/changes
* init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init:
add cache_buffer_bytes config to completion script
* tcl/cache.tcl.in, tcl/init.tcl.in, tcl/subcmd.tcl.in: Introduce
cache_buffer_bytes configuration option Add cache_buffer_bytes
configuration option to control the buffer size used when reading or writing
cache files. A 32 kbytes buffer is set by default. It can vary from 4 kbytes
to 1 MB. It is useful to have a large buffer when reading or writing large
files to reduce the number or read or write system calls. When
configuration option is set, it defies the MODULES_CACHE_BUFFER_BYTES
environment variable.
2022-12-05 Xavier Delaruelle
* testsuite/example/siteconfig.tcl-1,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.30-cache/040-cache-use.exp,
testsuite/modules.30-cache/041-cache-interp.exp: ts: adapt tests to specific
cache read code
2022-12-04 Xavier Delaruelle
* tcl/cache.tcl.in: Add specific proc to read cache file Introduce
readCacheContent procedure to specifically read cache file rather using read
procedure for modulefile. Avoid cache file to be cached in memory. Produce
more specific error message.
2022-12-03 Xavier Delaruelle
* testsuite/modules.30-cache/050-ignore-cache.exp: ts: add
ignore_cache/--ignore-cache tests in 30/050
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/220-config.exp: ts: test ignore_cache config
option
* doc/source/module.rst: doc: desc ignore_cache/--ignore-cache in man
* INSTALL.rst, NEWS.rst: doc: desc ignore_cache/--ignore-cache in
NEWS/INSTALL
* doc/source/changes.rst, doc/source/design/module-cache.rst: doc: desc
--ignore-cache/ignore_cache in design/changes
* init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init:
add ignore_cache/--ignore-cache to comp script
* tcl/cache.tcl.in, tcl/subcmd.tcl.in: Ignore cache file when ignore_cache
enabled Do not check or evaluate cache file if ignore_cache option is
enabled. Use this new option in cachebuild sub-command to ignore cache when
building cache files.
* tcl/init.tcl.in, tcl/main.tcl.in, tcl/report.tcl.in: Add ignore_cache
configuration option Add ignore_cache configuration option that controls
whether or not module cache file should be considered if available. Disabled
by default. When configuration is modified it sets the MODULES_IGNORE_CACHE
environment variable. --ignore-cache command line switch can be used to
enable ignore_cache for the current execution. --ignore_cache is also
supported for compatibility with Lmod.
2022-11-30 Xavier Delaruelle
* doc/source/module.rst, doc/source/modulefile.rst: doc: desc cache in man
pages
* NEWS.rst: doc: desc. cache usage work in NEWS
2022-11-29 Xavier Delaruelle
* doc/source/design/module-cache.rst,
testsuite/modules.30-cache/031-cachebuild-full.exp,
testsuite/modules.30-cache/040-cache-use.exp: doc/ts: cache build & use with
module header options
* tcl/subcmd.tcl.in: Enable mcookie_check/mcookie_version_check on
cachebuild Enable both mcookie_check and mcookie_version_check
configuration options when recording cache. These two options are not
honored when building or using cache.
2022-11-27 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.30-cache/042-cache-error.exp: ts: test erroneous cache
file in 30/042
* tcl/cache.tcl.in: Revert optimization filter tries for
findModulesInCacheFile As the improvement obtained by either of these
optimization methods was not perceptible, they are withdrawn to keep
filtering code simpler. Gain was also not perceptible since the additional
cost taken by cache was not perceptible in the first place.
* tcl/cache.tcl.in: Second optimization filter try for
findModulesInCacheFile As first try is not 100% accurate since it does not
compare element root names. This second attempt first compute the list of
element root names to compare, same lsearch -glob mechanism for comparison.
Then unset elements whose root name has been returned by comparison.
2022-11-26 Xavier Delaruelle
* tcl/cache.tcl.in: Optimize module filtering in findModulesInCacheFile
Increase filtering performance in findModulesInCacheFile: instead of testing
for match each module in cache through modEqStatic, gets all module to
exclude from result at once with lsearch command.
* script/mb, testsuite/modules.30-cache/040-cache-use.exp: script: skip v5.2
from bench/profile in mb Ignore Modules v5.2 when benching or profiling
releases not to get too much results on output.
* script/mb: script: add benchmark tests for cache in mb Add cache version
of avail, whatis and load benchmark tests in mb tool.
* testsuite/modules.30-cache/041-cache-interp.exp: ts: test cache file
interp taint protection
2022-11-25 Xavier Delaruelle
* testsuite/modules.30-cache/040-cache-use.exp: ts: add cache usage tests in
30/040
2022-11-24 Xavier Delaruelle
* tcl/cache.tcl.in, tcl/modfind.tcl.in: Distinguish empty cache result from
no cache result Update structure of result returned by
findModulesInCacheFile to indicate if cache load was successful or not. It
is possible this way to distinguish between a *there is no cache* result and
a *no match in cache* or *empty cache* results.
* tcl/cache.tcl.in: Cache content filer in findModulesInCacheFile Add code
in findModulesInCacheFile to filter fetched cache content to tailor it to
the search query. Proceed following what is done in findModules procedure
but in a reverse order (we remove elements from a full structure, rather we
add elements to an empty structure).
* tcl/report.tcl.in: Set time string as separate arg on reportTimer Avoid
evaluating full message string to replace time pattern by execution time
value. Message could contain string that could be misinterpreted by format
command as time pattern.
2022-11-22 Xavier Delaruelle
* tcl/cache.tcl.in: Add modulefile-invalid cachefile command Add
modulefile-invalid cachefile command used to record a invalid modulefile in
modulepath.
* tcl/cache.tcl.in: Add modulerc-content cachefile command Add
modulerc-content cachefile command used to record a modulerc available in
modulepath. Record modulerc information in memory cache variables:
g_modfileContent.
* tcl/cache.tcl.in: Add modulefile-content cachefile command Add
modulefile-content cachefile command used to record a modulefile available
in modulepath. Record modulefile information in memory cache variables:
g_modfileContent and g_fileMtime.
* .aspell.en.pws, tcl/cache.tcl.in, tcl/mfinterp.tcl.in, tcl/report.tcl.in:
Core code for execute-cachefile Add core code for execute-cachefile
procedure. Initialize an interpreter to evaluate the cache file. Reuse the
same mechanisms than for modulefile or modulerc evaluation.
* .aspell.en.pws, tcl/cache.tcl.in, tcl/modfind.tcl.in: Add initial code
structure to evaluate cache file Add call to findModulesInCacheFile
procedure in findModules to retrieve available modulefile and modulerc
information from modulepath cache file. findModulesInCacheFile tests a
cache file is available and evaluate it if not yet done with
execute-cachefile procedure. Cache file information will then be parsed to
return the information matching the search query. Initial code structure is
inserted with this commit. Code for cache file evaluation and cache
information tailoring will come next.
2022-11-21 Xavier Delaruelle
* testsuite/example/siteconfig.tcl-1,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.30-cache/010-init_ts.exp,
testsuite/modules.30-cache/030-cachebuild.exp,
testsuite/modules.30-cache/031-cachebuild-full.exp,
testsuite/modules.30-cache/999-cleanup.exp: ts: add/update cachebuild tests
with real cache file
2022-11-19 Xavier Delaruelle
* .gitignore, Makefile, tcl/{cache.tcl => cache.tcl.in}: Add major.minor
version number in cache files Append major.minor version number to the
#%Module header prefix of generated cache files. Cache file can be used only
if generated for the current release of Modules used. Change cache.tcl into
cache.tcl.in to get Modules release number resolved at build time.
2022-11-18 Xavier Delaruelle
* tcl/cache.tcl, tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Core code for
formatModuleCacheContent Implement formatModuleCacheContent procedure.
findModules procedure is first called to get all files from designated
modulepath directory. A cache entry is made for each result obtained from
findModules with cache file commands: modulefile-content, modulerc-content
and modulefile-invalid. Goal is to record all information produced by
findModules to be able to replace findModules processing by cache file
evaluation. Thus modulefile modification time and validity check issues are
recorded in cache file. Modulerc and modulefile content is read and
recorded as-is in cache file. Error occurring during file read is raised and
ends cache file creation.
2022-11-13 Xavier Delaruelle
* testsuite/example/siteconfig.tcl-1,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.30-cache/030-cachebuild.exp: ts: add initial cachebuild
sub-cmd tests
* .aspell.en.pws, tcl/cache.tcl, tcl/report.tcl.in, tcl/subcmd.tcl.in: Core
code for cmdModuleCachebuild Implement cachebuild sub-command. For each
modulepath enabled or passed as argument, if modulepath is writable for user
build cache content for this modulepath and record it in cache file. Report
message block is used to report file creation. Reports are output in normal
verbosity level or higher. A warning message is emitted if modulepath is not
writable for user, or if cache content to create is empty. Provide empty
skeleton for formatModuleCacheContent procedure.
* testsuite/example/siteconfig.tcl-1,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.30-cache/010-init_ts.exp,
testsuite/modules.30-cache/020-cacheclear.exp,
testsuite/modules.30-cache/999-cleanup.exp: ts: add cacheclear sub-cmd tests
2022-11-12 Xavier Delaruelle
* Makefile, tcl/cache.tcl, tcl/report.tcl.in, tcl/subcmd.tcl.in: Core code
for cmdModuleCacheclear Implement cacheclear sub-command. For each
modulepath enabled, check module cache file exists. If yes and if modulepath
is writable for user, try to delete the cache file. Report message block is
used to report file deletion. Reports are output in normal verbosity level
or higher. A warning message is emitted if modulepath is not writable for
user. Add tcl/cache.tcl source file to store procedure related to cache
mechanism. Update Makefile to properly generate modulecmd.tcl with this new
tcl file.
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
cacheclear subcmd in NEWS/man/changes
* testsuite/modulefiles.3/modbad/cacheclear,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for cacheclear sub-command
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add cacheclear
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'cacheclear' sub-command Introduce cacheclear sub-command to delete cache
file under modulepaths. This sub-command cannot be called from a modulefile
evaluation context. Add sub-command empty skeleton: cmdModuleCacheclear.
Sub-command accepts no option nor argument. Cache files are deleted in every
enabled modulepaths.
* .aspell.en.pws, NEWS.rst, doc/source/design/module-cache.rst: doc: add
module-cache design doc
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
cachebuild subcmd in NEWS/man/changes
* testsuite/modulefiles.3/modbad/cachebuild,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for cachebuild sub-command
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add cachebuild
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'cachebuild' sub-command Introduce cachebuild sub-command to create cache
file under modulepaths. This sub-command cannot be called from a modulefile
evaluation context. Add sub-command empty skeleton: cmdModuleCachebuild.
Sub-command accepts no option. It may take optional arguments: list of
modulepath directory where to build cache. When no argument is specified,
cache is built for all enabled modulepaths.
2022-11-08 Xavier Delaruelle
* MIGRATING.rst, NEWS.rst, contrib/rpm/environment-modules.spec.in,
doc/source/conf.py, version.inc.in: Release of version 5.2.0
2022-11-05 Xavier Delaruelle
* .aspell.en.pws, NEWS.rst, doc/source/module.rst: doc: extend Collections
desc in module man
2022-11-03 Xavier Delaruelle
* CONTRIBUTING.rst, INSTALL-win.rst, INSTALL.rst,
contrib/vim/syntax/modulefile.vim,
doc/source/cookbook/log-module-commands.rst: doc/vim: update tcl.tk links
into tcl-lang.org
* doc/source/module.rst: doc: desc hooks made with rename in module man
2022-11-01 Xavier Delaruelle
* .aspell.en.pws, MIGRATING.rst: doc: desc. siteconfig hook var in MIGRATING
* MIGRATING.rst: doc: fix path issue in sticky module examples
2022-10-31 Xavier Delaruelle
* .aspell.en.pws, NEWS.rst, doc/source/module.rst, siteconfig.tcl: doc: add
Site-specific configuration section in man
2022-10-29 Xavier Delaruelle
* testsuite/example/siteconfig.tcl-1, testsuite/modulefiles.3/.modulerc,
testsuite/modulefiles.3/interp/.modulerc, testsuite/modulefiles.3/interp/0,
testsuite/modulefiles.3/interp/1, testsuite/modulefiles.3/interp/2,
.../modules.50-cmds/560-siteconfig-interp.exp: ts: test specific vars/cmds
hooks in 50/560
2022-10-21 Xavier Delaruelle
* .aspell.en.pws, NEWS.rst, doc/source/conf.py: doc: desc. cmds/vars hooks
in NEWS
* siteconfig.tcl, tcl/mfinterp.tcl.in: Add hooks for specific vars/cmds in
modulerc interp ctx Introduce hooks to define specific variables and
commands for modulerc interpreter context. It relies on variables defined in
siteconfig.tcl configuration file: * modulerc_extra_vars is a list of
variable name and value pairs * modulerc_extra_cmds is a list of command
name and procedure pairs Fixes #286
* siteconfig.tcl, tcl/mfinterp.tcl.in: Add hooks for specific vars/cmds in
modulefile interp ctx Introduce hooks to define specific variables and
commands for modulefile interpreter context. It relies on variables defined
in siteconfig.tcl configuration file: * modulefile_extra_vars is a list of
variable name and value pairs * modulefile_extra_cmds is a list of command
name and procedure pairs Fixes #286
2022-10-31 Xavier Delaruelle
* tcl/modfind.tcl.in: Remove modvr default value on setLoadedModule proc
2022-10-30 Xavier Delaruelle
* testsuite/install.00-init/025-autoinit.exp,
.../modules.20-locate/130-mcookie_check_eval.exp,
testsuite/modules.50-cmds/075-alias.exp,
testsuite/modules.50-cmds/076-alias-sub.exp,
testsuite/modules.50-cmds/077-alias-undo.exp,
testsuite/modules.50-cmds/078-refresh.exp,
testsuite/modules.50-cmds/083-info-mode.exp,
testsuite/modules.50-cmds/084-info-mode-exp.exp,
testsuite/modules.50-cmds/282-info-command.exp,
testsuite/modules.50-cmds/283-info-command-exp.exp,
testsuite/modules.50-cmds/350-allin.exp,
testsuite/modules.50-cmds/360-restoreenv.exp,
testsuite/modules.50-cmds/390-function.exp,
testsuite/modules.50-cmds/391-function-undo.exp,
testsuite/modules.50-cmds/400-source-sh.exp,
testsuite/modules.50-cmds/540-complete.exp,
testsuite/modules.50-cmds/541-uncomplete.exp,
testsuite/modules.70-maint/120-autoinit.exp,
testsuite/modules.70-maint/210-clear.exp: ts: adapt existing tests to
__MODULES_LMREFRESH
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
refresh only modules requiring it
* .aspell.en.pws, NEWS.rst, doc/source/changes.rst, doc/source/module.rst:
doc: desc. __MODULES_LMREFRESH in NEWS/man/changes
* tcl/subcmd.tcl.in: Only refresh loaded modules requiring it Use the
qualified refresh property to only evaluate in refresh mode the loaded
modules marked with this property. Fixes #477
* tcl/mfinterp.tcl.in, tcl/modeval.tcl, tcl/modfind.tcl.in,
tcl/subcmd.tcl.in: Track loaded modules qualified for refresh eval Track
loaded modules that are qualified for a refresh evaluation. Refresh
evaluation is only useful if module defines volatile environment changes:
shell completion, alias or function. An internal state, named
refresh_qualified, marks loading modules defining such volatile environment
changes. Such modules are then added to the __MODULES_LMREFRESH environment
variable to track this property once module is loaded. Code is also added
to remove module from __MODULES_LMREFRESH when it is unloaded.
* .github/workflows/differential_shellcheck.yml,
.github/workflows/lint_tests.yaml, .github/workflows/linux_tests.yaml,
.github/workflows/windows_tests.yaml, CONTRIBUTING.rst, Makefile, NEWS.rst,
README.md, configure, doc/source/conf.py,
doc/source/cookbook/modulefiles-in-git.rst, script/mpub, script/mrel: Use
main as new name for default git branch
2022-10-28 Xavier Delaruelle
* .github/workflows/windows_tests.yaml: gh: use cygwin-install-action rather
builtin chocolatey Chocolatey version 1.2.0 shipped with latest windows
2022 image does not seem to correctly install packages from Cygwin source.
So move to cygwin/cygwin-install-action to install Cygwin packages.
* Makefile: install: use newer version of nagelfar (1.3.3)
2022-10-17 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
.../modules.20-locate/112-hide-user-group.exp,
.../modules.20-locate/117-forbid-user-group.exp,
testsuite/modules.20-locate/119-hide-cascading.exp,
testsuite/modules.50-cmds/287-info-usergroups.exp,
testsuite/modules.50-cmds/440-module-tag.exp,
testsuite/modules.70-maint/220-config.exp,
testsuite/modules.70-maint/390-state.exp: ts: fix testsuite run when id cmd
cannot resolve group Update testsuite to cope with user group whose name
cannot be resolved. Fixes #476.
2022-10-16 Xavier Delaruelle
* Makefile, NEWS.rst, init/Makefile, init/zsh.in, tcl/subcmd.tcl.in,
testsuite/modules.70-maint/120-autoinit.exp: Revert "init: setup zsh FPATH
through autoinit command" This reverts commit
59ac24e2431df012d8b22872a0e8fd1e86a20e9f. FPATH variable cannot be handled
within autoinit process as this is not an environment variable. Thus when
modulecmd.tcl is executed, it does not know the current value of FPATH. So
if it sets FPATH during autoinit, previous value of this variable is lost.
As a result FPATH must stay defined in initialization script.
2022-10-14 Xavier Delaruelle
* .aspell.en.pws, NEWS.rst, doc/example/log-module-commands/siteconfig.tcl,
doc/source/cookbook/log-module-commands.rst: doc: fix logging sys on
log-module-command recipe Update log-module-command recipe to ensure the
logging system is not broken by the current user environment. Fixes #475.
2022-10-13 Xavier Delaruelle
* testsuite/install.00-init/005-init_ts.exp: ts: skip basheu tests on bash
5.2 bash -eu test of install testsuite are skipped on new version of bash
(5.2) as internal messages currently appear when using module function with
-eu options on this version. A bug as been submitted to the bash
developers:
https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00073.html
2022-10-12 Xavier Delaruelle
* .github/workflows/linux_tests.yaml: gh: update to codecov-action v3
* .github/workflows/lint_tests.yaml, .github/workflows/linux_tests.yaml,
.github/workflows/windows_tests.yaml: gh: update actions/upload-artifact to
v3
* .github/workflows/lint_tests.yaml, .github/workflows/linux_tests.yaml,
.github/workflows/windows_tests.yaml: gh: update actions/checkout to v3
* .github/workflows/windows_tests.yaml: gh: move windows tests to
windows-2022 image
2022-10-11 Xavier Delaruelle
* testsuite/modules.70-maint/210-clear.exp: ts: fix env of clear subcmd test
case
* Makefile: install: correct arg order for date cmd on FreeBSD
2022-10-10 Xavier Delaruelle
* MIGRATING.rst: doc: desc. stash env in MIGRATING
2022-10-07 Xavier Delaruelle
* doc/source/module.rst: doc: desc stash in collection section of man page
* testsuite/modules.70-maint/457-stash-savelist.exp: ts: test savelist
subcmd with stash collections
2022-10-06 Xavier Delaruelle
* NEWS.rst, doc/source/design/stash-environment.rst, doc/source/module.rst:
doc: desc. savelist stash filter in design/NEWS/man doc
* tcl/subcmd.tcl.in: Filter stash collection on savelist Update savelist
sub-command to filter out stash collections unless --all option is set.
* testsuite/modules.70-maint/456-stash-restore.exp: ts: test restore subcmd
with stash collections
2022-10-05 Xavier Delaruelle
* init/bash_completion.in, init/fish_completion, init/tcsh_completion.in,
init/zsh-functions/_module.in: init: update completion with stashlist output
Update stashpop, stashrm and stashshow completion definition to use
stashlist output.
2022-10-04 Xavier Delaruelle
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp: ts: clear
MODULES_QUARANTINE_SUPPORT prior tests
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.70-maint/455-stashlist.exp: ts: add stashlist sub-cmd
tests
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.50-cmds/152-module-emptyarg.exp,
testsuite/modules.50-cmds/350-allin.exp,
testsuite/modules.61-coll/020-savelist.exp,
testsuite/modules.61-coll/021-savelist-search.exp,
testsuite/modules.61-coll/080-access-coll.exp,
testsuite/modules.70-maint/190-emptyarg.exp,
testsuite/modules.70-maint/350-term_width.exp: ts: add helper procs for
collection list header msgs
2022-10-02 Xavier Delaruelle
* tcl/subcmd.tcl.in: Core code for cmdModuleStashlist Implement 'stashlist'
sub-command. Rely on cmdModuleSavelist but adapt this procedure to make
several behavior changes when called by cmdModuleStashlist: * elements are
sorted in reverse order * element index starts at 0 * when no collection
target set, only return collection without a target set
2022-10-01 Xavier Delaruelle
* tcl/report.tcl.in, tcl/subcmd.tcl.in, tcl/util.tcl: Add getCallingProcName
util proc Return name of calling procedure with getCallingProcName.
* tcl/report.tcl.in, tcl/subcmd.tcl.in, testsuite/example/siteconfig.tcl-1:
Add start_idx argument on displayElementList Add start_idx argument on
displayElementList procedure to define what is the starting index for the
elements to report.
2022-09-29 Xavier Delaruelle
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
stashlist subcmd in NEWS/man/changes
* testsuite/modulefiles.3/modbad/stashlist,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for stashlist sub-command
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add stashlist
subcmd to completion scripts
2022-09-28 Xavier Delaruelle
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'stashlist' sub-command Introduce stashlist sub-command to list stash
collection file. This sub-command cannot be called from a modulefile
evaluation context. Add sub-command empty skeleton: cmdModuleStashlist.
Sub-command accepts no argument. It accepts --terse, --long and --json
options.
* .aspell.en.pws, doc/source/design/stash-environment.rst: doc: desc.
stashlist in stash-environment design doc
2022-09-26 Xavier Delaruelle
* testsuite/config/base-config.exp,
testsuite/modules.70-maint/454-stashclear.exp: ts: add stashclear sub-cmd
tests
* tcl/subcmd.tcl.in: Core code for cmdModuleStashclear Implement
'stashclear' sub-command. Fetch all existing stash collection for current
collection target. Then call 'saverm' sub-command over all of these
collection obtained.
2022-09-27 Xavier Delaruelle
* testsuite/modulefiles.3/modbad/stashclear,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for stashclear subcmd
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
stashclear subcmd in NEWS/man/changes
2022-09-26 Xavier Delaruelle
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add stashclear
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'stashclear' sub-command Introduce stashclear sub-command to delete all
stash collection file. This sub-command cannot be called from a modulefile
evaluation context. Add sub-command empty skeleton: cmdModuleStashclear.
Sub-command accepts no argument nor option.
* .aspell.en.pws, doc/source/design/stash-environment.rst: doc: desc.
stashclear in stash-environment design doc
* testsuite/modules.00-init/005-init_ts.exp: ts: accept version name with
'/' char
* testsuite/modules.70-maint/453-stashshow.exp: ts: add stashshow sub-cmd
tests
* tcl/subcmd.tcl.in: Core code for cmdModuleStashshow Implement 'stashshow'
sub-command. Parse stash argument to get corresponding collection, then call
saveshow over this collection name.
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
stashshow subcmd in NEWS/man/changes
* testsuite/modulefiles.3/modbad/stashshow,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for stashshow sub-command
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add stashshow
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'stashshow' sub-command Introduce stashshow sub-command to display stash
collection file. This sub-command cannot be called from a modulefile
evaluation context. Add sub-command empty skeleton: cmdModuleStashshow.
Sub-command accepts no option. It may take an optional argument: the index
of the stash collection to display or the name of the stash collection. If
no argument is provided, stash collection 0 is assumed.
* .aspell.en.pws, doc/source/design/stash-environment.rst: doc: desc.
stashshow in stash-environment design doc
* testsuite/config/base-config.exp,
testsuite/modules.70-maint/452-stashrm.exp: ts: add stashrm sub-cmd tests
2022-09-25 Xavier Delaruelle
* tcl/subcmd.tcl.in: Core code for cmdModuleStashrm Implement 'stashrm'
sub-command. Parse stash argument to get corresponding collection, then call
saverm over this collection name.
* tcl/coll.tcl.in, tcl/subcmd.tcl.in: Move collection resolution from stash
in dedicated proc Move collection name resolution from stash name from
cmdModuleStashpop into getCollectionFromStash procedure.
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
stashrm subcmd in NEWS/man/changes
* testsuite/modulefiles.3/modbad/stashrm,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for stashrm sub-command
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add stashrm
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'stashrm' sub-command Introduce stashrm sub-command to delete stash
collection file. This sub-command cannot be called from a modulefile
evaluation context. Add sub-command empty skeleton: cmdModuleStashrm.
Sub-command accepts no option. It may take an optional argument: the index
of the stash collection to delete or the name of the stash collection. If no
argument is provided, stash collection 0 is assumed.
* .aspell.en.pws, doc/source/design/stash-environment.rst: doc: desc.
stashrm in stash-environment design doc
2022-09-22 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.70-maint/451-stashpop.exp: ts: add stashpop sub-cmd tests
* tcl/subcmd.tcl.in: Core code for cmdModuleStashpop Implement 'stashpop'
sub-command. First parse stash argument to determine corresponding stash
collection name or raise an error if stash value is invalid. Then restore
stash collection. Afterward delete stash collection.
2022-09-25 Xavier Delaruelle
* tcl/coll.tcl.in: Add no_other_target option to findCollections Add
no_other_target option to findCollections procedure to filter when glob
searching the result from other target. Especially useful when collections
for specific targets exist but no target is currently set in user
environment. This no_other_target is disabled by default. savelist
sub-command currently returns other targets when no target is set. But the
option will be enabled for stashpop, to ensure that the popped collection is
from the current target or from the *no target* if none set.
2022-09-21 Xavier Delaruelle
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
stashpop subcmd in NEWS/man/changes
* testsuite/modulefiles.3/modbad/stashpop,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for stashpop sub-command
* doc/source/modulefile.rst, testsuite/modulefiles/info/commandexp,
testsuite/modules.50-cmds/282-info-command.exp,
testsuite/modules.50-cmds/283-info-command-exp.exp: ts/doc: add stashpop
test/doc on 'module-info command'
* doc/source/design/stash-environment.rst: doc: desc. stashpop in
stash-environment design doc
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add stashpop
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'stashpop' sub-command Introduce stashpop sub-command to restore a stash
collection then delete it. This sub-command cannot be called from a
modulefile evaluation context. Add sub-command empty skeleton:
cmdModuleStashpop. Sub-command accepts no option. It may take an optional
argument: the index of the stash collection to restore or the name of the
stash collection. If no argument is provided, stash collection 0 is assumed.
2022-09-09 Xavier Delaruelle
* testsuite/config/base-config.exp, testsuite/modulefiles.3/foo/.modulerc,
testsuite/modulefiles.3/tag/.modulerc,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.70-maint/450-stash.exp: ts: add stash sub-cmd tests
2022-09-18 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.61-coll/030-save.exp: ts: move unsatisfied constraint msg
to init section
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.61-coll/030-save.exp: ts: move nothing to save err msg in
init section
2022-09-17 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.61-coll/040-restore.exp,
testsuite/modules.61-coll/060-saveshow.exp: ts: put coll not valid msg in a
proc
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.61-coll/040-restore.exp,
testsuite/modules.61-coll/050-saverm.exp,
testsuite/modules.61-coll/060-saveshow.exp,
testsuite/modules.61-coll/080-access-coll.exp,
testsuite/modules.70-maint/240-icase.exp,
testsuite/modules.70-maint/440-reset.exp: ts: put coll not found msg in a
proc
2022-09-11 Xavier Delaruelle
* tcl/modfind.tcl.in: Fix init property unserialization Update
getLoadedModulePropertyList to apply unserialization translation map also
for property not requiring sub-element split, like init.
2022-09-06 Xavier Delaruelle
* tcl/subcmd.tcl.in: Core code for cmdModuleStash Implement stash
sub-command. First check that a difference exists between current
environment and initial one. If so, save current environment in a
collection, then reset to initial environment.
2022-09-20 Xavier Delaruelle
* tcl/coll.tcl.in, tcl/subcmd.tcl.in: Reword findCollections to swap default
coll by __init__ Update findCollections procedure to add swap_by_init
argument, disabled by default. When enabled if specified collection is not
found, change it to __init__. Helps to remove duplicate code from
cmdModuleSaveshow and cmdModuleRestore.
2022-09-11 Xavier Delaruelle
* tcl/coll.tcl.in, tcl/subcmd.tcl.in: Return is_tags_diff from
getDiffBetweenCurEnvAndColl Update getDiffBetweenCurEnvAndColl to also
return is_tags_diff information. is_tags_diff indicates if loaded modules
that matches modules in collection have different tags set.
* tcl/util.tcl: Add unordered_lists_compared arg on getDiffBetweenArray
Update getDiffBetweenArray procedure to add unordered_lists_compared
argument (disabled by default). When enabled, array elements are considered
unordered list, so value comparison is adapted to check differences between
two lists.
* tcl/util.tcl, testsuite/example/siteconfig.tcl-1,
testsuite/modules.00-init/120-siteconfig.exp: Add notset_equals_empty arg to
getDiffBetweenArray Update getDiffBetweenArray procedure to add
notset_equals_empty argument (disabled by default). When enabled not-set
element in array is equivalent to element set to an empty value.
2022-09-06 Xavier Delaruelle
* tcl/coll.tcl.in, tcl/subcmd.tcl.in: Create getDiffBetweenCurEnvAndColl
from cmdModuleRestore Create getDiffBetweenCurEnvAndColl procedure from
code of cmdModuleRestore to analyze a collection content and produce
differences compared to current environment.
2022-09-04 Xavier Delaruelle
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. stash
subcmd in NEWS/man/changes
* testsuite/modulefiles.3/modbad/stash,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: adapt existing
testfiles for stash sub-command
* doc/source/modulefile.rst, testsuite/modulefiles/info/commandexp,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.50-cmds/282-info-command.exp,
testsuite/modules.50-cmds/283-info-command-exp.exp,
testsuite/modules.61-coll/030-save.exp: ts/doc: add stash test/doc on
'module-info command'
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add stash
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'stash' sub-command Introduce stash sub-command to save current environment
and restore initial one. This sub-command cannot be called from a
modulefile evaluation context. Add sub-command empty skeleton:
cmdModuleStash. Sub-command accepts no argument nor option.
* .aspell.en.pws, doc/source/design/initial-environment.rst,
doc/source/design/stash-environment.rst: doc: add stash-environment design
doc
2022-09-18 Xavier Delaruelle
* .cirrus.yml: cirrus: test FreeBSD 13.1 instead of eol 13.0
2022-09-15 Xavier Delaruelle
* testsuite/lint.00-init/005-init_ts.exp: ts: do not lint lib/config.guess
generated file
* .aspell.en.pws, NEWS.rst, testsuite/lint.00-init/005-init_ts.exp: ts:
temporarily ignore remaining shellcheck reports Make 'mt lint' pass with
remaining shellcheck reports on sh, bash and ksh scripts. Waiting for
another contribution to fix the remaining warnings and notices. Related:
#470
* NEWS.rst, init/profile.sh.in: init: only source sh or bash init if BASH
var is set Update profile script for sh-like shells to only source sh or
bash initialization script when BASH environment variable is found set.
Fixes #473
2022-09-04 Xavier Delaruelle
* CONTRIBUTING.rst, NEWS.rst: doc: desc. script/mb in CONTRIBUTING
2022-09-03 Xavier Delaruelle
* CONTRIBUTING.rst: doc: desc lint testsuite in CONTRIBUTING
* .aspell.en.pws, CONTRIBUTING.rst: doc: desc. script/mt utility in
CONTRIBUTING
* CONTRIBUTING.rst: doc: desc. quick testsuite mode in CONTRIBUTING
2022-09-02 Xavier Delaruelle
* tcl/envmngt.tcl.in, testsuite/modules.70-maint/120-autoinit.exp: Update
autoinit sh code to fix SC2166/SC2086 Apply on auto-generated autoinit code
for sh-kind shells the same changes than initialization scripts to fix the
SC2166 and SC2086 issues reported by ShellCheck linter. Autoinit generated
code is thus kept in line with initialization script code.
2022-08-31 Lukáš Zaoral
* configure: lint(ShellCheck): fix SC2163 warning According to ShellCheck's
documentation: export takes a variable name, but ShellCheck has noticed
that you give it an expanded variable instead. Remove $/${} for that, or
use ${var?} to quiet. Related: https://www.shellcheck.net/wiki/SC2163
Related: #470
* init/profile.sh.in, script/add.modules.in, script/mkroot:
lint(ShellCheck): fix SC2046 warning According to ShellCheck's
documentation: When command expansions are unquoted, word splitting and
globbing will occur. This often manifests itself by breaking when filenames
contain spaces. Related: https://www.shellcheck.net/wiki/SC2046 Related:
#470
* configure, .../example-sessions/bar-defaults.sh,
.../example-sessions/bar-loads.sh, .../example-sessions/bar-switch.sh,
.../example-sessions/foo-avail1.sh, .../example-sessions/foo-avail2.sh,
.../example-sessions/foo-defaults.sh, .../example-sessions/foo-loads.sh,
.../example-sessions/foo-switch.sh, .../example-sessions/modavail.sh,
.../example-sessions/modversion.sh, .../example-sessions/ompi-defaults.sh,
.../example-sessions/ompi-loads1.sh, .../example-sessions/ompi-switch.sh,
.../example-sessions/ompi-switch.sh.m431, init/bash.in,
init/bash_completion.in, init/ksh.in, init/sh.in, script/add.modules.in,
script/commit-msg, script/envml, script/mkroot, script/mt,
script/pre-commit, testsuite/bin/install_test_sh, testsuite/systest:
lint(ShellCheck): fix SC2086 info diagnostic Some variables, that were
unquoted intentionally were converted to arrays. According to ShellCheck's
documentation: Quoting variables prevents word splitting and glob
expansion, and prevents the script from breaking when input contains spaces,
line feeds, glob characters and such. Related:
https://www.shellcheck.net/wiki/SC2086 Related: #470
* configure, doc/example/source-script-in-modulefile/bar-2.1/bar-setup.sh,
doc/example/source-script-in-modulefile/foo-1.2/foo-setup.sh:
lint(ShellCheck): fix SC2155 warning According to ShellCheck's
documentation: In the original code, the return value of mycmd in $(mycmd)
is ignored, and export will instead always return true. This may prevent
conditionals, set -e and traps from working correctly. Related:
https://www.shellcheck.net/wiki/SC2155 Related: #470
2022-08-26 Lukáš Zaoral
* doc/example/source-script-in-modulefile/bar-2.1/bar-setup.sh,
doc/example/source-script-in-modulefile/foo-1.2/foo-setup.sh:
lint(ShellCheck): fix SC2128 warning These occurrences do not cause any
problems described below but it's better to be verbose that we indeed want
to access the first array element. According to ShellCheck's documentation:
When referencing arrays, $myarray is equivalent to ${myarray[0]} -- it
results in only the first of multiple elements. Related:
https://www.shellcheck.net/wiki/SC2128 Related: #470
* script/envml, testsuite/cmd.exe: lint(ShellCheck): fix SC2048 warning
According to ShellCheck's documentation: Use "$@" (with quotes) to prevent
whitespace problems. $* and ${array[*]}, unquoted, is subject to word
splitting and globbing. Related: https://www.shellcheck.net/wiki/SC2048
Related: #470
* init/bash_completion.in: lint(ShellCheck): fix SC2178 warning These
occurrences do not seem to cause any problems described below but let's
still fix it for the sake of consistency within this script. According to
ShellCheck's documentation: ShellCheck noticed that you have used a
variable as an array, but then assign it a string. array=foo is equivalent
to array[0]=foo, and leaves the rest of the elements unaffected. Related:
https://www.shellcheck.net/wiki/SC2178 Related: #470
2022-08-25 Lukáš Zaoral
* configure, init/bash.in, init/bash_completion.in, init/ksh.in, init/sh.in,
script/envml, testsuite/bin/install_test_sh: lint(ShellCheck): fix SC2166
warning According to ShellCheck's documentation: -a and -o in [ .. ] test
expressions are not well defined, and can cause incorrect results when
arguments start with dashes or contain !. Related:
https://www.shellcheck.net/wiki/SC2166 Related: #470
* init/bash_completion.in: lint(ShellCheck): fix SC1035 error According to
ShellCheck's documentation: Bourne shells are very whitespace sensitive.
Adding or removing spaces can drastically alter the meaning of a script.
Related: https://www.shellcheck.net/wiki/SC1035 Related: #470
* script/envml, script/mt: lint(ShellCheck): fix SC2068 error According to
ShellCheck's documentation: Double quotes around $@ and ${array[@]})
prevent globbing and word splitting of individual elements, while still
expanding to multiple separate arguments. Related:
https://www.shellcheck.net/wiki/SC2068 Related: #470
* doc/example/compiler-etc-dependencies/example-sessions/common_code.sh,
init/bash.in, init/bash_completion.in, init/ksh.in, init/profile.sh.in,
init/sh.in: lint(ShellCheck): fix SC2148 error According to ShellCheck's
documentation: Different shells support different features. To give
effective advice, ShellCheck needs to know which shell your script is going
to run on. Related: https://www.shellcheck.net/wiki/SC2148 Related: #470
* init/bash.in, init/ksh.in, init/sh.in: init: add vim modeline to {,b,k}sh
scripts ... to enable correct syntax highlighting.
2022-08-31 Xavier Delaruelle
* .aspell.en.pws, NEWS.rst: doc: desc. usage and --help work for scripts in
NEWS
* script/mtreview: script: add usage msg and --help option on mtreview
* script/mlprof: script: add usage msg and --help option on mlprof
* script/mt: script: add usage msg and --help option on mt
2022-08-30 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp: ts: accept version name with
'_' char
* script/mb: script: keep old releases among benched versions in mb Update
mb script to skip several releases and be able to run bench or profiling on
old and recent releases. Versions 4.1, 4.3, 4.5, 4.7 and 5.1 are retained
for bench mode. 4.5, 4.7 and 5.1 are retained for profile mode.
* script/mb: script: add usage msg and --help option on mb
* script/mrel: script: add usage msg and --help option on mrel
* script/mpub: script: add usage msg and --help option on mpub
2022-08-28 Xavier Delaruelle
* NEWS.rst, tcl/envmngt.tcl.in, tcl/init.tcl.in, tcl/main.tcl.in,
tcl/mfinterp.tcl.in, tcl/modeval.tcl, tcl/modfind.tcl.in, tcl/modspec.tcl,
tcl/report.tcl.in, tcl/subcmd.tcl.in,
testsuite/lint.00-init/005-init_ts.exp: Fix notices reported by linter on
tcl source files All linter reports are now fixed. Remove specific linter
rule for modulecmd.tcl in lint testsuite.
* .aspell.en.pws, .github/workflows/linux_tests.yaml: gh: migrate linux
tests to ubuntu-20.04 ubuntu-18.04 is being deprecated and will be removed
in a few weeks. For Tcl 8.5 jobs, the Tcl version has to be deployed
manually.
* tcl/envmngt.tcl.in, tcl/init.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in,
tcl/modfind.tcl.in, tcl/modspec.tcl, tcl/report.tcl.in, tcl/subcmd.tcl.in:
Fix too long line issues on Tcl source files
* .github/workflows/lint_tests.yaml: gh: add lint-tests workflow
* tcl/envmngt.tcl.in, tcl/init.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in,
tcl/modfind.tcl.in, tcl/modspec.tcl, tcl/report.tcl.in, tcl/subcmd.tcl.in:
Fix warnings reported by linter on tcl source files
2022-08-27 Xavier Delaruelle
* tcl/coll.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modspec.tcl,
tcl/report.tcl.in, tcl/subcmd.tcl.in, tcl/util.tcl: Fix errors reported by
linter on tcl source files Use Nagelfar comments to help linter to
correctly understand dynamic aspects of the code.
* init/tcl.in: init: fix too long line issues in tcl
* script/mb, script/mrel, script/nglfar2ccov: script: fix too long line
issues in mb/mrel/nglfar2ccov
* script/mlprof, script/mrel, script/mtreview: script: fix lint issues on
mrel/mlprof/mtreview
* testsuite/lint.00-init/030-tcl.exp: ts: add tcl script lint tests
* Makefile: Remove testsyntax Makefile target testsyntax Makefile target is
removed. testlint testsuite has to be used instead.
* testsuite/lint.00-init/022-ksh.exp: ts: add ksh script lint tests
* testsuite/lint.00-init/021-bash.exp: ts: add bash script lint tests
* testsuite/lint.00-init/020-sh.exp: ts: add sh script lint tests
* .aspell.en.pws, .gitignore, Makefile, NEWS.rst, script/mt,
testsuite/config/unix.exp, testsuite/lint.00-init/005-init_ts.exp,
testsuite/lint.00-init/006-procs.exp,
testsuite/lint.00-init/011-save_test_env.exp: ts: add lint testsuite
2022-08-26 Xavier Delaruelle
* contrib/readme.txt, contrib/scripts/resetenv, contrib/scripts/resetgnome,
contrib/template/.aliases, contrib/template/.bash_profile,
contrib/template/.bashrc, contrib/template/.cshrc,
contrib/template/.fvwm2rc, contrib/template/.login,
contrib/template/.logout, contrib/template/.mailcap,
contrib/template/.mime.types, contrib/template/README.dotfiles,
contrib/template/resetenv.conf: contrib: remove unmaintained template/script
content Remove the contrib template and scripts files as they are not
maintained since a long time in this repository and seem to be deprecated.
2022-08-24 Xavier Delaruelle
* MIGRATING.rst: doc: desc initial environment in MIGRATING
2022-08-23 Xavier Delaruelle
* doc/source/changes.rst: doc: fix changed/new features dispatch in changes
doc
2022-08-22 Xavier Delaruelle
* doc/source/design/initial-environment.rst,
doc/source/design/module-tags.rst, doc/source/design/sticky-modules.rst:
doc: desc. sticky unload on restore in design notes
* doc/source/changes.rst: doc: use bullet list for concise desc. in change
doc
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. sticky
unload on restore in NEWS/man/changes
2022-08-21 Xavier Delaruelle
* testsuite/modules.50-cmds/460-sticky.exp,
testsuite/modules.50-cmds/462-sticky-corner.exp,
testsuite/modules.70-maint/440-reset.exp: ts: adapt existing tests for
sticky unload on restore
* tcl/mfinterp.tcl.in, tcl/subcmd.tcl.in: Allow unload of sticky modules on
restore sub-cmd Allow the unload of sticky modules when restoring
collection. Goal is to be able to restore designated collection as it was
saved, thus without the loaded sticky modules. If such collections were
saved without the sticky modules in it, it means that these sticky modules
can safely be unloaded when moving to the collection state. As a result,
using the --force option is of no use for restore sub-command. This change
does not impact super-sticky modules. Such modules cannot be unloaded during
a restore, even if forced. With this change, behavior of restore
sub-command with sticky modules is aligned with Lmod.
2022-08-20 Xavier Delaruelle
* NEWS.rst, doc/source/design/initial-environment.rst: doc: add
initial-environment design notes
2022-08-18 Xavier Delaruelle
* testsuite/modules.70-maint/440-reset.exp: ts: add reset_target_state tests
in 70/440
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
reset_target_state in NEWS/man/changes
2022-08-17 Xavier Delaruelle
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/220-config.exp: ts: test reset_target_state
config option
* init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init:
add reset_target_state config to completion script
* tcl/init.tcl.in, tcl/subcmd.tcl.in: Add reset_target_state configuration
option Add reset_target_state configuration option that defines the
environment state restored by the reset sub-command. Equals __init__ by
default, which means reset restore the initial environment by default.
Other valid values are __purge__, which means target state is purged
environment, and any existing collection name.
2022-08-15 Xavier Delaruelle
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst,
testsuite/modules.61-coll/060-saveshow.exp: doc: desc module saveshow when
no default in NEWS/man/changes
* testsuite/modules.61-coll/060-saveshow.exp: ts: update/add tests for
'module saveshow' behavior
* tcl/subcmd.tcl.in: Show initial env when no default collection exists
Update saveshow sub-command to display initial environment when no specific
collection is asked and default collection does not exist.
* testsuite/example/initrc.in, testsuite/modules.70-maint/120-autoinit.exp:
ts: test 'module restore' without arg in initrc
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc module
restore when no default in NEWS/man/changes
* testsuite/modules.61-coll/040-restore.exp: ts: update/add tests for
'module restore' behavior
* tcl/subcmd.tcl.in: Restore initial env when no default collection exists
Update restore sub-command to restore initial environment when no specific
collection is asked and default collection does not exist.
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. module
restore __init__ in NEWS/man/changes
* testsuite/modules.70-maint/310-sh-to-mod.exp: ts: fix binpath add
detection in 70/310
* tcl/main.tcl.in, tcl/report.tcl.in: Same special treatment for reset than
restore subcmd Reports loads/unloads like restore sub-command. No auto
unload of modules if auto_handling is disabled.
* testsuite/modulefiles.3/reset/1, testsuite/modulefiles.3/reset/2,
testsuite/modules.70-maint/440-reset.exp: ts: add auto unload test during
reset sub-cmd in 70/440
2022-08-14 Xavier Delaruelle
* testsuite/modules.70-maint/440-reset.exp: ts: add restore __init__ tests
in 70/440
* testsuite/example/initrc.in, testsuite/modulefiles.3/foo/.modulerc,
testsuite/modules.70-maint/120-autoinit.exp,
testsuite/modules.70-maint/440-reset.exp: ts: add reset sub-cmd tests
2022-08-13 Xavier Delaruelle
* testsuite/example/initrc.in, testsuite/modulefiles.3/variant/1.0,
testsuite/modules.70-maint/120-autoinit.exp: ts: add autoinit tests for
__MODULES_LMINIT
* testsuite/modules.70-maint/210-clear.exp: ts: add clear tests for
__MODULES_LMINIT
* .github/workflows/linux_tests.yaml: gh: add missing xrdb tool to test
x-resource on bionic
* testsuite/modules.00-init/005-init_ts.exp: ts: add X11 setup state info to
test log
2022-08-12 Xavier Delaruelle
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/120-autoinit.exp: ts: adapt autoinit tests for
__MODULES_LMINIT Fix several issues in 70/120 test case on the way.
* .aspell.en.pws, tcl/coll.tcl.in, tcl/modfind.tcl.in, tcl/subcmd.tcl.in:
Core code for cmdModuleReset Implement reset sub-command as a 'module
restore __init__'. Where __init__ designates the virtual init collection
made of the initial environment state described in __MODULES_LMINIT.
readCollectionContent has been split to create parseCollectionContent
procedure which analyzes collection content passed as argument. When
__init__ collection is designated, cmdModuleRestore do not check collection
files but parseCollectionContent based on value fetched from
__MODULES_LMINIT environment variable.
* testsuite/modulefiles.3/modbad/reset,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp: ts: add tests for
mod-to-sh sub-command
* doc/source/modulefile.rst, testsuite/modulefiles/info/commandexp,
testsuite/modules.50-cmds/282-info-command.exp,
testsuite/modules.50-cmds/283-info-command-exp.exp: ts/doc: add reset
test/doc on 'module-info command'
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. reset
subcmd in NEWS/man/changes
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add
'reset' sub-command Introduce reset sub-command to restore initial
environment state. This sub-command cannot be called from a modulefile
evaluation context. Add sub-command empty skeleton: cmdModuleReset.
Sub-command accepts no argument nor option.
2022-08-11 Xavier Delaruelle
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add reset
subcmd to completion scripts
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
__MODULES_LMINIT in NEWS/man/changes
* .aspell.en.pws, tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Record init state
in __MODULES_LMINIT During the autoinit sub-command, record the initial
loaded state (state obtained after evaluating modulespath and initrc
initialization files) in the __MODULES_LMINIT environment variable. The
initial loaded state is formed as a collection content, describing the
enabled modulepaths and the loaded modules with the tags applied to these
modules. __MODULES_LMINIT is a colon-separated list. Each entry
corresponding to a 'module use' or 'module load' collection line.
2022-08-10 Xavier Delaruelle
* tcl/coll.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl,
tcl/modfind.tcl.in, tcl/subcmd.tcl.in,
testsuite/modules.00-init/120-siteconfig.exp: Fetch loaded mod props with
getLoadedModulePropertyList Create the getLoadedModulePropertyList
procedure to fetch the different loaded module properties.
getLoadedModulePropertyList replaces the specific procedure used for each
property kind.
2022-08-24 Jan Macku
* .github/workflows/differential_shellcheck.yml: ci(lint): add shell linter
- Differential ShellCheck It performs differential ShellCheck scans and
report results directly in pull request. documentation:
https://github.com/redhat-plumbers-in-action/differential-shellcheck
2022-08-07 Xavier Delaruelle
* NEWS.rst, doc/source/modulefile.rst: doc: add shell support section in
modulefile man
2022-08-06 Xavier Delaruelle
* README.md, doc/source/changes.rst, doc/source/index.rst,
doc/source/module.rst, doc/source/modulefile.rst: doc: fix missing ref to
cmd shell support
2022-08-05 Xavier Delaruelle
* doc/source/module.rst: doc: desc changes on --all/--force options in man
* doc/source/module.rst: doc: reword --auto/--no-auto option desc. in man
--auto and --no-auto options are global to all sub-commands evaluating
modulefile in load or unload mode. Rewrite the description of these option
in module(1) man not to update them each time a new load or unload
sub-command is introduced (as --auto and --no-auto are not changed).
* testsuite/modules.61-coll/021-savelist-search.exp: ts: add savelist --all
tests
2022-08-04 Xavier Delaruelle
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. --all
option on savelist in NEWS/man/changes
* tcl/coll.tcl.in, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in:
List coll from any target with --all opt on savelist Add support for --all
command-line option for savelist sub-command. When set, all collections are
reported and not only those for currently defined collection target.
2022-08-03 Xavier Delaruelle
* NEWS.rst, tcl/subcmd.tcl.in, testsuite/modules.00-init/140-color.exp:
Highlight all savelist subcmd search patterns Refactor on the way a little
bit cmdModuleSavelist.
* NEWS.rst, tcl/report.tcl.in, tcl/subcmd.tcl.in,
testsuite/modules.00-init/140-color.exp: Highlight all list subcmd search
patterns
* testsuite/modules.61-coll/021-savelist-search.exp,
testsuite/modules.70-maint/290-json.exp: ts: test pattern search on savelist
sub-cmd
2022-08-02 Xavier Delaruelle
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
savelist filtering in NEWS/changes/man
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/152-module-emptyarg.exp,
testsuite/modules.50-cmds/350-allin.exp,
testsuite/modules.61-coll/020-savelist.exp,
testsuite/modules.61-coll/080-access-coll.exp,
testsuite/modules.70-maint/190-emptyarg.exp,
testsuite/modules.70-maint/350-term_width.exp: ts: adapt existing tests now
savelist accepts args
* tcl/init.tcl.in, tcl/subcmd.tcl.in: Add search capabilities to savelist
subcmd When one or multiple strings are passed to the savelist sub-command,
only output the collections that match at least one of this string (OR
operation). Sub-command header message is adapted when strings are passed
to the sub-command. However same header message is reported if there is no
saved collection to report from the start. Search capabilities rely on the
modEq comparison procedure, so it takes into account the search_match mode
(starts-with/contains) and the insensitive case search mode. Icase mode is
set to search by default for savelist sub-command.
* tcl/subcmd.tcl.in: Use coll name/file array rather list in
cmdModuleSavelist
2022-08-01 Xavier Delaruelle
* tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Allow search match
option on savelist subcmd Allow to pass the search match options (-S/-C) to
the savelist sub-command.
* tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Allow collection
name as argument to savelist subcmd Allow the savelist sub-command to
receive collection name as argument.
2022-08-03 Xavier Delaruelle
* tcl/modspec.tcl, tcl/subcmd.tcl.in: Unset mod spec on source subcmd if
file exists In case module specification corresponds to a full path name
file, unset parsed module specification on source sub-command. It is done
not to confuse specific character in file path name (like '+') with module
variant specification.
2022-07-31 Xavier Delaruelle
* NEWS.rst, doc/source/modulefile.rst: doc: clarify set-alias only define
shell alias
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.00-init/170-cwd.exp,
testsuite/modules.70-maint/090-source.exp: ts: add avail modfile source
tests in 70/090
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. arg
update on source subcmd in changes/man/news
* tcl/main.tcl.in, tcl/subcmd.tcl.in: Allow module to be specified on source
subcmd Update source sub-command to accept module specification as
argument. File path stay the main specification kind. Which means if a file
foo/1.0 exists, this file is sourced and not the modulefile foo/1.0 in
enabled modulepath. Fixes #424.
2022-08-01 Xavier Delaruelle
* tcl/modspec.tcl: Record raw arg with parsed module spec Update module
specification parsing to record the raw argument translated by specification
analysis. Add getRawArgumentFromVersSpec procedure to fetch this raw spec
from recorded analyzed module specification.
2022-07-30 Xavier Delaruelle
* tcl/envmngt.tcl.in, tcl/init.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in:
Check state is defined before unset in unsetState
* testsuite/config/base-config.exp, testsuite/modulefiles.3/mod-to-sh/1.0,
testsuite/modulefiles.3/mod-to-sh/1.1,
testsuite/modulefiles.3/mod-to-sh/2.0,
testsuite/modulefiles.3/modbad/mod-to-sh,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.00-init/071-args.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp,
testsuite/modules.70-maint/430-mod-to-sh.exp: ts: add tests for mod-to-sh
sub-command
2022-07-28 Xavier Delaruelle
* MIGRATING.rst, NEWS.rst: doc: desc mod-to-sh in NEWS/MIGRATING
2022-07-27 Xavier Delaruelle
* doc/source/module.rst: doc: desc. mod-to-sh subcmd in module man
* NEWS.rst, doc/source/module.rst: doc: fix subcmd list using
--auto/--no-auto/--force opts
* doc/source/design/add-new-config-option.rst,
doc/source/design/add-new-sub-command.rst,
.../design/advanced-module-version-specifiers.rst,
doc/source/design/control-mode-behaviors.rst,
.../design/default-latest-version-specifiers.rst,
doc/source/design/extended-default.rst,
doc/source/design/hide-or-forbid-modulefile.rst,
doc/source/design/insensitive-case.rst,
doc/source/design/lmod-tcl-modulefile-compat.rst,
doc/source/design/module-selection-contexts.rst,
doc/source/design/module-tags.rst,
doc/source/design/output-configuration.rst,
.../design/source-shell-script-in-modulefile.rst,
doc/source/design/sticky-modules.rst, doc/source/design/variants.rst: doc:
fix indent in design documents
* doc/source/design/add-new-config-option.rst,
doc/source/design/add-new-sub-command.rst,
doc/source/design/advanced-module-version-specifiers.rst,
doc/source/design/control-mode-behaviors.rst,
doc/source/design/default-latest-version-specifiers.rst,
doc/source/design/extended-default.rst,
doc/source/design/hide-or-forbid-modulefile.rst,
doc/source/design/insensitive-case.rst,
doc/source/design/lint-sub-command.rst,
doc/source/design/lmod-tcl-modulefile-compat.rst,
doc/source/design/magic-cookie-check.rst,
doc/source/design/module-selection-contexts.rst,
doc/source/design/module-tags.rst,
doc/source/design/output-configuration.rst,
doc/source/design/shell-completion.rst,
doc/source/design/source-shell-script-in-modulefile.rst,
doc/source/design/sticky-modules.rst, doc/source/design/variants.rst: doc:
add vim settings at end of design documents
* .aspell.en.pws, doc/source/cookbook/compiler-etc-dependencies.rst,
doc/source/cookbook/ensure-user-qualify-modules.rst,
doc/source/cookbook/expose-procs-vars-to-modulefiles.rst,
doc/source/cookbook/hide-and-forbid-modules.rst,
doc/source/cookbook/inhibit-report-info.rst,
doc/source/cookbook/log-module-commands.rst,
doc/source/cookbook/module-info-name-return-basename.rst,
doc/source/cookbook/modulefiles-in-git.rst,
doc/source/cookbook/modulepaths-persist-over-sudo.rst,
doc/source/cookbook/new-features-without-breaking-old-module.rst,
doc/source/cookbook/reduce-io-load.rst,
doc/source/cookbook/source-script-in-modulefile.rst,
doc/source/cookbook/sticky-modules.rst,
doc/source/cookbook/test-modulefiles.rst,
doc/source/cookbook/tips-for-code-reuse.rst,
doc/source/cookbook/top-priority-values.rst,
doc/source/cookbook/unload-firstly-loaded.rst: doc: add vim settings at end
of cookbook documents
* doc/source/cookbook/tips-for-code-reuse.rst: doc: fix trailing wspace &
list ident in tips-for-code-reuse
2022-07-26 Xavier Delaruelle
* NEWS.rst, doc/source/design/mod-to-sh-sub-command.rst: doc: add mod-to-sh
subcmd design notes
* NEWS.rst: doc: desc. lint-sub-command design notes in NEWS
2022-07-25 Xavier Delaruelle
* testsuite/modules.70-maint/210-clear.exp,
testsuite/modules.70-maint/280-ml.exp: ts: update clear subcmd tests as only
set vars are unset
* testsuite/modules.00-init/100-pager.exp,
testsuite/modules.00-init/120-siteconfig.exp,
testsuite/modules.00-init/150-access-init.exp,
testsuite/modules.70-maint/070-display.exp: ts: adapt existing tests to new
shelltype state setup
* tcl/subcmd.tcl.in: Silence message report on mod-to-sh subcmd When
performing a mod-to-sh sub-command make message report silent not to mix
these messages with the produced shell code that will be output on the
message channel. If a debugging verbosity is defined (trace mode or above),
message report is left as is.
* tcl/envmngt.tcl.in: Filter Modules-specific env var from mod-to-sh result
When running modulefile evaluation for mod-to-sh sub-command, removes all
Modules-specific environment variable from result to only report the
environment changes done by modulefile, not the Modules load context.
2022-07-24 Xavier Delaruelle
* tcl/envmngt.tcl.in, tcl/subcmd.tcl.in: Get list of Modules-specific env
var in glob form Add getModulesEnvVarGlobList procedure to get all
Modules-specific environment variable in glob form. Update clear and state
sub-command to rely on this procedure. With this change clear sub-command
only unset Modules-specific environment variables that are set.
* NEWS.rst, tcl/subcmd.tcl.in: Clear pushenv stacks on clear subcmd
* tcl/envmngt.tcl.in, tcl/subcmd.tcl.in: Core code for cmdModuleModToSh Add
code for mod-to-sh sub-command. Introduce modtosh_real_shell shell to save
evaluation shell set for modulecmd.tcl. Then shell set for mod-to-sh is set
as target shell for shell code production. Modulefiles specified are loaded
through cmdModuleLoad. Generated shell code is then sent to the report
message channel (stderr) by renderSettings. Shell code is then cleared and
modulecmd.tcl evaluation shell is restored to get final evaluation status on
regular shell code output channel (stdout).
* tcl/envmngt.tcl.in, tcl/main.tcl.in: Rename cleanupAndExit into
flushAndExit
* tcl/envmngt.tcl.in, tcl/init.tcl.in, tcl/main.tcl.in: Deduce shelltype
state value from shell state Add initStateShellType procedure to set
shelltype state when first retrieving its value (with getState). shelltype
is set based on value set for shell state.
2022-07-22 Xavier Delaruelle
* tcl/main.tcl.in, tcl/report.tcl.in: Move report msg flush in dedicated
proc Create reportFlush, procedure that output the final report messages,
flush the message channel and close it. Make cleanupAndExit procedure call
reportFlush rather implementing these actions locally.
* tcl/envmngt.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in: Output produced
shell code in one puts call Instead of outputting shell code to sdtout for
each line, collect all produced shell code in a list variable (g_shcode_out)
and output all the code in a single puts call at the end of module command
execution. Create a specific renderFlush procedure to make the puts to
stdout as output could occur after renderSettings but also after
reportErrorAndExit and the exit catch branch in the main procedure.
renderFlush is called in cleanupAndExit procedure, as it is always run in
the end of the execution whatever if everything goes well or if error
occurs. Code of the putsModfileCmd procedure is also adapted to build list
of message to output to stdout with a flag to know if end-of-line should be
added at end of message. Previously this procedure was listing arguments to
directly pass to puts calls.
2022-07-20 Xavier Delaruelle
* doc/source/modulefile.rst, testsuite/modulefiles/info/command,
testsuite/modulefiles/info/commandexp,
testsuite/modules.50-cmds/282-info-command.exp,
testsuite/modules.50-cmds/283-info-command-exp.exp: ts/doc: add mod-to-sh
test/doc on 'module-info command'
2022-07-19 Xavier Delaruelle
* doc/source/design/add-new-sub-command.rst, doc/source/modulefile.rst: doc:
desc. subcmd in modulefile(4) if avail from this ctx
* doc/source/changes.rst: doc: desc. mod-to-sh in changes
* doc/source/design/add-new-sub-command.rst: doc: add subcmd to linter db if
callable from modfile
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add mod-to-sh
subcmd to completion scripts
* tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Add 'mod-to-sh'
sub-command Introduce mod-to-sh sub-command to output shell code
corresponding to the environment changes of designated modulefiles. This
sub-command cannot be called from a modulefile evaluation context. Add
sub-command empty skeleton: cmdModuleModToSh. Sub-command accepts --icase,
--auto/--no-auto and --force options. Fixes #447.
* CONTRIBUTING.rst: doc: fix misplaced anchor in CONTRIBUTING
2022-07-17 Xavier Delaruelle
* .aspell.en.pws, Makefile, NEWS.rst, doc/Makefile, init/Makefile: install:
use install rather mkdir or cp Use install command rather mkdir or cp to
apply regular file mode when installing Modules. A specific umask
configuration set in the current environment will not impact modes set on
installed files. Follow same approach than Makefiles generated by
autotools, with an INSTALL Makefile variable.
2022-07-16 Xavier Delaruelle
* .aspell.en.pws, MIGRATING.rst: doc: desc. lint subcmd and options in
MIGRATING Closes #451.
2022-07-14 Xavier Delaruelle
* NEWS.rst: doc: desc. lint subcmd and options in NEWS
* Makefile, tcl/subcmd.tcl.in: Disable nagelfar syntaxdb/plugin usage if
addons disabled
* .aspell.en.pws, doc/source/design/lint-sub-command.rst: doc: desc. lint
subcmd in design
2022-07-13 Xavier Delaruelle
* contrib/rpm/environment-modules.spec.in: rpm: recommends nagelfar
installation Now nagelfar is available on Fedora and EPEL, recommends its
installation to be able to lint modulefiles.
2022-07-11 Xavier Delaruelle
* doc/source/design/add-new-sub-command.rst: doc: update linter scripts when
adding new subcmd
2022-07-09 Xavier Delaruelle
* doc/source/changes.rst, doc/source/module.rst: doc: desc lint subcmd in
man/changes
2022-07-06 Xavier Delaruelle
* testsuite/install.00-init/030-options.exp,
testsuite/modules.70-maint/420-lint.exp: ts: add module lint install test
2022-07-08 Xavier Delaruelle
* Makefile: install: add rules to deploy global rc linter plugin
* contrib/nagelfar/plugin_globalrc.tcl, tcl/subcmd.tcl.in: Lint global rc
file specifically Global rc file are evaluated as modulefile but it is not
recommended to use commands that change user environment in such file. When
linting global rc file, the modulefile syntax database is used but a
specific plugin is set to warn against non-recommended usages.
2022-07-07 Xavier Delaruelle
* tcl/main.tcl.in, tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Lint global RC
files When no argument is provided to lint sub-command, also lint all
existing and readable global RC files. When arguments are provided to lint,
test if resolved files are global RC files. If so, lint them as modulerc
files instead of modulefile. The getGlobalRcFileList procedure has been
created from code present in runModulerc procedure. The new procedure return
the list of existing and readable global RC files.
2022-07-06 Xavier Delaruelle
* tcl/subcmd.tcl.in: Detect whether file to lint is modulefile or modulerc
When a file path is provided as argument, detect if it is a modulerc or a
modulefile to accurately lint this file.
* .aspell.en.pws, INSTALL.rst: doc: desc.
--nagelfardatadir/--enable-nagelfar-addons
* contrib/rpm/environment-modules.spec.in: rpm: install Modules-specific
Nagelfar linter addons
* Makefile, Makefile.inc.in, configure, tcl/subcmd.tcl.in: install: add
--nagelfardatadir/--enable-nagelfar-addons Add --nagelfardatadir and
--enable-nagelfar-addons installation option to control whether or not
Modules-specific Nagelfar files need to be installed and in what location.
2022-06-21 Xavier Delaruelle
* testsuite/modulefiles.3/lint/.modulerc, testsuite/modulefiles.3/lint/1.0,
testsuite/modulefiles.3/lint/1.1, testsuite/modulefiles.3/lint/1.2,
testsuite/modulefiles.3/lint/1.3, testsuite/modulefiles.3/lint/1.4,
testsuite/modulefiles.3/lint/2.0, testsuite/modulefiles.3/modbad/lint,
testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.50-cmds/151-module-onlytop.exp,
testsuite/modules.70-maint/420-lint.exp: ts: add tests for lint sub-command
2022-07-05 Xavier Delaruelle
* tcl/subcmd.tcl.in: Use specific-plugin when linting with Nagelfar Use the
specific plugin to lint modulefile or the one to lint modulerc when Tcl
linter is Nagelfar.
* contrib/nagelfar/plugin_modulefile.tcl,
contrib/nagelfar/plugin_modulerc.tcl: nagelfar: add plugins to lint
modulefile/modulerc Create a Nagelfar plugin to lint modulefile and another
one to lint modulerc. These plugins help to report usage of deprecated, not
implemented or not recommended commands or variables. Also help to handle
--option=value argument form.
2022-06-29 Xavier Delaruelle
* contrib/modulefiles/module-git, contrib/modulefiles/use.own: contrib: fix
lint warning on example modulefiles
* tcl/subcmd.tcl.in: Use Nagelfar syntax db located in contrib directory
* contrib/nagelfar/syntaxdb_modulefile.tcl,
contrib/nagelfar/syntaxdb_modulerc.tcl: Add specific syntaxdb for modulefile
and modulerc Add Nagelfar syntax databases to lint modulefile and another
one to lint modulerc.
2022-06-28 Xavier Delaruelle
* tcl/subcmd.tcl.in: Lint modulerc files when no arg provided In addition
to the modulefiles available from enabled modulepaths, also lint the
modulerc files from these modulepaths. Set specific command for linting
modulerc files, with a different syntax db file when Nagelfar is used.
* tcl/subcmd.tcl.in: Use syntax database when linting with Nagelfar When
Tcl linter is Nagelfar, use a specific syntax database to lint modulefiles.
* .aspell.en.pws, tcl/subcmd.tcl.in: Lint all avail modfile when no arg
provided When no argument is provided to the lint sub-command, resolve all
modulefiles that current user has access to and lint all these files.
Update cmdModuleLint to first gather the list of all files to lint, then
lint these files.
2022-06-27 Xavier Delaruelle
* .github/workflows/linux_tests.yaml: gh: add --with-tcl-linter on a test
case
2022-06-26 Xavier Delaruelle
* tcl/report.tcl.in, tcl/subcmd.tcl.in: Move linter output report in
dedicated proc Create displayLinterOutput procedure to handle the parsing
and output of each linter messages. Current code handles specific output
from Nagelfar linter and generic error report for other programs set as
linter.
* configure: install: warning if tcllinter program not found
* INSTALL.rst, doc/source/module.rst: doc: desc --with-tcl-linter-opts in
INSTALL/man
* testsuite/modules.70-maint/220-config.exp: ts: adapt tcl_linter tests for
--with-tcl-linter-opts
* Makefile, Makefile.inc.in, configure, site.exp.in, tcl/init.tcl.in:
install: add --with-tcl-linter-opts configure option Introduce the
--with-tcl-linter-opts configure option to choose at installation time the
options to pass to the tcl linter program. Default option is ''.
2022-06-24 Xavier Delaruelle
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/220-config.exp: ts: test tcl_linter config option
* doc/source/changes.rst, doc/source/module.rst: doc: desc.
MODULES_TCL_LINTER in man/changes
* INSTALL.rst: doc: desc --with-tcl-linter in INSTALL
* INSTALL.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
tcl_linter config in man/changes
* init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init:
add tcl_linter config to completion script
* Makefile, Makefile.inc.in, configure, site.exp.in, tcl/init.tcl.in:
install: add --with-tcl-linter configure option Introduce the
--with-tcl-linter configure option to choose at installation time the
default program command to use to lint modulefiles. Default Tcl linter is
'nagelfar.tcl'.
* tcl/init.tcl.in, tcl/subcmd.tcl.in: Introduce tcl_linter configuration
option Add tcl_linter option to configure the program to use by lint
sub-command to lint modulefiles. When configuration is modified it sets the
MODULES_TCL_LINTER environment variable.
2022-06-22 Xavier Delaruelle
* .aspell.en.pws, tcl/subcmd.tcl.in: Parse and format linter output Output
linter output under a *Linting* message block. Parse each output line to
produce NOTICE, WARNING or ERROR report messages.
2022-06-21 Xavier Delaruelle
* .aspell.en.pws, tcl/subcmd.tcl.in: Lint every modulefile passed as
argument Update cmdModuleLint to resolve each argument and find
corresponding modulefile. Pass these modulefile to Nagelfar to lint them.
In this initial code, Nagelfar is expected to be found at
nagelfar/nagelfar.tcl and its execution output is sent to the terminal.
2022-06-19 Xavier Delaruelle
* init/Makefile, init/bash_completion.in, init/fish_completion,
init/tcsh_completion.in, init/zsh-functions/_module.in: init: add lint
subcmd to completion scripts
* .aspell.en.pws, tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in:
Introduce 'lint' sub-command Add the lint sub-command to check syntax of
modulefiles. Initial commit which adds empty cmdModuleLint procedure and
add code to reach it through module procedure. General sub-command
properties: * shortcut name: none * accepted options: --all, --icase *
expected number of argument: 0 to N * accept boolean variant specification:
no * parse module version specification: yes * fully read modulefile when
checking validity: no * only called from top level: yes
2022-07-12 Xavier Delaruelle
* NEWS.rst: doc: desc protected_envvars in NEWS Fixes #429.
2022-07-09 Xavier Delaruelle
* .github/workflows/windows_tests.yaml: gh: fix missing liblapack0 dep for R
pkg on Cygwin
* .cirrus.yml: cirrus: update to python39 on FreeBSD-13
2022-06-08 Adrien Cotte
* testsuite/modulefiles.3/protect/1.0, testsuite/modulefiles.3/protect/2.0,
.../modules.70-maint/410-protected_envvars.exp: ts: add 70/410
protected_envvars
2022-03-04 Adrien Cotte
* testsuite/install.00-init/010-environ.exp,
testsuite/modules.00-init/010-environ.exp,
testsuite/modules.70-maint/220-config.exp: ts: test protected_envvars config
option
2022-02-21 Adrien Cotte
* init/zsh-functions/_module.in: Zsh completion support for
protected_envvars config
* init/fish_completion: Fish completion support for protected_envvars config
* init/Makefile: Bash completion support for protected_envvars config
* .aspell.en.pws, INSTALL.rst, doc/source/changes.rst,
doc/source/module.rst: doc: desc. protected_envvars configuration
* tcl/envmngt.tcl.in, tcl/init.tcl.in: Add protected_envvars configuration
option Add the protected_envvars configuration option that prevents choosen
environment variables to be set or unset by Module commands.
2022-06-19 Xavier Delaruelle
* .aspell.en.pws, NEWS.rst, tcl/mfinterp.tcl.in: Fix source-sh/sh-to-mod
when fish regex-easyesc is on Fix source-sh modulefile command and
sh-to-mod sub-command when used with a fish shell script when the
regex-easyesc fish option is enabled. This option has been introduced in
fish 3.1 and is turned on by default starting fish 3.5. Fixes #463.
* NEWS.rst: doc: desc. enclose install paths work in NEWS
2022-06-18 Xavier Delaruelle
* init/Makefile: install: create etcdir from init Makefile if used
2022-06-17 Xavier Delaruelle
* doc/source/_static/literal_block.css,
doc/source/_static/rtd_literal_block.css, doc/source/conf.py: doc: fix css
config for sphinx >= 3.5 Use html_css_files configuration option introduced
in Sphinx 1.8 to setup CSS in a more conventional way. Also fix
pre.literal-block specific styling as the 'section' div is not used anymore
in newer Sphinx versions.
2022-06-15 Xavier Delaruelle
* .cirrus.yml: cirrus: test install path containing space char Transform
the second FreeBSD test case into a Ubuntu testcase, running on last LTS
release. For this test case, installation is made over a path containing a
whitespace character. No specific quarantine setup with this test case, as
it is not compatible with installation in path containing a whitespace
character.
2022-06-13 Xavier Delaruelle
* testsuite/bin/install_test_csh, testsuite/bin/install_test_fish,
testsuite/bin/install_test_sh, testsuite/bin/install_test_tcl,
testsuite/config/unix.exp, testsuite/install.00-init/005-init_ts.exp,
testsuite/install.00-init/030-options.exp,
testsuite/install.00-init/060-quar.exp,
testsuite/install.00-init/080-args.exp: ts: fix install tests if space char
in install path
2022-06-14 Xavier Delaruelle
* tcl/envmngt.tcl.in: Update autoinit produced code to enclose install path
Update code generated by the autoinit sub-command to enclose all references
to installation path to cope with an installation done in a path containing
whitespace character. Enclosing modulecmd.tcl installation path this way is
not effective with the quarantine mechanism that implies a double shell code
evaluation. So it is advised not to install Modules in a path containing a
whitespace character if the quarantine mechanism is needed.
2022-06-12 Xavier Delaruelle
* testsuite/config/unix.exp, testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.00-init/120-siteconfig.exp,
testsuite/modules.00-init/140-color.exp,
testsuite/modules.50-cmds/400-source-sh.exp,
testsuite/modules.70-maint/120-autoinit.exp,
testsuite/modules.70-maint/310-sh-to-mod.exp: ts: fix tests if space char in
install location path
* Makefile, doc/Makefile, init/Makefile: install: enclose install path refs
in Makefiles
* init/bash.in, init/cmake.in, init/csh.in, init/fish.in, init/ksh.in,
init/perl.pm.in, init/profile.csh.in, init/profile.sh.in, init/r.R.in,
init/ruby.rb.in, init/sh.in, init/tcl.in, init/tcsh_completion.in,
init/zsh.in: init: enclose installation path references Update
initialization, profile and completion scripts to enclose all references to
the installation paths. Enclosing modulecmd.tcl installation path this way
is not effective with the quarantine mechanism that implies a double shell
code evaluation. So it is advised not to install Modules in a path
containing a whitespace character if the quarantine mechanism is needed.
* contrib/modulefiles/modules.in, contrib/modulefiles/version.in,
script/add.modules.in: contrib,script: enclose installation path references
Update add.modules script and example modulefiles to enclose all references
to the installation paths.
* tcl/init.tcl.in, tcl/main.tcl.in, tcl/subcmd.tcl.in: Enclose all
installation path references Fix modulecmd.tcl to enclose all references to
an installation path. These references are thus robust in case a space
character is part of the installation location.
* NEWS.rst: doc: desc. init scripts > autoinit migration work
* .github/workflows/linux_tests.yaml: gh: update test case with disabled
bin/manpath config
2022-06-11 Xavier Delaruelle
* testsuite/modules.70-maint/120-autoinit.exp: ts: test source of shell
completion during autoinit
* testsuite/modules.70-maint/120-autoinit.exp: ts: add autoinit MANPATH
setup tests
2022-06-08 Xavier Delaruelle
* .cirrus.yml: cirrus: use leap 15.3 to get python-Sphinx
2022-06-05 Xavier Delaruelle
* site.exp.in, testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.50-cmds/400-source-sh.exp,
testsuite/modules.70-maint/120-autoinit.exp,
testsuite/modules.70-maint/310-sh-to-mod.exp: ts: update tests now autoinit
sets PATH/MANPATH/etc
* Makefile, init/Makefile, init/zsh.in, tcl/subcmd.tcl.in: init: setup zsh
FPATH through autoinit command Add zsh FPATH setup in autoinit command
instead of zsh shell initialization script. This way all the shell setup is
gathered in the autoinit process. What is left in initialization script is
the code to properly call the autoinit process. Fixes #462.
* Makefile, init/Makefile, init/bash.in, init/csh.in, init/fish.in,
tcl/subcmd.tcl.in: init: setup shell completion through autoinit command
Add shell completion setup in autoinit command instead of shell
initialization scripts. Use this way one modulecmd.tcl internal code instead
of shell code for every shell having some completion to source (bash, tcsh,
fish). Fixes #462.
2022-06-04 Xavier Delaruelle
* Makefile, init/Makefile, init/bash.in, init/csh.in, init/fish.in,
init/ksh.in, init/sh.in, init/zsh.in, tcl/subcmd.tcl.in: init: setup MANPATH
through autoinit command Add MANPATH setup in autoinit command instead of
shell initialization scripts. Use this way one modulecmd.tcl internal code
instead of shell code for every shell requiring to setup MANPATH with
Modules binaries location (sh, bash, ksh, zsh, csh, tcsh, fish). Fixes
#462.
2022-06-03 Xavier Delaruelle
* Makefile, init/Makefile, init/bash.in, init/csh.in, init/fish.in,
init/ksh.in, init/sh.in, init/zsh.in, tcl/subcmd.tcl.in: init: setup PATH
through autoinit command Add PATH setup in autoinit command instead of
shell initialization scripts. Use this way one modulecmd.tcl internal code
instead of shell code for every shell requiring to setup PATH with Modules
binaries location (sh, bash, ksh, zsh, csh, tcsh, fish). Fixes #462.
* init/bash.in, tcl/envmngt.tcl.in: Export module bash functions directly
through autoinit Export the module, _module_raw and ml bash shell functions
directly through the autoinit sub-command process rather within the bash
shell initialization script. Cannot apply the same change to the sh shell
when it is bash launched as sh, since we cannot tell in the modulecmd.tcl
execution that the current sh shell is bash (as BASH environment variable is
not exported to sub-shells). Fixes #462.
2022-05-26 Xavier Delaruelle
* testsuite/modules.00-init/005-init_ts.exp,
testsuite/modules.70-maint/410-timer.exp: ts: add --timer tests in 70/410
* NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc.
--timer option in NEWS/changes/man
* testsuite/modules.00-init/100-pager.exp,
testsuite/modules.00-init/120-siteconfig.exp,
testsuite/modules.00-init/150-access-init.exp: ts: adapt existing tests for
timer state introduction
2022-05-25 Xavier Delaruelle
* tcl/mfinterp.tcl.in, tcl/modspec.tcl, tcl/report.tcl.in: Report duration
of each proc in timer debug mode When --timer option is enabled and
verbosity level is higher or equal to verbose, report trace of each
procedure executed with their duration. All regular debug messages are
replaced by these timer trace messages.
2022-05-22 Xavier Delaruelle
* .aspell.en.pws, tcl/init.tcl.in, tcl/main.tcl.in, tcl/report.tcl.in:
Introduce --timer option Add --timer global option to report execution time
in milliseconds at the end. Set start time in timer_start global variable
when --timer is set. Also enable timer state, to know later on that timer
mode has been asked. Timer report is produced at the and, in last run
procedure: cleanupAndExit. Report is shown at any verbosity level. Timer
reports are kind of debug information, thus they also use the 'db' sgr key
to get graphically enhanced. No need for a dummy reportTimer procedure like
for reportDebug, to use to gather all messages prior error report
initialization, as reportTimer is always called after error report being
initialized.
2022-05-29 Xavier Delaruelle
* MIGRATING.rst: doc: describe Optional requirements in MIGRATING
* testsuite/modulefiles.3/optional/1.0,
testsuite/modules.50-cmds/465-tag-opt.exp,
testsuite/modules.50-cmds/550-optional-opt.exp,
testsuite/modules.70-maint/240-icase.exp: ts: test misplaced/invalid prereq
option in 50/550
* NEWS.rst, tcl/mfinterp.tcl.in: Error on misplaced/invalid options on
prereq commands Update prereq command parsing to raise error in case of an
invalid option or a misplaced one.
* testsuite/modules.50-cmds/550-optional-opt.exp: ts: adapt optional tests
as eval failure are not reported
* tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl: No report of eval
error of optional requirement Do not report the evaluation error of
optional requirements. Proceed like on a prereq-any command, when some
evaluation fails but one succeed. Update the loadRequirementModuleList
procedure by adding an argument named 'optional' to know if current load
attempt is mandatory or not.
2022-05-28 Xavier Delaruelle
* tcl/mfinterp.tcl.in: Disable auto loading on always-load in DepRe context
Disable auto-loading on always-load sub-command when evaluated in a
Dependency Reload context.
2022-05-27 Xavier Delaruelle
* testsuite/modulefiles.3/foo/1.0, testsuite/modulefiles.3/optional/1.0,
testsuite/modulefiles.3/optional/2.0,
testsuite/modules.50-cmds/550-optional-opt.exp: ts: add --optional option
tests in 50/550
2022-05-22 Xavier Delaruelle
* NEWS.rst: doc: desc. --optional and try-load changes in NEWS
* doc/source/changes.rst, doc/source/design/lmod-tcl-modulefile-compat.rst,
doc/source/modulefile.rst: doc: desc --optional option in man/changes/design
2022-05-21 Xavier Delaruelle
* testsuite/modulefiles.3/tryload/2.0,
testsuite/modules.50-cmds/490-try-load.exp,
testsuite/modules.50-cmds/518-load-any.exp: ts: add depre tests for
try-load/load-any mfcmd
2022-05-19 Xavier Delaruelle
* tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl, tcl/subcmd.tcl.in:
Change try_modulefile state into a cmdModuleLoad arg Replace the
try_modulefile state by the tryload argument on the cmdModuleLoad procedure.
Update prereqAnyModfileCmd, prereqAllModfileCmd and
loadRequirementModuleList procedure to pass this tryload argument all along
toward cmdModuleLoad. This is needed when evaluating module try-load and
module load-any commands in modulefile.
* tcl/mfinterp.tcl.in: Allow to pass multiple pre-args on interp cmd alias
Update initialization of the command aliases on modulefile interpreter to
allow to pre defined more than one argument to transmit.
2022-05-18 Xavier Delaruelle
* .aspell.en.pws, tcl/main.tcl.in: Inhibit autoload in depre ctx for all
kind of load cmd Inhibit the auto loading mechanism when module is
currently evaluated in a Dependency Reload (DepRe) context for load,
try-load and load-any sub-commands. This way it avoids to auto reload the
optional dependency module currently targeted by the main unload order from
user.
* testsuite/modules.50-cmds/152-module-emptyarg.exp,
testsuite/modules.50-cmds/465-tag-opt.exp,
testsuite/modules.50-cmds/490-try-load.exp,
testsuite/modules.61-coll/040-restore.exp: ts: adapt existing tests to
try-load prereq record change
2022-05-17 Xavier Delaruelle
* tcl/main.tcl.in: Use optional prereq to record try-load requirements When
try-load is used in a modulefile, record implied requirement as optional
instead of only recording those that are loaded. This way the modulefile
will get reloaded if requirement is loaded afterward. Cannot fully rely on
prereqAllModfileCmd procedure as try-load does not fully correspond to a
prereq-all --optional: an requirement evaluation error will lead to an error
of the module try-load command that will abort the modulefile evaluation.
* tcl/main.tcl.in: Refactor module load/try-load/load-any modulefile code
* testsuite/modules.70-maint/080-help.exp: ts: adapt existing tests for
prereq cmds refactoring
* .aspell.en.pws, tcl/main.tcl.in, tcl/mfinterp.tcl.in: Merge
prereq-all/prereq-allAH into prereqAllModfileCmd Merge the prereq-all and
prereq-allAH procedure into a single prereqAllModfileCmd procedure taking
current auto_handling option value as first arg to know whether to
automatically load requirements or not.
* .aspell.en.pws, tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/subcmd.tcl.in:
Merge prereq/prereqAH into prereqAnyModfileCmd proc Merge the prereq and
prereqAH procedure into a single prereqAnyModfileCmd procedure taking
current auto_handling option value as first arg to know whether to
automatically load requirements or not.
2022-05-16 Xavier Delaruelle
* testsuite/modules.50-cmds/465-tag-opt.exp,
testsuite/modules.50-cmds/513-prereq-any.exp,
testsuite/modules.50-cmds/515-depends-on.exp,
testsuite/modules.50-cmds/516-prereq-all.exp,
testsuite/modules.50-cmds/517-always-load.exp: ts: adapt existing tests to
--optional addition
* tcl/mfinterp.tcl.in: Add --optional option to prereq commands Introduce
the --optional option on prereq commands (prereq, prereq-all, always-load,
prereq-any and depends-on) to indicate that the prereq list is fully
optional: if none of these prereqs are loaded, no error occurs. When
recording these prereq list in persistency information (__MODULES_LMPREREQ
variable), the current module name is added as first module in prereq list
to get this rule always satisfied even if no module from the prereq list is
loaded.
2022-05-15 Xavier Delaruelle
* tcl/main.tcl.in, tcl/modeval.tcl, tcl/subcmd.tcl.in: Change any_modulefile
state into a cmdModuleLoad arg Replace any_modulefile state by the anyload
argument on cmdModuleLoad procedure. any_modulefile branch were already not
in use for 'module load-any' commands used in modulefiles.
* tcl/mfinterp.tcl.in: Make always-load proc directly use prereq-all Update
always-load procedure to make it use directly the auto_handling version of
prereq-all command.
* testsuite/modules.50-cmds/152-module-emptyarg.exp,
testsuite/modules.70-maint/080-help.exp: ts: adapt existing tests for prereq
interp refactoring
* tcl/subcmd.tcl.in: No need to disable auto_handling to call prereq Update
cmdModuleSwitch procedure as it is not anymore needed to disable
auto_handling option to call a prereq command that does not automatically
load requirements.
* tcl/main.tcl.in: Make module load rely on prereq/prereq-all cmds Update
module procedure to directly use, when 'module load' is called within a
modulefile, the prereq/prereq-all commands in their auto_handling or
non-auto_handling versions.
* .aspell.en.pws, tcl/mfinterp.tcl.in: Create auto_handling and not version
of prereq procs Split prereq and prereq-all procedures into a auto_handling
version, that attempts to automatically load requirements, and a non
auto_handling version that raise an error directly if requirement is not
already loaded. Adapt Tcl sub-interpreter initialization to make it
dependent of the auto_handling option enablement. When auto_handling is
enabled, the auto_handling versions of the prereqs procedure are configured.
With this change other parts of the code will be able to call either prereq
or prereqAH directly whether they need a load attempt or not, whatever the
current status of the auto_handling option.
2022-05-31 Xavier Delaruelle
* NEWS.rst, contrib/rpm/environment-modules.spec.in, doc/source/conf.py,
version.inc.in: Release of version 5.1.1
* testsuite/is_module_defined, testsuite/modules.00-init/005-init_ts.exp:
ts: fix is_modules_defined test Add bash script to test whether module
function is defined
* Makefile, NEWS.rst: install: call git cmds in Makefile only if needed
Update Makefile to call git command only if the version.inc file needs to
get rebuilt (if it does not exist or if the git repository has been updated
after version.inc built). Include version.inc file in main Makefile only if
its variables have not been just generated within Makefile flow.
2022-05-30 Xavier Delaruelle
* .aspell.en.pws, Makefile, NEWS.rst, lib/.gitignore, lib/Makefile.in:
install: include generated config.{guess,sub} in dist Include the
lib/config.guess and lib/config.sub scripts in distribution tarball if
generated by autoreconf
* Makefile, init/Makefile: install: no dependency to version.inc in
init/Makefile The Makefile script in the init directory does not depend on
the definitions stored in the version.inc file. So remove inclusion and
requirement definition to this version.inc file in init/Makefile.
* script/mrel: install: locate rpmlint rc file with -r in mrel Update mrel
script to locate rpmlint rc file with the -r command-line switch as -f is
not recognized anymore on rpmlint v2.
* contrib/rpm/environment-modules.rpmlintrc: install: update rpmlint rc
config for fc36 Update rpmlint rc file to match the new rpmlint version and
configuration provided in Fedora 36.
2022-05-28 Xavier Delaruelle
* testsuite/modulefiles.3/lcompat/1.7,
testsuite/modules.50-cmds/517-always-load.exp: ts: add depre tests for
always-load command in 50/517
* NEWS.rst, tcl/subcmd.tcl.in, testsuite/modules.50-cmds/465-tag-opt.exp:
Update mod designation with tags set by DepRe modules Update module
designation with the tags set by reloading dependent module. Closes #460.
2022-05-27 Xavier Delaruelle
* NEWS.rst, doc/source/design/module-tags.rst, tcl/mfinterp.tcl.in,
tcl/modeval.tcl, testsuite/modulefiles.3/tag/8.0,
testsuite/modules.50-cmds/465-tag-opt.exp: Update tags set with prereq on
all loaded mods Update tags set through prereq command on all already
loaded requirements. Closes #459.
2022-05-20 Xavier Delaruelle
* testsuite/example/siteconfig.tcl-1, testsuite/modules.00-init/170-cwd.exp:
ts: test module over a removed current working dir
* NEWS.rst, tcl/util.tcl: Report known error when cwd cannot be retrieved
Closes #457.
2022-05-14 Xavier Delaruelle