Debian Codegraph @

doc/source/NEWS.rst

raw
1 .. _NEWS:
2
3 Release notes
4 =============
5
6 This file describes changes in recent versions of Modules. It primarily
7 documents those changes that are of interest to users and admins.
8
9 .. _5.7 release notes:
10
11 Modules 5.7.0 (2026-09-21)
12 --------------------------
13
14 * Script: improve :command:`mrel` to always ask a Fedora Kerberos ticket.
15 * Use CMake ``EVAL CODE`` to forward arguments passed to ``module`` CMake
16 function. (fix issue #419 with contribution from Benoit Dumas)
17 * Doc: update email address in `Code of conduct`_ to report bad behavior to
18 maintainers.
19 * Move *modules-interest* mailing-list to HPSF.
20 * Script: add tests on :command:`mb` utility to track performance of load,
21 list and purge sub-commands with large number (>100) of modules.
22 * Script: fix procedure call timing of Tcllib profiler module within
23 :command:`mlprof` to avoid mixing timers from calls made at different
24 interpretation level.
25 * Parse loaded environment in early execution stage and always fail if an
26 inconsistency is detected.
27 * Improve performances of loaded module comparison used when checking
28 conflict and requirement dependencies. (fix issue #603)
29 * Fix environment variable synchronization issue between modulefile evaluation
30 interpreters: supersede the ``append`` Tcl command rather sync interpreters
31 for each environment variable change. A substantial performance improvement
32 is observed when loading or unloading many modulefiles. (fix issue #603)
33 * Script: add ``--with-lmod`` option to :command:`mb` command to compare
34 current Modules version against an installed version of Lmod.
35 * Update the :subcmd:`sh-to-mod` mechanism to correctly parse shell alias on
36 Dash shell version 0.5.13.
37 * Update the :subcmd:`sh-to-mod` mechanism to correctly parse path-like
38 environment variable on Fish shell version 4.3.
39 * When fetching user's groups, in case a group name cannot be resolved use
40 this group gid number as name instead of raising an error. (fix issue #604)
41 * Introduce :mconfig:`path_entry_reorder` configuration option that change
42 order of entry in a path-like environment variable when it is added again.
43 This new configuration option is disabled by default. This option can be
44 changed at installation time with :instopt:`--enable-path-entry-reorder`.
45 When :mconfig:`path_entry_reorder` is changed with :subcmd:`config`
46 sub-command, it sets the :envvar:`MODULES_PATH_ENTRY_REORDER` environment
47 variable. (fix issue #595 with contribution from Achim Gsell)
48 * Install: reorder the options in the :file:`configure` script help message
49 alphabetically.
50 * Doc: add manual page for :ref:`modulecmd(1)` command.
51 * Make :mfcmd:`getenv` modulefile command available from module rc file
52 evaluation context. (fix issue #588)
53 * Install: add installation option
54 :instopt:`--disable-compressed-changelog<--enable-compressed-changelog>` to
55 cope with packaging process handling documentation file compression at their
56 level. (fix issue #592)
57 * Add :option:`-p` option as an abbreviated form for :option:`--paginate`.
58 (fix issue #593)
59 * Add :option:`-P` option as an abbreviated form for :option:`--no-pager`.
60 (fix issue #606)
61 * Doc: add :ref:`organize-tsc-meeting` guide.
62 * Add the :mconfig:`paginate` configuration option to control whether or not
63 output message should be piped into defined pager by default. This option
64 can be changed at installation time with :instopt:`--enable-paginate`. When
65 :mconfig:`paginate` is changed with :subcmd:`config` sub-command, it sets
66 the :envvar:`MODULES_PAGINATE` environment variable. (fix issue #594)
67 * Doc: add :ref:`plan-next-release-content` guide
68 * Introduce the :mconfig:`non_exportable_tags` configuration option that lists
69 tags that should not be exported to modules once loaded. When
70 :mconfig:`non_exportable_tags` is changed with :subcmd:`config` sub-command,
71 it sets the :envvar:`MODULES_NON_EXPORTABLE_TAGS` environment variable. (fix
72 issue #608)
73 * Improve the performance of the module’s column output by removing the costly
74 optimization that attempts to fit more columns within the available screen
75 width. (fix issue #622)
76 * Fix superseding definition of ``source`` Tcl command when
77 :mconfig:`source_cache` configuration option is enabled to support
78 ``-encoding`` option. (fix issue #627)
79 * Correctly parse the module specifications passed as argument on
80 :mfcmd:`depends-on`, mfcmd:`always-load` and :mfcmd:`prereq-all` modulefile
81 commands. It especially fixes module specification containing the definition
82 of variants. (fixes issue #626)
83 * Report the full *via* path for modules on :subcmd:`avail` and
84 :subcmd:`spider` sub-commands rather the last part of this via information.
85 JSON output is updated to report the ``via`` key as an array rather as a
86 string. (fix issue #586)
87 * Introduce the :mconfig:`info_extension` configuration option to consider
88 that module extensions have a pure informational purpose and no module alias
89 is associated to them. Extensions defined with :mfcmd:`provide` modulefile
90 command are not affected by this mechanism. When :mconfig:`info_extension`
91 is changed with :subcmd:`config` sub-command, it sets the
92 :envvar:`MODULES_INFO_EXTENSION` environment variable. (fix issue #585)
93 * Doc: add :ref:`linked-envvars` design notes.
94 * Add the :mconfig:`linked_envvars` configuration option to apply the same
95 value update commands to all linked environment variables. When
96 :mconfig:`linked_envvars` is changed with :subcmd:`config` sub-command, it
97 sets the :envvar:`MODULES_LINKED_ENVVARS` environment variable. (fix issue
98 #609)
99 * Doc: add :ref:`init-envvars` design notes.
100 * Add the :mconfig:`init_envvars` configuration option to define initial
101 values to assign to environment variables before they are modified for the
102 first time. This option can be changed at installation time with
103 :instopt:`--with-init-envvars`. When :mconfig:`init_envvars` is changed with
104 :subcmd:`config` sub-command, it sets the :envvar:`MODULES_INIT_ENVVARS`
105 environment variable. (fix issue #572)
106 * Enable lexical binding in Emacs addon file. (contribution from Peter Oliver)
107 * Script: update :command:`mt` utility to analyze test suite log file when
108 test suite run is aborted.
109 * Correctly match loaded modules specified as requirement with a trailing
110 ``/`` character after module name. (fix issue #640)
111 * Also consider ``-`` in addition to ``.`` as a version number separator
112 character when selecting a module with the :mconfig:`extended_default`
113 mechanism. (fix issue #619)
114 * Rename Modules initialization script for Python ``env_modules.py`` to make
115 it a proper Python module name.
116 * Rename the Python initialization script to :file:`env_modules.py` so that it
117 uses a valid Python module name. Generates a :file:`python.py` symlink onto
118 :file:`env_modules.py` to preserve compatibility. (contribution from Byron
119 Boulton)
120 * Install: introduce the :instopt:`--enable-set-pythonpath` installation
121 option to prepend Modules ``init`` directory to the :envvar:`PYTHONPATH`
122 environment variable during Modules initialization. This option is enabled
123 by default and make it easier to import the ``env_modules`` Python module.
124 (fix issue #483 with contribution from Byron Boulton)
125 * Install: add the :instopt:`--enable-append-pythonpath` installation option,
126 which causes :instopt:`--enable-set-pythonpath` to append the Modules
127 ``init`` directory to :envvar:`PYTHONPATH` instead of prepending it.
128 (contribution from Byron Boulton)
129 * Doc: clarify shell script, executed by :mfcmd:`source-sh` modulefile command
130 or :subcmd:`sh-to-mod` sub-command, does not get access to shell aliases,
131 functions or completions settings only available in interactive sessions or
132 defined in profile files. (fix issue #646)
133 * Report a global known error when Modules Tcl extension library cannot be
134 loaded. (fix issue #644)
135 * Add :mconfig:`domainname` configuration option to define the command to run
136 to fetch domain name. It can be changed at installation time with
137 :instopt:`--with-domainname` and :instopt:`--with-domainname-opts` options.
138 When :mconfig:`domainname` is changed with :subcmd:`config` sub-command, it
139 sets the :envvar:`MODULES_DOMAINNAME` environment variable. (fix issue #645)
140 * Update the :mfcmd:`source-sh` modulefile command and :subcmd:`sh-to-mod`
141 sub-command mechanism to produce a more consistent value for a path-like
142 environment variable change that requires both a prepended and an appended
143 part expressed with a different delimiter character: a :mfcmd:`setenv`
144 command is now generated instead in this situation.
145 * Update the :mfcmd:`source-sh` modulefile command and :subcmd:`sh-to-mod`
146 sub-command mechanism to no longer de-duplicate a path entry found several
147 times in the entries it prepends or in the entries it appends, and to add
148 the ``--duplicates`` option on a generated :mfcmd:`prepend-path` or
149 :mfcmd:`append-path` command when one of the path entries it adds is
150 already found in the variable value prior script evaluation, is found
151 several times in the entries it adds or is found in both the entries it
152 prepends and the entries it appends, so this entry is not silently
153 absorbed by these commands' default de-duplication behavior nor relocated
154 by the :mconfig:`path_entry_reorder` configuration option.
155 * Resolve an exact ``name/version`` specification without validating every
156 sibling modulefile found in its directory, by walking versions from the
157 dictionary-highest to the dictionary-lowest and stopping as soon as the
158 implicit ``default`` and ``latest`` symbolic versions are settled. A
159 substantial performance improvement is observed when loading an existing
160 modulefile out of a directory holding hundreds or thousands of sibling
161 versions. (fix issue #561)
162 * Doc: add :ref:`module-find-and-resolution` design notes.
163 * Doc: add :ref:`devel-testsuite` guide describing the DejaGnu testsuite
164 structure.
165 * Doc: document and cross-reference :ref:`commit-message-conventions` in
166 :ref:`CONTRIBUTING`.
167 * Doc: document :ref:`code-comments` conventions in :ref:`CONTRIBUTING`.
168 * Doc: add :ref:`devel-ci` guide describing continuous integration usage.
169 * Install: rename the shipped ``COPYING.GPLv2`` license file to ``COPYING``,
170 the name convention recognized by packaging tools.
171 * Doc: fix favicon rendering with a black background instead of white on
172 viewers that ignore transparency, by setting its transparent pixels to a
173 white matte color instead of black.
174 * Doc: document Windows Terminal profile setup as an alternative way to
175 initialize Modules on Windows without an install script. (fix issue #634)
176 * Install: use ``reg add`` instead of ``setx /M`` to persist the system-wide
177 ``PATH`` environment variable in :file:`INSTALL.bat` and
178 :file:`UNINSTALL.bat`, as ``setx`` silently truncates the value it writes
179 to 1024 characters, which could corrupt the system ``PATH`` when installing
180 from a shell with an already long inherited ``PATH`` (e.g. a Visual Studio
181 Developer Prompt). (fix issue #654)
182 * Doc: add :ref:`hook-api` design notes.
183 * Add the ``add-hook`` siteconfig command to register a procedure on one of
184 4 stable hook events (:mhook:`before-modulefile-eval`,
185 :mhook:`after-modulefile-eval`, :mhook:`before-modulerc-eval`,
186 :mhook:`after-modulerc-eval`), so sites no longer need to rely on ``trace``
187 or procedure renaming, which bind to internal implementation details, to
188 run code before or after a modulefile or modulerc evaluation. (fix issue
189 #607)
190 * Doc: add :ref:`add-new-hook-event` guide describing how to contribute a
191 new hook event.
192 * Doc: add :ref:`sync-remote-appdir` cookbook recipe.
193 * Testsuite: add *completion* testsuite to validate shell Tab completion of
194 this project. This testsuite can be invoked with ``make testcompletion`` or
195 ``script/mt comp``. It drives a real bash, zsh, fish or tcsh session
196 through `Expect <http://expect.sourceforge.net/>`_ to press the Tab key
197 against the built shell completion script and check the resulting
198 candidate list.
199 * Init: fix numerous inconsistencies between ``module help``'s usage message
200 and the option flags and positional arguments each sub-command actually
201 accepts, and between that usage message and what bash, fish, tcsh and zsh
202 Tab completion offer for each sub-command. Guarded against regressing with
203 a new ground-truth check in the *completion* testsuite that compares
204 ``module``/``ml`` Tab completion against the sub-commands, switches,
205 options and argument kinds parsed straight out of ``module help``.
206 * Init: no longer offer the legacy :subcmd:`initadd`, :subcmd:`initclear`,
207 :subcmd:`initlist`, :subcmd:`initprepend` and :subcmd:`initrm`
208 sub-commands as Tab completion candidates (bash, fish, tcsh, zsh), since
209 ``module help`` does not document them.
210 * Testsuite: add *cookbook* testsuite to validate the recipes documented
211 under :ref:`cookbook`. This testsuite can be invoked with ``make
212 testcookbook`` or ``script/mt cook``. It builds a sandboxed fixture
213 from the exact files a recipe ships under :file:`doc/example/`, then runs
214 the commands demonstrated in the recipe's ``Usage example`` documentation
215 in order and checks that similar output is obtained. Currently covers the
216 :ref:`sync-remote-appdir` recipe.
217 * Doc: add :ref:`modulepath-ignore` design notes.
218 * Add :mfcmd:`modulepath-ignore` modulefile command to define, from rc
219 files, gitignore-style patterns describing modulepath content to ignore
220 when searching for modulefiles. Ignored files and directories are handled
221 as if they do not exist: they are not checked, not walked down, not
222 reported and not recorded in modulepath cache file. Add
223 :mconfig:`modulepath_ignore` configuration option and
224 :option:`--no-modulepath-ignore` command line switch to control whether
225 pattern definitions are applied. (fix issue #562)
226 * Install: add the :instopt:`--with-pythondir` installation option to
227 define the directory where to install the ``env_modules`` Python module.
228 It enables for instance to install :file:`env_modules.py` with the other
229 Python modules available on the system. When this option is set,
230 :instopt:`--enable-set-pythonpath` adds this directory to
231 :envvar:`PYTHONPATH` instead of the Modules ``init`` directory. (fix issue
232 #643)
233 * Introduce :mconfig:`ignore_cache_subcmds` configuration option that
234 defines a list of module sub-commands on which module cache files are
235 ignored. It is useful when cache files are large: a sub-command targeting
236 specific modules (like :subcmd:`load`) may find them faster by walking
237 through modulepath directories than by evaluating whole cache files. When
238 :mconfig:`ignore_cache_subcmds` is changed with :subcmd:`config`
239 sub-command, it sets the :envvar:`MODULES_IGNORE_CACHE_SUBCMDS`
240 environment variable. (fix issue #563)
241 * Protect the creation of the Tcl sub-interpreters used to evaluate modulercs
242 and modulefiles with the quarantine mechanism. Environment variables listed
243 in the :mconfig:`run_quarantine` configuration option are unset or set to
244 the value of their corresponding :envvar:`MODULES_RUNENV_\<VAR\>` variable
245 during this creation step, then restored to their original value. (fix
246 issue #623)
247 * Doc: adopt the Linux kernel policy on :ref:`ai-coding-assistants` in
248 :ref:`CONTRIBUTING`: AI agents must never add their own ``Signed-off-by:``
249 trailer and their involvement must be disclosed with an ``Assisted-by:``
250 trailer.
251 * Doc: add the :ref:`user-guide` document that explains a selection of
252 useful but lesser known features through practical examples and common
253 use cases.
254 * Init: fix command injection in Bash completion when module names contain
255 shell meta-characters. Completion candidates were passed to ``compgen -W``
256 which evaluates command substitution syntax. (fix `CVE-2026-85013`_ found
257 by AISLE in partnership with Red Hat)
258 * Accept abbreviated upper bounds in version ranges such as ``@3.20:3`` to
259 select versions starting at ``3.20`` within major version ``3``. (fix issue
260 #698)
261 * Fix resolution of relative path entries in :envvar:`MODULEPATH` when a
262 module is loaded during a modulefile evaluation. Such entry was resolved
263 against the directory of the evaluating modulefile rather than against the
264 current working directory. A relative *directory* argument of the
265 :mfcmd:`is-used` modulefile command or of the :subcmd:`unuse` sub-command
266 is also resolved against the current working directory to recognize such
267 entry whatever its form.
268 * Keep non-sticky requirements of sticky modules loaded during a
269 :subcmd:`purge` and explicitly report why their unload is skipped according
270 to the :mconfig:`sticky_purge` configuration. (fix issue #582)
271 * Fix internal error raised by :subcmd:`switch` sub-command when the unload
272 of the switched-off module fails after some of its dependent modules were
273 unloaded for reload, and switch sequence continues as ``switch_unload`` is
274 not set in :mconfig:`abort_on_error`. Dependent modules restored by the
275 failed unload are not reloaded anymore.
276
277 .. _CVE-2026-85013: https://github.com/envmodules/modules/security/advisories/GHSA-8hrw-p88g-qhmg
278
279
280 .. _5.6 release notes:
281
282 Modules 5.6.2 (2026-09-07)
283 --------------------------
284
285 * Init: fix command injection in Bash completion when module names contain
286 shell meta-characters. Completion candidates were passed to ``compgen -W``
287 which evaluates command substitution syntax. (fix `CVE-2026-85013`_ found
288 by AISLE in partnership with Red Hat)
289
290
291 Modules 5.6.1 (2025-11-25)
292 --------------------------
293
294 * Script: improve :command:`mrel` to better support Koji states and not rely
295 on sudo privileges to test a new release.
296 * Script: adapt utilities to only use :command:`curl` rather also requiring
297 :command:`wget`.
298 * Doc: :ref:`CHARTER` has been approved on September 4, 2025.
299 * Doc: add :ref:`EESSI` design notes.
300 * Doc: update :ref:`modulefile(5)` man page to describe the :mfcmd:`report`
301 modulefile command, which is supported since version 4.0.
302 * Doc: use `Furo`_ Sphinx theme for the documentation published on Read The
303 Docs.
304 * Doc: describe how to call modulefile command from a hook procedure in
305 :ref:`module(1)` man page. (fix issue #590)
306 * Doc: add warning in :ref:`INSTALL-win` to mention :command:`ml` command name
307 conflict with *MSVC x86 toolchain* ``ml.exe``. (fix issue #589)
308 * Doc: add :ref:`maintainer-guide`.
309 * Doc: website is now located at https://envmodules.io.
310 * Doc: precise that no automatic path resolution is performed on
311 :mfcmd:`prepend-path`, :mfcmd:`append-path` or :mfcmd:`remove-path`
312 modulefile commands. (fix issue #597)
313 * Doc: add way to build latexpdf documentation.
314 * Ensure that a module having the same name than a loaded module from
315 another modulepath does not inherit its tags. (fix issue #599)
316 * Drop tags stored in memory that applies to a module when unloading it. It
317 ensures that tags applied to the module when reloaded from a different
318 modulepath are not inherited.
319 * Always apply *abort on error* behavior in case a Dependent Reload sticky
320 (and :option:`--force` is not set) or super-sticky module fails to reload.
321 (fix issue #601)
322 * When loading a module, check already loaded modules and their aliases
323 exactly matching specification before looking at available modules and their
324 aliases. (fix issue #602)
325
326 .. _Furo: https://github.com/pradyunsg/furo
327
328
329 Modules 5.6.0 (2025-07-31)
330 --------------------------
331
332 * Rename :file:`contrib` directory as :file:`share` in sources to use clearer
333 name for architecture and configuration independent files.
334 * Set a `Security policy`_ for the project.
335 * Add red, white and black SVG logo files of Modules project.
336 * Doc: improve Links, Community sections in documentation index and README
337 * Doc: improve Authors and Acknowledgments sections in README
338 * Doc: add :ref:`create-new-release` guide
339 * Update repository URL to https://github.com/envmodules/modules.
340 * Install: update :file:`configure` script to allow running it from a current
341 working directory different than where this file is stored. (fix issue #558)
342 * Doc: create *Developer HowTos* section on documentation website to group
343 development how-to guides.
344 * Doc: add :ref:`acknowledgments` page in the documentation.
345 * Doc: describe :ref:`GOVERNANCE`.
346 * Doc: add :ref:`CHARTER`.
347 * Escape square brackets (``[]``) used in values within produced shell code as
348 these characters may have special meaning on some shells (like *csh*). (fix
349 issue #565)
350 * Doc: advertise the `Modules chat room`_ (``#modules:matrix.org``) to discuss
351 with the community.
352 * Doc: describe the :ref:`developer-certificate-of-origin` process now applied
353 on contributions.
354 * Doc: add :ref:`add-new-maintainer` guide
355 * Fix interpreter variable reset between multiple modulefile or modulerc
356 evaluations when variable initial value is an invalid list. (fix issue #570)
357 * Fix :mfcmd:`source-sh` and :subcmd:`sh-to-mod` shell translation when used
358 with new *fish* shell version (4.0).
359 * Doc: add :ref:`mode-select` design notes.
360 * Introduce ``use`` extra specifier to search for :envvar:`MODULEPATH` changes
361 performed with :mfcmd:`module use<module>`, :mfcmd:`append-path` or
362 :mfcmd:`prepend-path` modulefile commands on :subcmd:`avail`,
363 :subcmd:`whatis` and :subcmd:`paths` sub-commands.
364 * Add :option:`--dumpname` option to report name of current Environment
365 Modules implementation. Here it returns ``Modules``. This option is also
366 available on Lmod starting version 8.7.50.
367 * Add the :mfcmd:`depends-on-any` modulefile command, alias over the
368 :mfcmd:`prereq` command for compatibility with Lmod Tcl modulefiles.
369 * Add ``depends-on-any`` extra specifier to query modulefile requirement
370 definitions. The extra specifier aliases ``prereq``, ``prereq-any`` or
371 ``require`` may also be used to query this modulefile command.
372 * Introduce the :subcmd:`spider` sub-command that lists available modules
373 found in enabled modulepaths and recursively found in modulepaths enabled by
374 available modules. After a first step aimed at collecting all modulepaths,
375 :subcmd:`spider` proceeds and reports like :subcmd:`avail` sub-command. The
376 same set of options are supported.
377 * Introduce the :mconfig:`spider_output` and :mconfig:`spider_terse_output`
378 configuration options to define the content to report in addition to the
379 available module names respectively for :subcmd:`spider` sub-command regular
380 and terse output modes. Excepted value for these configuration options is a
381 colon separated list of elements to report. Default value is
382 ``modulepath:alias:dirwsym:sym:tag:variantifspec:key`` for
383 :mconfig:`spider_output` and
384 ``modulepath:alias:dirwsym:sym:tag:variantifspec`` for
385 :mconfig:`spider_terse_output`. These values can be changed at installation
386 time respectively with the :instopt:`--with-spider-output` and
387 :instopt:`--with-spider-terse-output` options. These values can then be
388 superseded by using the :subcmd:`config` sub-command which sets the
389 :envvar:`MODULES_SPIDER_OUTPUT` and :envvar:`MODULES_SPIDER_TERSE_OUTPUT`
390 environment variables.
391 * Introduce the ability to control whether :subcmd:`spider` command search
392 results should recursively include or not modulefiles from directories
393 matching search query by use of the :option:`--indepth` and
394 :option:`--no-indepth` command-line switches or :mconfig:`spider_indepth`
395 configuration option (that sets :envvar:`MODULES_SPIDER_INDEPTH` environment
396 variable through :subcmd:`config` command). Default value (enabled) may also
397 be changed at installation time with
398 :instopt:`--disable-spider-indepth<--enable-spider-indepth>` option.
399 * Doc: add :ref:`spider-sub-command` design notes.
400 * The :subcmd:`lint` sub-command now also lint any readable modulecache files
401 when no modulefile specification is passed as argument or if
402 :file:`.modulecache` file location is specifically passed as argument.
403 * Add the ``hidden`` element in the allowed value list of the
404 :mconfig:`avail_output`, :mconfig:`avail_terse_output`,
405 :mconfig:`list_output`, :mconfig:`list_terse_output`,
406 :mconfig:`spider_output` and :mconfig:`spider_terse_output` configuration
407 options. When set, it is equivalent to use :option:`--all` option: hidden
408 modules are shown.
409 * Produce a single output for multi pattern :subcmd:`avail` search rather than
410 a separate output for each submitted pattern.
411 * Produce a single output for multi pattern :subcmd:`whatis` search rather
412 than a separate output for each submitted pattern.
413 * Doc: clarify that character used in version specification like *,* and *:*
414 cannot be used as variant shortcut.
415 * Introduce :envvar:`__MODULES_LMUSE` environment variable to keep track of
416 the loaded modules that enable modulepaths.
417 * Apply modulepath label defined with :mfcmd:`modulepath-label` also on output
418 of :subcmd:`whatis` and :subcmd:`search` sub-commands.
419 * Report *via* information for each module entry on JSON output of
420 :subcmd:`avail` and :subcmd:`spider` sub-commands. *Via* information is the
421 name of the loaded or interpreted module that enables the modulepath in
422 which reported modules are stored.
423 * Add the ``via`` element in the allowed value list of the
424 :mconfig:`avail_output` and :mconfig:`spider_output` configuration options.
425 When set, if a modulepath is enabled by a module, this module name is
426 reported next to the modulepath name. ``via`` element is not available for
427 terse output mode. ``via`` is set by default in :mconfig:`spider_output`
428 configuration option.
429 * Add ``modules_release`` internal state. It will help to know the current
430 version of Modules within :file:`siteconfig.tcl` script.
431 * Introduce :mfcmd:`module-help` modulefile command which defines help text to
432 print when modulefile is evaluated in ``help`` mode.
433 * Update :mfcmd:`add-property` modulefile command to use its *value* argument
434 to define tag on currently loading module.
435 * Doc: add :ref:`module-warn` design notes.
436 * Add :mfcmd:`module-warn` modulerc and modulefile command which prints a
437 warning message when designated modulefile is evaluated. This command
438 accepts options to emit the warning only for specific users, groups or
439 times.
440 * Introduce the ``warning`` informational :ref:`module tag<Module tags>` on
441 modulefiles targeted by :mfcmd:`module-warn` command. Update default
442 :mconfig:`tag_abbrev` configuration option to add an abbreviation for the
443 new tag (``W``) and default light and dark color palettes.
444 * Change light and dark color palettes for ``nearly-forbidden`` tag (red text
445 with yellow background), to make it look closer to ``forbidden`` tag (red
446 background) and distinguish it from new ``warning`` tag (black text and
447 yellow background).
448 * No raise of *nearly-forbidden* warning when affected modulefile is evaluated
449 in ``refresh`` mode.
450 * Issue the *nearly-forbidden* warning at the end of the affected modulefile
451 evaluation, ensuring it is always reported at the same stage regardless of
452 where it is defined.
453 * Change underlying shell code to set environment variable on *sh*, *bash*,
454 *ksh*, *zsh* and *fish* shells: enclose value within single quotes rather
455 escaping each special characters.
456 * :mfcmd:`setenv` modulefile command now supports environment variable value
457 containing newline character. Exception is made for *csh* and *tcsh* shells
458 where newline characters are chopped from value. (fix issue #557)
459 * Sort modules in JSON output as done on regular output.
460 * :subcmd:`cachebuild` command now sets the minimal Modules version specified
461 in the cache file magic cookie header to the oldest Modules version
462 compatible with this cache file, rather than the version that generated the
463 cache file. Freshly generated cache files are compatible with Modules 5.3
464 and above.
465 * Doc: improve :ref:`enable-modules-in-shells` guidelines.
466 * Doc: add :ref:`man-path` cookbook recipe.
467 * Doc: add :ref:`other-implementations` document.
468 * Add :subcmd:`update` sub-command, an alias of :subcmd:`reload`
469 * Add :subcmd:`disable` sub-command, an alias of :subcmd:`saverm`
470 * Add :subcmd:`describe` sub-command, an alias of :subcmd:`saveshow`
471 * Add ``--show_hidden`` option, an alias of :option:`--all`
472 * Add :mfcmd:`haveDynamicMPATH` modulefile command
473 * Fix ``use.own`` example modulefile to report when creating local modulefiles
474 directory. (fix issue #576)
475 * Doc: add manual page for :ref:`envml(1)` command. (fix issue #190)
476 * Introduce Emacs addon files to highlight the modulefile syntax. Installation
477 of these files, which is enabled by default, is controlled by the
478 :instopt:`--enable-emacs-addons` and :instopt:`--emacsdatadir` configure
479 options. (contribution from Laurent Besson)
480 * Add :mconfig:`require_via` configuration option that controls whether or not
481 a requirement is considered between a module stored in a modulepath and the
482 loaded module that enables this modulepath. With :ref:`Automated module
483 handling mechanisms<MODULES_AUTO_HANDLING>` enabled, modules stored in a
484 modulepath are unloaded or reloaded when the module enabling this modulepath
485 is changed. :mconfig:`require_via` is disabled by default but everyone
486 willing to hierarchically organize their modulefiles is encouraged to enable
487 this new option. This option can be changed at installation time with
488 :instopt:`--enable-require-via`. When :mconfig:`require_via` is changed with
489 :subcmd:`config` sub-command, it sets the :envvar:`MODULES_REQUIRE_VIA`
490 environment variable.
491 * Install: installation option :instopt:`--enable-new-features` is updated to
492 include :instopt:`--enable-require-via`.
493 * Doc: add :ref:`require-via` design notes.
494 * Skip reload of a *Dependent Reload* module if it is not found after a change
495 in enabled modulepaths. Reload of a not found module is attempted only if it
496 is tagged *super-sticky* or *sticky* and force mode is disabled. Skipped
497 module is considered *Dependent Unload* module.
498 * Script: update :command:`mb` tool to skip test for Modules version below 5.5
499 if Tcl 9 is selected.
500 * Introduce the :mfcmd:`provide` modulefile command that defines module alias
501 over currently evaluating module. This helps convey that the module offers
502 additional functionality or components. (fix issue #539)
503 * Change :mfcmd:`extensions` modulefile command to be an alias over the
504 :mfcmd:`provide` command.
505 * Add the ``provided-alias`` element in the allowed value list of the
506 :mconfig:`avail_output`, :mconfig:`avail_terse_output`,
507 :mconfig:`spider_output` and :mconfig:`spider_terse_output` configuration
508 options. When set, module aliases are included into the output and the
509 *extra match search* mechanism is activated to scan modulefiles to get the
510 module aliases they define.
511 * Doc: add :ref:`provide` design notes.
512 * Introduce ``provide`` and ``provided-alias`` extra specifiers to search
513 modules on :subcmd:`avail`, :subcmd:`spider`, :subcmd:`whatis` and
514 :subcmd:`paths` sub-commands. ``provided-alias`` extra specifier is an alias
515 onto ``provide`` and ``family`` extra specifiers.
516
517 .. _Security policy: https://github.com/envmodules/modules/blob/main/SECURITY.md
518 .. _Modules chat room: https://matrix.to/#/#modules:matrix.org
519
520
521 .. _5.5 release notes:
522
523 Modules 5.5.0 (2024-11-11)
524 --------------------------
525
526 * Init: update ``cmd`` shell initialization script to correctly define
527 :envvar:`MODULESHOME` when installation pathname contains dot character.
528 (fix issue #525 with contribution from V-clone)
529 * Init: add completion for :command:`ml` command on Tcsh shell. (fix issue
530 #416 with contribution from Laurent Besson)
531 * Init: fix completion of :subcmd:`mod-to-sh`'s options on Bash and Tcsh
532 shells.
533 * Fix modulepath file search when libtclenvmodules is disabled and modulepath
534 contains glob characters.
535 * Lib: correct libtclenvmodules to retrieve all user groups on Darwin systems
536 when user is member of more than 16 groups.
537 * Script: output testsuite run progress on :command:`mt` development utility.
538 * Resolve switched-on module prior testing stickiness preservation.
539 * Contrib: fix versions modulefiles generated when
540 :instopt:`--enable-versioning` installation option is set. Use ``--not-req``
541 option on :mfcmd:`module unload<module>` commands to avoid declaring a
542 conflict toward these modules to unload. (fix issue #531)
543 * Add :mfcmd:`hide-modulefile` and :mfcmd:`hide-version` modulerc commands to
544 support modulerc files written for Lmod.
545 * Update :subcmd:`autoinit` sub-command to define :command:`mogui` shell
546 function or alias if `mogui-cmd` command is found in :envvar:`PATH`.
547 * Add the :mconfig:`hide_auto_loaded` configuration option to tag
548 automatically loaded modules ``hidden-loaded``. These modules will not
549 appear on :subcmd:`list` sub-command output unless :option:`--all` option is
550 set. Option is disabled by default and when set, it defines the
551 :envvar:`MODULES_HIDE_AUTO_LOADED` environment variable.
552 * Introduce the ``--modulepath`` option to the :mfcmd:`always-load`,
553 :mfcmd:`depends-on`, :mfcmd:`prereq`, :mfcmd:`prereq-all` and
554 :mfcmd:`prereq-any` modulefile commands. When this option is set, required
555 module should be located in a path listed in the specified list or in an
556 enabled modulepath matching one path of the list. This information is
557 recorded in loaded environment in :envvar:`__MODULES_LMPREREQPATH` variable.
558 * Add :mfcmd:`lsb-release` modulefile command to get certain Linux Standard
559 Base (LSB) information. It accepts to following sub-commands: ``id``,
560 ``codename`` and ``release``.
561 * Add information logging capabilities controlled by two new configuration
562 options: :mconfig:`logger` which defines the command to use to sent
563 information to the log system and :mconfig:`logged_events` which controls
564 the information sent to logs.
565 * :mconfig:`logger` configuration option relies on the :command:`logger`
566 command by default. It can be changed at installation time with
567 :instopt:`--with-logger` and :instopt:`--with-logger-opts` options. When
568 :mconfig:`logger` is changed with :subcmd:`config` sub-command, it sets the
569 :envvar:`MODULES_LOGGER` environment variable. :mconfig:`logger` can be
570 declared as a locked configuration option in :mconfig:`locked_configs`.
571 * :mconfig:`logged_events` configuration option is a list of event names
572 separated by colon character. It is empty by default, thus nothing is logged
573 by default. Allowed event names are ``requested_cmd`` (log module commands
574 directly executed by users), ``requested_eval`` (modulefile evaluations
575 directly asked by users) and ``auto_eval`` (modulefile evaluations
576 automatically triggered). Option value can be changed at installation time
577 with :instopt:`--with-logged-events` option. When :mconfig:`logged_events`
578 is changed with :subcmd:`config` sub-command, it sets the
579 :envvar:`MODULES_LOGGED_EVENTS` environment variable.
580 :mconfig:`logged_events` can be declared as a locked configuration option in
581 :mconfig:`locked_configs`.
582 * Add ``log`` channel to the :mfcmd:`puts` modulefile command. String message
583 passed to :mfcmd:`puts log<puts>` is sent to the :mconfig:`logger` command.
584 * Doc: update :ref:`log-module-command` cookbook recipe with integrated
585 logging feature.
586 * Install: update :file:`configure` script to ignore all ``--with-*`` options
587 if no value is associated to them.
588 * Install: update :file:`configure` script to set option to an empty string if
589 specified with ``--without-*`` argument. Exception is made for
590 :instopt:`--without-icase<--with-icase>` which sets option to the ``never``
591 value.
592 * Introduce ``not:`` prefix for extra specifier and variant criteria on module
593 search context. This prefix allows to negate search criteria on :ref:`Extra
594 match search` mechanism.
595 * Adopt stricter naming rule for variant names. Only characters within the
596 ``A-Za-z0-9_-`` range are allowed. Also, a variant name cannot start with
597 ``-`` (minus) character and the overall name cannot just be a number.
598 * Allow ``+`` and ``~`` characters to be part of module name or version
599 specification as long as the string following them is not a valid variant
600 name (e.g., ``foo/1.2+8``). (fix issue #527)
601 * In case of an issue external to Modules, do not mention at the end of the
602 error stack trace the web link to report this issue. (fix issue #546)
603 * When a modulefile performs a :mfcmd:`module unload<module>` command that
604 fails due to dependent modules loaded, stop unload evaluation right after
605 this failed command unless :option:`--force` option is used.
606 * Exclude sticky modules from the useless requirement unload mechanism as they
607 cannot be unloaded.
608 * Tag automatically loaded module ``auto-loaded`` prior evaluation to be able
609 to query this state during modulefile evaluation with :mfcmd:`module-info
610 tags<module-info>`.
611 * Doc: describe in :ref:`module(1)` man page how to initialize Modules in a
612 Ruby script. (fix issue #535)
613 * Add PowerShell Core (``pwsh``) shell support. (fix issue #326 with
614 contribution from Simon Lukas Märtens)
615 * Lib: adapt Modules Tcl extension library to properly load on Tcl 9.
616 * Doc: describe how to upgrade Modules in :ref:`INSTALL`. (fix issue #544)
617 * Set exit code returned by :file:`modulecmd.tcl` script to ``1`` when a
618 modulefile evaluation fails (modulefile does not exist, is buggy, etc).
619 (fix issue #540)
620 * Disable pager when running :file:`modulecmd.tcl` script for script language
621 (*python*, *perl*, *ruby*, *tcl*, *cmake*, *r* and *lisp*). (fix issue #542)
622 * Update error and warning messages when attempting to unload a module
623 required by another. Distinguish if this module is a requirement of an
624 already loaded or a currently loading module.
625 * Introduce :mconfig:`conflict_unload` configuration option that controls
626 whether or not conflicting modules and their dependent should be unloaded
627 when loading a module. All kind of conflicts are supported: conflicts
628 defined by already loaded modules, conflict declared by loading module
629 through :mfcmd:`conflict`, :mfcmd:`family` or :mfcmd:`module unload<module>`
630 commands. :mconfig:`conflict_unload` also handles the unload of a module
631 that is loaded again but with different variant values or from a different
632 modulepath. :mconfig:`conflict_unload` is disabled by default as it changes
633 behaviors of the :envvar:`automated module handling
634 mode<MODULES_AUTO_HANDLING>`. But everyone is encouraged to enable this new
635 option to benefit from an highly automated experience. This option can be
636 changed at installation time with :instopt:`--enable-conflict-unload`. When
637 :mconfig:`conflict_unload` is changed with :subcmd:`config` sub-command, it
638 sets the :envvar:`MODULES_CONFLICT_UNLOAD` environment variable. Both
639 :mconfig:`auto_handling` and :mconfig:`conflict_unload` options should be
640 enabled to activate *Conflict Unload* automated behavior. (fix issue #242)
641 * When both :mconfig:`auto_handling` and :mconfig:`conflict_unload` options
642 are enabled, all loaded modules matching module specifications set on
643 :mfcmd:`conflict` or :mfcmd:`module unload<module>` commands are unloaded.
644 If both options are not enabled, only one matching loaded module per
645 specification argument of :mfcmd:`module unload<module>` is unloaded. (fix
646 issue #215)
647 * When both :mconfig:`auto_handling` and :mconfig:`conflict_unload` options
648 are enabled, :option:`--force` option set on :subcmd:`load` sub-command is
649 taken into account during the *Conflict Unload* mechanism. For instance, it
650 continues this unload process even if one module unload fails.
651 * Install: installation option :instopt:`--enable-new-features` is updated to
652 include :instopt:`--enable-conflict-unload`.
653 * Fix detection of already loaded module with variant set. If trying to load
654 same module with compatible variant set, a *module is already loaded*
655 message is now returned instead of *another variant is loaded*.
656 * Correctly report module evaluation error in case during the same execution
657 this module was already evaluated and failed silently during a *Requirement
658 Load* mechanism.
659 * Split processing of *Dependent Reload* (DepRe) modules to treat the *DepRe*
660 modules consequence of *Useless Requirement Unload* (UReqUn) modules
661 separately, right before unloading the *UReqUn* modules. As a result,
662 modules in conflict with *UReqUn* modules are unloaded right before *UReqUn*
663 process and reloaded with the other *DepRe* modules.
664 * Handle *UReqUn* process in case of :subcmd:`switch` sub-command after the
665 switch load phase. Unload of these modules were previously occurring at the
666 end of the switch unload phase. Unload of *DepRe* modules consequence of
667 *UReqUn* modules is also moved after switch load phase.
668 * Introduce the *Useless Requirement Unload* (UReqUn) process on
669 :subcmd:`load` sub-command. It eliminates auto loaded modules that were
670 requirements of *Conflict Unload* modules. In case of :subcmd:`switch`
671 sub-command, *UReqUn* modules coming from the switch load phase are handled
672 with *UReqUn* modules coming from switch unload phase.
673 * Rework handling of *DepRe* modules that also are *UReqUn* modules to unload
674 them during the *DepRe* unload phase instead of during *UReqUn* process. As
675 a consequence these modules part of both *DepRe* and *UReqUn* lists are
676 unloaded prior main module action and prior unload of the other *UReqUn*
677 modules. The *DepRe* modules may be also qualified *UReqUn* even if they are
678 not a dependency of a module unloaded in the current processing.
679 * Mix unload of *Dependent Unload* and *Dependent Reload* modules to ensure
680 they are processed in their reverse loading order. As a result, if a module
681 is part of *DepUn* process and some of its requirements are part of *DepRe*
682 process, requirements are unloaded after their dependent modules.
683 * Skip reload of a *Dependent Reload* module if found not loadable (either its
684 requirements are not loaded or a conflict is spotted with loaded
685 environment). Reload is attempted only if module is tagged *super-sticky* or
686 *sticky* and force mode is disabled. Skipped module is considered *Dependent
687 Unload* module.
688 * Reload all Dependent Reload modules after the main load, unload or switch
689 module evaluation rather after the sub module evaluation that triggered the
690 Dependent Reload unload phase.
691 * Dependent Unload modules of Conflict Unload modules are merged into the
692 Dependent Reload module list. An attempt to reload these dependent modules
693 is tried only if their requirements are satisfied by loaded environment.
694 * When a loading module requires a Dependent Unload module, the unload of this
695 module was forced when it was triggered by a Conflict Unload or a
696 switched-off module. The unload of such Dependent Unload module is not
697 forced anymore by default and an error is raised if a loading module
698 requiring the Dependent Unload module is detected.
699 * When unloading Dependent Reload modules, do not force by default this unload
700 unless asked with :option:`--force` option. As a result an error is obtained
701 when trying to reload Dependent Reload modules that conflict with other
702 loaded modules. This error may be by-passed with :option:`--force`
703 command-line option.
704 * Move stickiness check when unloading a module prior processing any automated
705 module handling mechanism. (fix issue #536)
706
707 .. warning:: Variant names are now fully checked instead of just verifying
708 their first character. Only characters within the ``A-Za-z0-9_-`` range are
709 allowed. Variant name cannot start with ``-`` character and the overall
710 name cannot just be a number.
711
712 .. warning:: Existing *versions* modulefiles generated by
713 :instopt:`--enable-versioning` installation option and installed for
714 Modules 4.7 and upward should be manually fixed by adding the ``--not-req``
715 option to the :mfcmd:`module unload<module>` commands present in these
716 modulefiles. Following command should fix these files: ``sed -i "s|module
717 unload|module unload --not-req|" <version_modulefile>``.
718
719
720 .. _5.4 release notes:
721
722 Modules 5.4.0 (2024-02-20)
723 --------------------------
724
725 * Allow to designate module by its full path file name on :mfcmd:`module-tag`,
726 :mfcmd:`module-hide` and :mfcmd:`module-forbid`. (fix issue #485)
727 * Introduce ``tag`` extra specifier to search modules on :subcmd:`avail`,
728 :subcmd:`whatis` and :subcmd:`paths` sub-commands based on tags applied.
729 Tag abbreviation may also be used as extra specifier name.
730 * Add ability to specify multiple names on one extra specifier criterion to
731 select modules matching any of these names (e.g.,
732 ``env:PATH,LD_LIBRARY_PATH``)
733 * Add ability to specify multiple values on one variant criterion to select
734 modules providing any of these variant values (e.g., ``foo=val1,val2``)
735 * Add the ``indesym`` element in the allowed value list of the
736 :mconfig:`list_output` and :mconfig:`list_terse_output` configuration
737 options. When set, symbolic versions are reported as independent elements
738 rather along the loaded module they are attached to.
739 * Add the ``alias`` element in the allowed value list of the
740 :mconfig:`list_output` and :mconfig:`list_terse_output` configuration
741 options. When set, module aliases targeting loaded modules are reported.
742 * Introduce :mconfig:`sticky_purge` configuration option to define behavior
743 when unloading sticky or super-sticky module during a :subcmd:`purge`
744 command. Raise an ``error`` (default) or emit a ``warning`` or be
745 ``silent``. When set, it defines the :envvar:`MODULES_STICKY_PURGE`
746 environment variable. Default value can be changed with
747 :instopt:`--with-sticky-purge` installation option. (fix issue #502)
748 * Introduce :mfcmd:`modulepath-label` modulerc command, which defines label
749 used instead of modulepath directory path in :subcmd:`avail` output.
750 * More than one global rc file can now be specified in :envvar:`MODULERCFILE`
751 or via :mconfig:`rcfile` configuration option.
752 * Add the :mconfig:`unique_name_loaded` configuration option to allow, when
753 enabled, only one module loaded per module name. When set, it defines the
754 :envvar:`MODULES_UNIQUE_NAME_LOADED` environment variable. Default value
755 (disabled) can be changed with :instopt:`--enable-unique-name-loaded`
756 installation option.
757 * Add :ref:`evaluation-errors` design notes.
758 * Add :mconfig:`abort_on_error` configuration option to define module
759 sub-commands that should abort when a module evaluation fails instead of
760 continuing their evaluation sequence. When configuration option is set, it
761 defines the :envvar:`MODULES_ABORT_ON_ERROR` environment variable. Default
762 value can be changed with :instopt:`--with-abort-on-error` installation
763 option.
764 * Add support for :mconfig:`abort_on_error` evaluation behavior on
765 :subcmd:`load`, :subcmd:`mod-to-sh` and :subcmd:`try-load` sub-commands.
766 * Report issue on modulefile when it fails to load an erroneous requirement
767 through :mfcmd:`module try-load<module>` modulefile command.
768 * Doc/Install: modernize modulefile code example in documentation and
769 installed example modulefiles.
770 * Vim: correctly highlight modulefile commands containing a dash character.
771 * Update requirement load error report to place it only under the message
772 block of the module requiring this load. This change helps to better
773 understand the chronology of actions and from where an error occurs.
774 * Do not report requirement load error when an alternative requirement module
775 is found and loaded afterward. (fix issue #509)
776 * Do not render an error exit code on multi-module option requirement when
777 one module option fails to load but another does. (fix issue #510)
778 * Do not report *module not found* error when loading a requirement if an
779 alternative requirement module is found and loaded afterward. (fix issue
780 #511)
781 * Add ``--glob`` option to :mfcmd:`remove-path` modulefile command in order to
782 remove any values in variable matching a glob-style pattern.
783 * Record module specification on which loaded module stickiness applies in
784 :envvar:`__MODULES_LMSTICKYRULE` environment variable. It helps to determine
785 if stickiness is satisfied when changing loaded modules. Which was not
786 working correctly for virtual modules. (fix issue #506)
787 * Silently ignore cache file when it requires a greater Modules version. (fix
788 issue #515)
789 * Doc: move :ref:`modulefile(5)` man page in section 5. (fix issue #518 with
790 contribution from Laurent Chardon)
791 * Add :mconfig:`source_cache` configuration option to cache files evaluated in
792 modulefiles with ``source`` Tcl command. Files sourced multiple times are
793 only read once when option is enabled. :mconfig:`source_cache` is disabled
794 by default. When set, it defines the :envvar:`MODULES_SOURCE_CACHE`
795 environment variable. Default value can be changed with
796 :instopt:`--enable-source-cache` installation option.
797 * Add support for :mconfig:`abort_on_error` evaluation behavior on
798 :subcmd:`unload` sub-command.
799 * A modulefile is unloaded anyway even if an evaluation error occurs when
800 :option:`--force` option is used on :command:`ml`, :subcmd:`purge`,
801 :subcmd:`reload`, :subcmd:`reset`, :subcmd:`restore`, :subcmd:`stash`,
802 :subcmd:`stashpop`, :subcmd:`switch` and :subcmd:`unload` sub-commands. To
803 forbid the unload of a modulefile it is recommended to tag it
804 ``super-sticky`` with :mfcmd:`module-tag` command.
805 * Disable :mconfig:`abort_on_error` when :option:`--force` option is used. In
806 this case, behavior is to continue when an error occurs.
807 * Add support for :mconfig:`abort_on_error` evaluation behavior on
808 :command:`ml` command. *Abort on error* behavior is on by default with
809 :command:`ml`. Removing it from :mconfig:`abort_on_error`'s value enables
810 the *continue on error* behavior.
811 * Add support for :mconfig:`abort_on_error` evaluation behavior on
812 :subcmd:`reload` command. *Abort on error* behavior is on by default with
813 :subcmd:`reload`. Removing it from :mconfig:`abort_on_error`'s value enables
814 the *continue on error* behavior.
815 * Add support for :mconfig:`abort_on_error` evaluation behavior on
816 :subcmd:`purge` sub-command.
817 * Add support for :mconfig:`abort_on_error` evaluation behavior on unload
818 phase of :subcmd:`switch` command. *Abort on error* behavior is on by
819 default there. Removing ``switch_unload`` from :mconfig:`abort_on_error`'s
820 value enables the *continue on error* behavior.
821 * Add support for :mconfig:`abort_on_error` evaluation behavior on
822 :subcmd:`switch` command. *Abort on error* behavior is applied if ``switch``
823 value is set in :mconfig:`abort_on_error` and either switch unload or switch
824 load phase fails.
825 * Install: installation option :instopt:`--enable-new-features` is updated to
826 enable *abort on error* behavior on :subcmd:`load` and :subcmd:`switch`
827 sub-commands.
828 * Lib: slightly adapt code of Modules Tcl extension library to properly build
829 against Tcl 9.0.
830 * Adapt alias unset shell code for *sh*-kind shells to avoid errors when alias
831 to unset is not defined.
832 * Adapt function unset shell code for *sh*-kind shells to avoid errors when
833 function to unset is not defined.
834 * No output of *unload of switched-off failed* and *load of switched-on
835 failed* error messages when :mfcmd:`module switch<module>` command is run
836 from a modulefile.
837 * No *Switching* block message report when :mfcmd:`module switch<module>`
838 command is run from a modulefile.
839 * Report all error and warning messages locally under *Loading* or *Unloading*
840 block message rather reporting some of them under the block message of the
841 main action. These errors and warnings are thus reported where they occur.
842 * Report switched-on load failure as error rather warning.
843 * Report switched-on module locating or access issues only once.
844 * Report conflict error message when it occurs rather than after modulefile
845 evaluation.
846 * Update conflict error message to report all conflicting modules name and
847 version rather conflict module specification.
848 * Fix conflict error check to avoid reporting both *unloading conflict failed*
849 and *conflict is loading* messages.
850 * Raise an error and stop modulefile evaluation when :mfcmd:`module
851 switch<module>` command fails unless if :option:`--force` option is set.
852 * When a *useless requirement unload* fails, do not increase error count as
853 this failure is reported as a warning and main unload process is not
854 affected.
855 * Path element equals to delimiter character is allowed on
856 :mfcmd:`append-path` and :mfcmd:`prepend-path` modulefile commands. (fix
857 issue #522)
858 * Add ``bash-eval`` shell mode to :mfcmd:`source-sh` modulefile command and
859 :subcmd:`sh-to-mod` sub-command. With this mode, the generated output of the
860 bash shell script is evaluated to get the environment changes instead of
861 sourcing this script. (fix issue #519)
862 * Add ``--ignore`` option to :mfcmd:`source-sh` modulefile command to define
863 shell elements changed by shell script that should be ignored. (fix issue
864 #503)
865 * Init: Improve Tcsh shell completion script to complete against existing
866 files when pattern starts with ``/``, ``.`` or ``~/``. (fix issue #523)
867 * Add ``--user`` option to :mfcmd:`module-forbid`, :mfcmd:`module-hide` and
868 :mfcmd:`module-tag` modulefile commands to forbid, hide or tag only if user
869 is listed in the value of this new option. (fix issue #520 with contribution
870 from Jérémy Déchard)
871 * Add ``--group`` option to :mfcmd:`module-forbid`, :mfcmd:`module-hide` and
872 :mfcmd:`module-tag` modulefile commands to forbid, hide or tag only if one
873 user's group is listed in the value of this new option. (fix issue #520 with
874 contribution from Jérémy Déchard)
875
876
877 .. _5.3 release notes:
878
879 Modules 5.3.2 (2026-09-07)
880 --------------------------
881
882 * Init: fix command injection in Bash completion when module names contain
883 shell meta-characters. Completion candidates were passed to ``compgen -W``
884 which evaluates command substitution syntax. (fix `CVE-2026-85013`_ found
885 by AISLE in partnership with Red Hat)
886
887
888 Modules 5.3.1 (2023-06-27)
889 --------------------------
890
891 * Fix additional `ShellCheck`_ warning reports over sh and bash shell scripts.
892 * Install: distribute ``ChangeLog`` as a zipped file to reduce installation
893 size. As a consequence, :command:`gzip` becomes a requirement when building
894 Modules from git repository.
895 * Install: adapt RPM spec file to install module initialization script for
896 fish as configuration snippet for this shell.
897 * Fix extra specifier search to evaluate module matching requirement query.
898 (fix issue #494)
899 * Fix extra specifier requirement search when module searched is also defining
900 a requirement and is the sole module to define it. (fix issue #495)
901 * Script: update :command:`pre-commit` and :command:`commit-msg` git hook
902 scripts to use `Hunspell`_ as spell checker instead of Aspell.
903 * Fix unaligned :subcmd:`list` output when 100 or more modules are loaded.
904 (fix issue #496)
905 * Fix extra specifier search when an identical module name and version is
906 available in several modulepaths. (fix issue #497)
907 * Do not match module commands with :mfcmd:`--not-req<module>` option set on
908 ``require`` or ``incompat`` extra specifier queries. (fix issue #498)
909 * When one variant is specified multiple times on search context
910 (:subcmd:`avail`, :subcmd:`paths` or :subcmd:`whatis` sub-commands),
911 available modules returned are those providing all variant values set. (fix
912 issue #499)
913 * Add the ``indesym`` element in the allowed value list of the
914 :mconfig:`avail_output` and :mconfig:`avail_terse_output` configuration
915 options. When set, symbolic versions are reported as independent elements
916 rather along the module or directory they are attached to.
917 * Init: fix completion scripts to report module symbolic versions and aliases
918 among available modules. (fix issue #500)
919
920 .. _Hunspell: https://hunspell.github.io/
921
922
923 Modules 5.3.0 (2023-05-14)
924 --------------------------
925
926 * Add :ref:`module-cache` design notes.
927 * Add :subcmd:`cachebuild` sub-command to create cache for modulepaths
928 enabled or specified on the command line. Cache files are named
929 ``.modulecache`` and stored at the root of modulepath directories.
930 * Add :subcmd:`cacheclear` sub-command to delete cache file in all enabled
931 modulepaths.
932 * Use cache file if available rather search the content of modulepath
933 directories when searching for modules (e.g., during :subcmd:`avail`,
934 :subcmd:`load`, :subcmd:`display`, etc).
935 * Script: add cache-enabled version of *avail*, *whatis* and *load* tests on
936 :command:`mb` benchmark utility.
937 * Add the :mconfig:`ignore_cache` configuration option to ignore module cache
938 file. Option is disabled by default and when set, it defines
939 :envvar:`MODULES_IGNORE_CACHE` environment variable.
940 * Add :option:`--ignore-cache` command-line switch to enable
941 :mconfig:`ignore_cache` configuration option and ignore module cache file
942 for current execution.
943 * Add :mconfig:`cache_buffer_bytes` configuration option to define buffer size
944 when reading or writing cache files. Option is set to ``32768`` by default.
945 When set it defines :envvar:`MODULES_CACHE_BUFFER_BYTES` environment
946 variable.
947 * Add :mconfig:`cache_expiry_secs` configuration option that defines the
948 number of seconds a cache file is considered valid after being generated.
949 Option is set to ``0`` by default which means cache files never expire. When
950 option is set it defines :envvar:`MODULES_CACHE_EXPIRY_SECS` environment
951 variable.
952 * Modulefiles and directories that are not accessible by everyone are not
953 recorded in cache file. A *limited access* directive is recorded instead to
954 indicate these modulefiles have to be tested and directories have to be
955 walked down to determine what the running user can access.
956 * Doc: update :ref:`reduce-io-load` cookbook recipe with module cache
957 description.
958 * Correctly apply extra tag set when loading a module whose variant has value
959 automatically set. (fix issue #484)
960 * Catch collection directory creation error and report appropriate message.
961 (fix issue #482)
962 * Fix :mfcmd:`source-sh` and :subcmd:`sh-to-mod` shell alias translation when
963 used with new *fish* shell version (3.6).
964 * Install: allow to build Modules from a short-depth git repository. (fix
965 issue #486)
966 * Install: ensure git log format is not influenced by user's configuration in
967 :command:`gitlog2changelog.py`. (fix issue #487)
968 * Init: fix bash shell completion script to be able to complete full name of
969 available modules. (fix issue #490)
970 * Install: move license name to SPDX format in RPM spec file.
971 * Doc: add :ref:`extra-match-search` design notes.
972 * Introduce *extra match search* mechanism that evaluates available
973 modulefiles during a module search to find those matching an extra query
974 on a variant value, a dependency or an environment variable definition.
975 During this specific evaluation, modulefiles are interpreted in *scan*
976 mode.
977 * ``scan`` string is returned by :mfcmd:`module-info mode<module-info>` when
978 queried during a *scan* modulefile evaluation.
979 * Add the ``variant`` element in the allowed value list of the
980 :mconfig:`avail_output` and :mconfig:`avail_terse_output` configuration
981 options. When set, variants and their possible values are reported along the
982 module they are associated to on :subcmd:`avail` command output. Adding
983 variant information to this output activates the *extra match search*
984 mechanism that scan modulefiles to find variants they define. (fix issue
985 #407)
986 * Apply graphic rendition of default version (``de`` SGR key) to default
987 variant value on either :subcmd:`list` and :subcmd:`avail` command output.
988 * Apply either loaded or auto-loaded graphic rendition to the loaded variant
989 value on :subcmd:`avail` command output.
990 * Update :subcmd:`avail`, :subcmd:`paths` and :subcmd:`whatis` sub-commands to
991 take into account variant set in module specification. Available modules are
992 filtered with *extra match search* mechanism to only return those matching
993 the variant specification.
994 * Update :subcmd:`avail`, :subcmd:`paths` and :subcmd:`whatis` sub-commands to
995 accept module specification with just a variant set (no module name and
996 version). Available modules are filtered with *extra match search* mechanism
997 to only return those matching the variant specification.
998 * Update :subcmd:`list` sub-command to accept module specification with just a
999 variant set (no module name and version). Loaded modules are filtered to
1000 only return those matching the variant specification.
1001 * Highlight searched variant name and value (``hi`` SGR key) on either
1002 :subcmd:`list` and :subcmd:`avail` command output.
1003 * Doc: add :ref:`Extra match search` description in :ref:`module(1)` man page.
1004 * Introduce *extra specifiers* to query content of modulefiles. *Extra
1005 specifiers* can be specified with *element:name* syntax as part of module
1006 specification on module search commands (:subcmd:`avail`, :subcmd:`paths`
1007 and :subcmd:`whatis`). For instance with the ``module avail
1008 append-path:PATH`` command, all modulefiles defining the ``append-path``
1009 command on ``PATH`` environment variable are returned.
1010 * Add ``variant`` extra specifier to query modulefile variant definitions.
1011 (fix issue #408)
1012 * Add ``setenv``, ``unsetenv``, ``append-path``, ``prepend-path``,
1013 ``remove-path`` and ``pushenv`` extra specifiers to query modulefile
1014 environment variable definitions. The extra specifier alias ``envvar`` may
1015 also be used to query any of these modulefile commands.
1016 * Add ``complete`` and ``uncomplete`` extra specifiers to query modulefile
1017 shell completion definitions.
1018 * Add ``set-alias`` and ``unset-alias`` extra specifiers to query modulefile
1019 shell alias definitions.
1020 * Add ``set-function`` and ``unset-function`` extra specifiers to query
1021 modulefile shell function definitions.
1022 * Add ``chdir`` extra specifier to query modulefile current working directory
1023 change definitions.
1024 * Add ``family`` extra specifier to query modulefile family definitions.
1025 * Add ``prereq``, ``prereq-any``, ``prereq-all``, ``depends-on``,
1026 ``always-load``, ``load``, ``load-any``, ``try-load``, ``switch`` and
1027 ``switch-on`` extra specifiers to query modulefile requirement definitions.
1028 The extra specifier alias ``require`` may also be used to query any of these
1029 modulefile commands.
1030 * Add ``conflict``, ``unload``, ``switch`` and ``switch-off`` extra specifiers
1031 to query modulefile incompatibility definitions. The extra specifier alias
1032 ``incompat`` may also be used to query any of these modulefile commands.
1033 * Requirement and incompatibility extra specifiers accept module specification
1034 as value.
1035 * Doc: add :ref:`Extra specifier` description in :ref:`module(1)` man page.
1036 * Mark loaded modules as qualified for refresh evaluation when they send
1037 content to ``stdout`` or ``prestdout`` channels with :mfcmd:`puts`
1038 modulefile command. (fix issue #488)
1039 * Add the :mconfig:`ignore_user_rc` configuration option to skip evaluation of
1040 user-specific module rc file. Option is disabled by default and when set, it
1041 defines :envvar:`MODULES_IGNORE_USER_RC` environment variable.
1042 * Add :option:`--ignore-user-rc` command-line switch to enable
1043 :mconfig:`ignore_user_rc` configuration option and ignore user-specific
1044 module rc file for current execution.
1045 * Add the ``variantifspec`` element in the allowed value list of the
1046 :mconfig:`avail_output` and :mconfig:`avail_terse_output` configuration
1047 options. Set this new element in the default value list of both options.
1048 When set and if a variant is specified in search query, variants and their
1049 possible values are reported along the module they are associated to on
1050 :subcmd:`avail` command output.
1051 * Accept value starting with ``+`` or ``-`` characters on
1052 :option:`--output`/:option:`-o` command-line switches to indicate value
1053 should respectively be appended to or subtracted from current configuration
1054 option value.
1055 * Accept value starting with ``+`` or ``-`` characters on
1056 :mconfig:`avail_output`, :mconfig:`avail_terse_output`,
1057 :mconfig:`list_output`, :mconfig:`list_terse_output`, :mconfig:`colors`,
1058 :mconfig:`protected_envvars`, :mconfig:`shells_with_ksh_fpath`,
1059 :mconfig:`tag_abbrev`, :mconfig:`tag_color_name`,
1060 :mconfig:`variant_shortcut` configuration options to indicate value
1061 should respectively be appended to or subtracted from current configuration
1062 option value.
1063 * Fix :subcmd:`switch` sub-command not to unload *sticky* module when
1064 switched-on module does not exist. (fix issue #492)
1065
1066
1067 .. _5.2 release notes:
1068
1069 Modules 5.2.0 (2022-11-08)
1070 --------------------------
1071
1072 * Introduce the ``--optional`` option on :mfcmd:`prereq`, :mfcmd:`prereq-all`,
1073 :mfcmd:`depends-on` and :mfcmd:`always-load` modulefile commands. Expressed
1074 optional dependency is considered satisfied even if modulefile is not
1075 loaded. If optional requirement is loaded afterward, dependent module is
1076 automatically reloaded, unless if the :mconfig:`auto_handling` configuration
1077 option is disabled.
1078 * A dependency expressed in modulefile with :mfcmd:`module try-load<module>`
1079 command is considered optional. Dependent module is automatically reloaded
1080 if the optional requirement is loaded afterward, unless if the
1081 :mconfig:`auto_handling` configuration option is disabled.
1082 * Raise error in case of unknown or misplaced option set on :mfcmd:`prereq`,
1083 :mfcmd:`prereq-all`, :mfcmd:`depends-on` or :mfcmd:`always-load` modulefile
1084 commands.
1085 * Add the :option:`--timer` command-line switch to report the total execution
1086 time of the :command:`module` command. Also report the execution time of
1087 every internal procedure calls when mixed with :option:`--debug` option.
1088 * Init: move :envvar:`PATH` setup (to locate Modules' binaries location) from
1089 shell initialization scripts to the :subcmd:`autoinit` sub-command. (fix
1090 issue #462)
1091 * Init: move :envvar:`MANPATH` setup (to locate Modules' man-pages) from
1092 shell initialization scripts to the :subcmd:`autoinit` sub-command. (fix
1093 issue #462)
1094 * Init: move shell completion setup from shell initialization scripts to the
1095 :subcmd:`autoinit` sub-command. (fix issue #462)
1096 * Enclose installation path references in shell code produced by
1097 :subcmd:`autoinit`, in initialization scripts and Makefiles to guaranty
1098 correct evaluation in case these paths contain a space character. Note that
1099 the quarantine mechanism is not compatible with such installation paths.
1100 * Fix :mfcmd:`source-sh` and :subcmd:`sh-to-mod` when used with *fish* shell
1101 script if ``regex-easyesc`` fish option is enabled. (fix issue #463)
1102 * Add the :mconfig:`protected_envvars` configuration option to define a list
1103 of environment variables that cannot be modified by modulefile commands.
1104 When set, :mconfig:`protected_envvars` defines
1105 :envvar:`MODULES_PROTECTED_ENVVARS` environment variable. (fix issue #429
1106 with contribution from Adrien Cotte)
1107 * Introduce the :subcmd:`lint` sub-command to statically analyze syntax of
1108 modulefiles, modulerc and global/user rc. (fix issue #451)
1109 * Add the :mconfig:`tcl_linter` configuration option to define the program
1110 used to analyze files with :subcmd:`lint` sub-command. This option is set to
1111 ``nagelfar.tcl`` by default. When changed from default value, the
1112 :envvar:`MODULES_TCL_LINTER` environment variable is defined. Default value
1113 can be changed with :instopt:`--with-tcl-linter` and
1114 :instopt:`--with-tcl-linter-opts` installation options.
1115 * Add the :instopt:`--enable-nagelfar-addons` installation option (enabled by
1116 default) to install specific syntax databases and plugins to lint
1117 modulefiles, modulerc and global/user rc with `Nagelfar`_. These files are
1118 installed in the directory designated by the :instopt:`--nagelfardatadir`
1119 (``DATAROOTDIR/nagelfar`` by default).
1120 * Doc: add :ref:`lint-sub-command` design notes.
1121 * Install: use :command:`install` command rather :command:`cp` or
1122 :command:`mkdir` to install Modules and guaranty consistent permission modes
1123 on deployed files.
1124 * Also unset :mfcmd:`pushenv` value stacks on :subcmd:`clear` sub-command.
1125 * Doc: add :ref:`mod-to-sh-sub-command` design notes.
1126 * Introduce the :subcmd:`mod-to-sh` sub-command to translate designated
1127 modulefile(s) into code for specified shell. (fix issue #447)
1128 * Make :subcmd:`source` sub-command accepts modulefile specification as
1129 argument. If argument does not correspond to a file path, search it among
1130 available modulefiles. (fix issue #424)
1131 * Doc: clarify :mfcmd:`set-alias` only define shell alias and not shell
1132 function.
1133 * Add the ability to filter the list of collections returned by
1134 :subcmd:`savelist` sub-command. Filtering pattern is matched in a case
1135 insensitive manner by default.
1136 * Add support for :option:`--starts-with` and :option:`--contains` options on
1137 :subcmd:`savelist` sub-command.
1138 * Highlight all search patterns on :subcmd:`list` sub-command output instead
1139 of only the first one..
1140 * Highlight all search patterns on :subcmd:`savelist` sub-command output.
1141 * Add support for :option:`--all` option on :subcmd:`savelist` sub-command not
1142 to limit result to the collection matching currently defined
1143 :mconfig:`collection_target`.
1144 * Doc: add :ref:`Shell support` section in :ref:`modulefile(5)` man page to
1145 describe how shells support the different kind of environment changes that
1146 can be defined in modulefiles.
1147 * Record during :subcmd:`autoinit` sub-command the initial environment state
1148 in :envvar:`__MODULES_LMINIT`. Enabled modulepaths and loaded modulefiles
1149 through :file:`modulespath` and :file:`initrc` initialization configuration
1150 files are recorded in this new environment variable.
1151 * Add :subcmd:`reset` sub-command to restore initial environment. It takes
1152 recorded environment in :envvar:`__MODULES_LMINIT` and restores it.
1153 * Initial environment is restored when collection name specified on
1154 :subcmd:`restore` sub-command equals ``__init__``.
1155 * When no argument is provided to :subcmd:`restore` sub-command and if
1156 *default* collection does not exist, initial environment is restored.
1157 * Initial environment content is displayed when collection name specified on
1158 :subcmd:`saveshow` sub-command equals ``__init__``.
1159 * When no argument is provided to :subcmd:`saveshow` sub-command and if
1160 *default* collection does not exist, initial environment content is
1161 displayed.
1162 * Add :mconfig:`reset_target_state` configuration option to determine behavior
1163 of :subcmd:`reset` sub-command. When set to ``__init__`` (default value)
1164 initial environment is restored. When set to ``__purge__``, a
1165 :subcmd:`purge` sub-command is performed. Any other value, corresponds to
1166 the name of a collection to :subcmd:`restore`. When set,
1167 :mconfig:`reset_target_state` defines :envvar:`MODULES_RESET_TARGET_STATE`
1168 environment variable.
1169 * Doc: add :ref:`initial-environment` design notes.
1170 * Unload *sticky* modules on :subcmd:`restore` and :subcmd:`reset`
1171 sub-commands to fully set environment in collection or initial state.
1172 * Testsuite: add *lint* testsuite to validate syntax of shell and Tcl scripts
1173 of this project. This testsuite can be invoked with ``make testlint`` or
1174 ``script/mt lint``. sh, bash and ksh scripts are checked with `ShellCheck`_
1175 tool and tcl scripts are checked with `Nagelfar`_.
1176 * Update :file:`modulecmd.tcl` code and add Nagelfar inline comments to fix
1177 linter reports.
1178 * Script: add usage message and support for ``-h``/``--help`` option on
1179 :command:`mrel`, :command:`mpub`, :command:`mt`, :command:`mtreview`,
1180 :command:`nglfar2ccov`, :command:`mb` and :command:`mlprof` development
1181 utilities.
1182 * Doc: describe :command:`script/mt` and :command:`script/mb` utilities in
1183 :ref:`CONTRIBUTING` guide.
1184 * Fix `ShellCheck`_ error, warning and info reports over all sh, bash and ksh
1185 shell scripts. (fix issue #470 with contribution from Lukáš Zaoral)
1186 * Init: update profile script for sh-like shells to only source sh or bash
1187 initialization script when BASH environment variable is found set. (fix
1188 issue #473)
1189 * Add :subcmd:`stash` sub-command to save current environment and restore
1190 initial one.
1191 * Add :subcmd:`stashpop` sub-command to restore stash collection then delete
1192 this collection file.
1193 * Add :subcmd:`stashrm` sub-command to delete stash collection file.
1194 * Add :subcmd:`stashshow` sub-command to display stash collection file.
1195 * Add :subcmd:`stashclear` sub-command to delete all stash collection files.
1196 * Add :subcmd:`stashlist` sub-command to list all stash collection files.
1197 * Update :subcmd:`savelist` sub-command to filter out stash collections unless
1198 if :option:`--all` option is set.
1199 * Doc: ensure current user environment does not break logging system in
1200 :ref:`log-module-command` recipe. (fix issue #475)
1201 * Rename the default git branch from *master* to *main* to use inclusive
1202 terminology.
1203 * Mark loaded modules that could benefit from a refresh evaluation in the
1204 :envvar:`__MODULES_LMREFRESH` environment variable.
1205 * Optimize :subcmd:`refresh` sub-command to only evaluate loaded modules that
1206 defines volatile environment changes (shell completion, alias or function).
1207 (fix issue #477)
1208 * Add :sitevar:`modulefile_extra_cmds` hook variable that could be defined in
1209 :file:`siteconfig.tcl` file to define specific commands in modulefile
1210 interpreter context. :sitevar:`modulefile_extra_cmds` is a list of command
1211 name and relative procedure pairs. (fix issue #286)
1212 * Add :sitevar:`modulefile_extra_vars` hook variable that could be defined in
1213 :file:`siteconfig.tcl` file to define specific variables in modulefile
1214 interpreter context. :sitevar:`modulefile_extra_vars` is a list of variable
1215 name and value pairs. (fix issue #286)
1216 * Add :sitevar:`modulerc_extra_cmds` hook variable that could be defined in
1217 :file:`siteconfig.tcl` file to define specific commands in modulerc
1218 interpreter context. :sitevar:`modulerc_extra_cmds` is a list of command
1219 name and relative procedure pairs. (fix issue #286)
1220 * Add :sitevar:`modulerc_extra_vars` hook variable that could be defined in
1221 :file:`siteconfig.tcl` file to define specific variables in modulerc
1222 interpreter context. :sitevar:`modulerc_extra_vars` is a list of variable
1223 name and value pairs. (fix issue #286)
1224 * Doc: Add :ref:`Site-specific configuration` section in :ref:`module(1)` man
1225 page.
1226 * Doc: extend :ref:`Collections` section with examples in :ref:`module(1)` man
1227 page.
1228
1229 .. _Nagelfar: http://nagelfar.sourceforge.net/
1230 .. _ShellCheck: https://www.shellcheck.net/
1231
1232
1233 .. _5.1 release notes:
1234
1235 Modules 5.1.1 (2022-05-31)
1236 --------------------------
1237
1238 * Install: add :command:`rpmlint` rc configuration file to filter false
1239 positive warning messages.
1240 * Install: better guess ``libdir64`` and ``libdir32`` directory locations
1241 when ``libdir`` does not end with *64* but contains *64*.
1242 * Install: update RPM spec file to move libtclenvmodules in an
1243 environment-modules directory under ``libdir``.
1244 * Fix rendering of loading or unloading module designation when configured
1245 color palette does not set the ``hi`` color key. (fix issue #455)
1246 * Remove the *already loaded* message displayed when verbosity level is higher
1247 or equal to ``verbose2`` if new tags are applied to the loaded module. (fix
1248 issue #456)
1249 * Report a global known error when current working directory cannot be
1250 retrieved due to the removal of this directory. (fix issue #457)
1251 * Update tags set through :mfcmd:`prereq` command on all already loaded
1252 requirements. (fix issue #459)
1253 * Update module designation with the tags set by reloading dependent module.
1254 (fix issue #460)
1255 * Install: include the ``lib/config.guess`` and ``lib/config.sub`` scripts in
1256 distribution tarball if generated by :command:`autoreconf`.
1257 * Install: call ``git`` command in ``Makefile`` only if the definitions of
1258 ``version.inc`` need to get built or refreshed.
1259
1260
1261 Modules 5.1.0 (2022-04-30)
1262 --------------------------
1263
1264 * Allow to declare :mfcmd:`variant` with no list of accepted value. Such
1265 variant accepts any value specified. (fix issue #405)
1266 * Add the :mconfig:`redirect_output` configuration option to control on *sh*,
1267 *bash*, *ksh*, *zsh* and *fish* shells whether or not the output of the
1268 :command:`module` function should be redirected from stderr to stdout. When
1269 set, :mconfig:`redirect_output` defines :envvar:`MODULES_REDIRECT_OUTPUT`
1270 environment variable.
1271 * Introduce the :option:`--redirect`/:option:`--no-redirect` command-line
1272 switches to supersede the value of the :mconfig:`redirect_output`
1273 configuration option on *sh*, *bash*, *ksh*, *zsh* and *fish* shells. (fix
1274 issue #410)
1275 * Add the ``--return-value`` option to the :mfcmd:`getenv` and
1276 :mfcmd:`getvariant` modulefile commands to force to return the value of
1277 respectively designated environment variable or variant when modulefile is
1278 evaluated in *display* mode. (fix issue #422)
1279 * Introduce the :subcmd:`state` sub-command to display Modules states.
1280 * Add the ``supported_shells`` state to get the list of the shells that are
1281 supported by :file:`modulecmd.tcl` through the :subcmd:`state` sub-command .
1282 (fix issue #426)
1283 * Filter out the variables intended for Modules private usage when processing
1284 the environment changes made by a script evaluated by :subcmd:`sh-to-mod`
1285 sub-command or :mfcmd:`source-sh` modulefile command. (fix issue #427)
1286 * Doc: add :ref:`control-mode-behaviors` design notes.
1287 * Doc: add :ref:`add-new-config-option` design notes.
1288 * Set a `Code of conduct`_ for the project and its community based on the
1289 widely adopted Contributor Covenant.
1290 * Doc: add :ref:`add-new-sub-command` design notes.
1291 * Add the ``--remove-on-unload`` option to the :mfcmd:`remove-path` to also
1292 remove value when modulefile is unloaded.
1293 * Raise error when an unknown option is set on :mfcmd:`module use<module>` or
1294 :mfcmd:`module unuse<module>` modulefile command.
1295 * Rework emitted debug messages to remove obvious ones and systematically
1296 report each modulefile command processed with their arguments.
1297 * Add the ``--append-on-unload`` option to the :mfcmd:`remove-path` and
1298 :mfcmd:`module unuse<module>` modulefile commands to append back when
1299 modulefile is unloaded the value removed at load time or a specific value
1300 set after this option.
1301 * Add the ``--prepend-on-unload`` option to the :mfcmd:`remove-path` and
1302 :mfcmd:`module unuse<module>` modulefile commands to prepend back when
1303 modulefile is unloaded the value removed at load time or a specific value
1304 set after this option.
1305 * Add the ``--noop-on-unload`` option to the :mfcmd:`unsetenv`,
1306 :mfcmd:`remove-path` and :mfcmd:`module unuse<module>` modulefile commands
1307 to perform no operation when modulefile is unloaded.
1308 * Add the ``--unset-on-unload`` option to the :mfcmd:`unsetenv` modulefile
1309 command to also unset environment variable when modulefile is unloaded.
1310 * Add the ``--set-if-undef`` option to the :mfcmd:`setenv` modulefile command
1311 to set environment variable when modulefile is loaded only this variable is
1312 not yet defined.
1313 * Install: add the :instopt:`--with-bashcompletiondir`,
1314 :instopt:`--with-fishcompletiondir` and :instopt:`--with-zshcompletiondir`
1315 installation options to install shell completion scripts in their
1316 system-wide location. (fix issue #428)
1317 * Doc: add :ref:`lmod-tcl-modulefile-compat` design notes.
1318 * Introduce the ``add-property``, ``remove-property`` and ``extensions``
1319 modulefile commands for compatibility with Lmod Tcl modulefiles. These
1320 commands are evaluated as a *no-operation* command.
1321 * Introduce the :mfcmd:`prereq-any` modulefile command for compatibility with
1322 Lmod Tcl modulefiles. :mfcmd:`prereq-any` is an alias of :mfcmd:`prereq`
1323 command.
1324 * Produce a clear error message when wrong number of argument is received by
1325 :mfcmd:`prereq` command.
1326 * Doc: describe :mfvar:`ModulesVersion` in *Modules Variables* section in
1327 :ref:`modulefile(5)` man page.
1328 * Set ``ModuleVersion`` as an alias over :mfvar:`ModulesVersion` modulefile
1329 variable for compatibility with Lmod Tcl modulefiles.
1330 * Doc: describe :mfcmd:`reportError` and :mfcmd:`reportWarning` modulefile
1331 commands.
1332 * Add the :mfcmd:`require-fullname` modulefile command for compatibility with
1333 Lmod Tcl modulefiles. This command aborts modulefile *load* evaluation if
1334 modulefile's name is not fully specified.
1335 * Add the :mfcmd:`prereq-all` modulefile command, alias over the
1336 :mfcmd:`prereq` command which acts as an *AND* operation when multiple
1337 modulefiles are specified.
1338 * Add the :mfcmd:`depends-on` modulefile command, alias over the
1339 :mfcmd:`prereq-all` command for compatibility with Lmod Tcl modulefiles.
1340 * Introduce the ``keep-loaded`` :ref:`module tag<Module tags>` that avoids an
1341 auto-loaded module to get automatically unloaded when its dependent modules
1342 are getting unloaded. Update default :mconfig:`tag_abbrev` configuration
1343 option to add an abbreviation for the new tag (``kL``) and default light and
1344 dark color palettes.
1345 * Add the :mfcmd:`always-load` modulefile command for compatibility with Lmod
1346 Tcl modulefiles. This command loads designated modulefile and applies the
1347 ``keep-loaded`` tag to it.
1348 * Add the :subcmd:`load-any` sub-command and :mfcmd:`module load-any<module>`
1349 modulefile command for compatibility with Lmod Tcl modulefiles. This command
1350 loads one modulefile from specified list.
1351 * Add support for ``--not-req`` option on :mfcmd:`module try-load<module>` and
1352 :mfcmd:`module load-any<module>` modulefile commands.
1353 * Doc: add :ref:`magic-cookie-check` design notes.
1354 * Add the :mconfig:`mcookie_check` configuration option that control whether
1355 the magic cookie at the start of modulefile (i.e., ``#%Module`` file
1356 signature) need to get checked or not. When set to ``eval`` the number of
1357 file checks is significantly reduced when walking through modulepaths to
1358 search for modulefiles. Default value for this option is overridden by the
1359 :envvar:`MODULES_MCOOKIE_CHECK` environment variable.
1360 * Doc: describe :mfcmd:`puts` Tcl command and its specific feature when used
1361 in modulefile.
1362 * Create the ``prestdout`` channel for :mfcmd:`puts` modulefile command to be
1363 able to send content that will be evaluated in current shell session prior
1364 any other content. (fix issue #432)
1365 * Add the :mfcmd:`family` modulefile command for compatibility with Lmod Tcl
1366 modulefiles. This command defines family name as a module alias over
1367 currently loading module and express a conflict over this name to ensure
1368 only one member of a family can be loaded in user environment.
1369 :mfcmd:`family` also defines the :envvar:`MODULES_FAMILY_\<NAME\>` and
1370 :envvar:`LMOD_FAMILY_\<NAME\>` environment variables.
1371 * Doc: add :ref:`reduce-io-load` cookbook recipe.
1372 * Add the ability to filter the list of loaded modules returned by
1373 :subcmd:`list` sub-command. Filtering pattern could be part of module name,
1374 symbolic version or alias and is matched in a case insensitive manner by
1375 default. It could also leverage the :ref:`Advanced module version
1376 specifiers` syntax.
1377 * Add support for :option:`--starts-with` and :option:`--contains` options on
1378 :subcmd:`list` sub-command.
1379 * Doc: add :ref:`shell-completion` design notes.
1380 * Introduce :mfcmd:`complete` and :mfcmd:`uncomplete` modulefile commands to
1381 respectively enable and disable shell completion for a given command name.
1382 *bash*, *tcsh* and *fish* shells are supported.
1383 * Track shell completion changes of *bash*, *tcsh* and *fish* shell scripts on
1384 :subcmd:`sh-to-mod` sub-command and :mfcmd:`source-sh` modulefile command.
1385 * Fix typos found in code, tests and documentation. (contribution from Dimitri
1386 Papadopoulos Orfanos)
1387 * Update the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to support
1388 nested function definition on fish shell.
1389 * Fix the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to correctly
1390 detect functions with a ``_`` character in their name on fish shell.
1391 * Update the :command:`module` shell function definition for sh-kind shell to
1392 enclose the output generated by :file:`modulecmd.tcl` in quotes in order to
1393 pass it to the eval command. This change fixes definition of shell function,
1394 especially when coming from shell script evaluation over the
1395 :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms. (fix issue #434)
1396 * Fix csh shell alias detection on :subcmd:`sh-to-mod` and :mfcmd:`source-sh`
1397 mechanisms when enclosed in parenthesis. (fix issue #434)
1398 * Include for fish shell environment analysis on :subcmd:`sh-to-mod` and
1399 :mfcmd:`source-sh` mechanisms the private functions defined by evaluated
1400 script, in order to catch all definitions that may be useful for shell
1401 completion.
1402 * Fix the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to correctly
1403 detect empty function on fish shell.
1404 * Script: add :command:`pre-commit` git hook script to help verify if commits
1405 are free of misspellings (with `codespell`_ tool) and trailing spaces.
1406 * Doc: fix typos found in documentation with Aspell utility.
1407 * Doc: describe :ref:`Dependencies between modulefiles` in
1408 :ref:`modulefile(5)` man page. (fix issues #431 and #433)
1409 * Script: update :command:`pre-commit` git hook script to spell check
1410 documentation files with `Aspell`_ tool.
1411 * Script: add :command:`commit-msg` git hook script to spell check commit
1412 message with `Aspell`_ tool.
1413 * Doc: clarify that ``#%Module`` is a file signature also called Modules magic
1414 cookie.
1415 * Doc: update the :ref:`module ENVIRONMENT` section in :ref:`module(1)` man
1416 page to provide for each Modules environment variable the name of the
1417 configuration option that could be used to set the variable with the
1418 :subcmd:`config` sub-command.
1419 * Doc: clarify in :ref:`module(1)` man page that
1420 :envvar:`MODULES_SET_SHELL_STARTUP`, :envvar:`MODULES_SHELLS_WITH_KSH_FPATH`
1421 and :envvar:`MODULES_WA_277` should be set prior Modules initialization to
1422 get taken into account.
1423 * Doc: update :ref:`INSTALL` document to provide the name of the configuration
1424 option linked the installation options.
1425 * Doc: describe in :ref:`module(1)` man page the default value of each
1426 configuration option and linked installation option and command-line
1427 switches.
1428 * Doc: add *Configuration options* section in :ref:`INSTALL` document with a
1429 table summarizing all configuration options and their relative installation
1430 options and environment variables.
1431 * Add the :mfcmd:`pushenv` modulefile command for compatibility with Lmod Tcl
1432 modulefiles. This command sets designated environment variable with
1433 specified value and save the previous value set to restore it when the
1434 modulefile is unloaded. Previous values are saved in a
1435 :envvar:`__MODULES_PUSHENV_\<VAR\>` environment variable.
1436 * Doc: add :ref:`Compatibility with Lmod Tcl modulefile` section in
1437 :ref:`modulefile(5)` man page.
1438 * Update definition of the ``module()`` python function and python
1439 initialization script to explicitly send output to ``sys.stderr`` to get the
1440 ability to catch this content.
1441 * Lib: handle ``sysconf`` error in function implementing the
1442 ``initStateUsergroups`` procedure. (contribution from Lukáš Zaoral)
1443 * Introduce the :option:`--tag` option for the :subcmd:`load`,
1444 :subcmd:`try-load`, :subcmd:`load-any`, :subcmd:`switch` sub-commands and
1445 associated :mfcmd:`module` modulefile commands and :mfcmd:`prereq`,
1446 :mfcmd:`prereq-all`, :mfcmd:`depends-on` and :mfcmd:`always-load` modulefile
1447 commands. This new option applies specified tags to the module to load.
1448 * Record tags set to loaded modules with the :option:`--tag` option in the
1449 :envvar:`__MODULES_LMEXTRATAG` environment variable to make this information
1450 persists after module being loaded.
1451 * When saving a collection, record loaded module tags set with the
1452 :option:`--tag` option and those resulting from module load states (like
1453 ``auto-loaded`` and ``keep-loaded``). The ``--notuasked`` string previously
1454 used to designate auto-loaded modules in collection is changed into the
1455 ``--tag=auto-loaded`` option.
1456 * Introduce the :mconfig:`collection_pin_tag` configuration option, that
1457 records in collection all tags set on loaded modules when enabled. Option is
1458 disabled by default and when set it defines the :envvar:`MODULES_COLLECTION\
1459 _PIN_TAG` environment variable.
1460 * When a collection is saved, its content starts with a ``#%Module5.1`` file
1461 signature if :option:`--tag` option is recorded in it.
1462 * Update the :subcmd:`restore`, :subcmd:`savelist`, :subcmd:`saveshow` and
1463 :subcmd:`is-saved` sub-commands to exclude from result or return an error
1464 when checking a collection expressing a higher Modules version requirement
1465 in its header signature than the one currently in use.
1466 * Doc: describe :ref:`differences between run-command file and modulefile
1467 interpretation<Modulefile and run-command interp diff>` in
1468 :ref:`modulefile(5)` man page.
1469 * Doc: describe :mfcmd:`module` sub-commands available as modulefile Tcl
1470 command for each interpretation context in :ref:`modulefile(5)` man page.
1471 * When loading a module with some extra tags defined through the
1472 :option:`--tag` option, if this module is already loaded the new tags are
1473 added to those already set.
1474 * When reporting result of :subcmd:`avail` or :subcmd:`list` sub-commands,
1475 enclose module names in single quotes if they contain a space character.
1476 * When mentioning the loading, unloading or refreshing evaluation of a module,
1477 report the tags associated to this module as done when printing results of
1478 :subcmd:`list` sub-command.
1479 * Fix :ref:`log-module-command` cookbook recipe not to break Modules
1480 initialization when using provided :file:`siteconfig.tcl` file. (fix issue
1481 #453 with contribution from Eric Burgueño)
1482 * Mention tagging evaluation of a module, when tag list of an already loaded
1483 module is updated.
1484
1485 .. _Code of conduct: https://github.com/envmodules/modules/blob/main/CODE_OF_CONDUCT.md
1486 .. _codespell: https://github.com/codespell-project/codespell
1487 .. _Aspell: http://aspell.net/
1488
1489
1490 .. _5.0 release notes:
1491
1492 Modules 5.0.1 (2021-10-16)
1493 --------------------------
1494
1495 * Doc: add *How to preserve my loaded environment when running screen* entry
1496 in :ref:`FAQ`.
1497 * Fix the advanced version specifier resolution when the
1498 :mconfig:`extended_default` option is off and :mconfig:`icase` option is on
1499 when resolving version list specification. (fix issue #411)
1500 * Doc: improve the :ref:`log-module-command` cookbook to rely on the ``trace``
1501 Tcl command to track every modulefile evaluation and module/ml procedure
1502 calls. (fix issue #412)
1503 * Doc: fix missing space between list entries in :ref:`variants` design doc.
1504 (fix issue #413)
1505 * Correctly detect tags set on loaded modules when refreshing them.
1506 * Set the :envvar:`__MODULES_AUTOINIT_INPROGRESS` environment variable when
1507 running the :subcmd:`autoinit` sub-command and quit autoinit process if this
1508 variable is found defined and equal to 1 when starting it. Ensure this way
1509 that an autoinit process will not be triggered indefinitely by itself when
1510 the :mconfig:`set_shell_startup` option is enabled and some module loaded at
1511 initialization time relies on the execution of a bash script. (fix issue
1512 #414)
1513 * Remove warning message when unloading a :mfcmd:`prepend-path` or
1514 :mfcmd:`append-path` modulefile command with ``--duplicates`` option set.
1515 (fix issue #421)
1516 * Clarify the module sub-commands that are allowed to be used within a
1517 modulefile. (fix issue #423)
1518 * Install: set in the module magic cookie of the :file:`initrc` configuration
1519 file installed by default the version of Modules required to evaluate this
1520 file.
1521 * Doc: fix documentation of :mfcmd:`getenv` modulefile command to describe
1522 that an empty string is now returned when designated environment variable is
1523 not defined and no default value to return is specified.
1524
1525
1526 Modules 5.0.0 (2021-09-12)
1527 --------------------------
1528
1529 * Remove deprecated :command:`createmodule.sh` and :command:`createmodule.py`
1530 tools as shell script to modulefile conversion is now achieved with the
1531 :subcmd:`sh-to-mod` sub-command.
1532 * Remove mention of the :subcmd:`init*<initadd>` sub-commands in module usage
1533 message to put focus on the collection handling sub-commands.
1534 * Do not declare anymore the ``chdir``, ``module``, ``module-trace``,
1535 ``module-verbosity``, ``module-user`` and ``module-log`` commands under the
1536 modulerc Tcl interpreter as no-op commands. A clear error message is
1537 obtained if these commands are still used in modulerc files instead of
1538 silently ignoring them.
1539 * Return by default an empty string rather ``_UNDEFINED_`` on :mfcmd:`getenv`
1540 modulefile command if passed environment variable is not defined.
1541 * Align empty directory name error message obtained on :subcmd:`use`
1542 sub-command with message obtained when module or collection name is empty.
1543 * Accept non-existent modulepath on :subcmd:`use` sub-command.
1544 * Install: installation option :instopt:`--enable-auto-handling` is set on by
1545 default which enables the automated module handling mode (see
1546 :envvar:`MODULES_AUTO_HANDLING`).
1547 * Install: installation option :instopt:`--enable-extended-default` is set on
1548 by default which allows partial module version specification (see
1549 :envvar:`MODULES_EXTENDED_DEFAULT`).
1550 * Install: installation option :instopt:`--enable-advanced-version-spec` is
1551 set on by default which activates the :ref:`Advanced module version
1552 specifiers`
1553 * Install: installation option :instopt:`--enable-color` is set on by default
1554 which enables the ``auto`` output color mode (see :envvar:`MODULES_COLOR`).
1555 * Install: installation option :instopt:`--with-icase` is set to ``search``
1556 by default to activate case insensitive match on search contexts (see
1557 :envvar:`MODULES_ICASE`).
1558 * Install: installation option :instopt:`--enable-new-features` has been reset
1559 following major version change as all the options it implied are now enabled
1560 by default.
1561 * Install: installation option :instopt:`--enable-set-shell-startup` is set
1562 off by default but could be enabled once installed through the
1563 :file:`initrc` configuration file.
1564 * Install: installation option :instopt:`--with-initconf-in` is set to
1565 ``etcdir`` by default to locate configuration files in the directory
1566 designated by the :instopt:`--etcdir` option. Therefore the initialization
1567 configuration file is named :file:`initrc` in this directory, and the
1568 modulepath-specific configuration file is named :file:`modulespath`.
1569 * Only look at configuration files found in the location designated by the
1570 :instopt:`--etcdir` or :instopt:`--initdir` option (depending on the value
1571 of :instopt:`--with-initconf-in` option). Configuration files were
1572 previously searched in both locations.
1573 * Install: remove installation option ``--enable-compat-version``.
1574 Compatibility version co-installation is discontinued. :command:`switchml`
1575 shell function and :envvar:`MODULES_USE_COMPAT_VERSION` are thus removed as
1576 well.
1577 * Testsuite: introduce the non-regression quick test mode. When the
1578 :envvar:`QUICKTEST` environment variable is set to ``1``, only the main
1579 tests from the non-regression testsuite are run. When first argument of the
1580 :command:`mt` script is ``quick``, tests are run in quick mode.
1581 * Install: run non-regression testsuite in quick mode in RPM spec file.
1582 * Rename the environment variables that are used by Modules to track loaded
1583 environment state (variables whose name starts with ``MODULES_LM``). A
1584 ``__`` prefix is added to the name of these variables to indicate that they
1585 are intended for internal use only.
1586 * Rename the environment variables used to indirectly pass to
1587 :file:`modulecmd.tcl` the value of variables set in quarantine (variables
1588 whose name finishes with ``_modquar``). A
1589 :envvar:`__MODULES_QUAR_<__MODULES_QUAR_\<VAR\>>` prefix is applied to the
1590 name of these variables instead of the ``_modquar`` suffix to indicate they
1591 are intended for Modules internal use of only.
1592 * Update Tcl requirement to version 8.5 as Tcl 8.4 is deprecated since a long
1593 time and this version is not available anymore on recent OS distributions.
1594 Update internal code of :file:`modulecmd.tcl` to take benefit from the
1595 features brought by Tcl 8.5.
1596 * Split source code in several Tcl files hosted in ``tcl`` directory. When
1597 building Modules, the Tcl files are concatenated to make the
1598 :file:`modulecmd.tcl` script.
1599 * Record ``auto-loaded`` tag of loaded modules in :envvar:`__MODULES_LMTAG`
1600 environment variable rather set a specific entry for module in the
1601 ``__MODULES_LMNOTUASKED`` environment variable.
1602 * Rename the environment variables used by the reference counting mechanism
1603 of path-like environment variables. A
1604 :envvar:`__MODULES_SHARE_<__MODULES_SHARE_\<VAR\>>` prefix is applied to the
1605 name of these variables instead of the ``_modshare`` suffix to clearly
1606 indicate they are intended for Modules internal use of only.
1607 * Reference counting mechanism is not anymore applied to the Modules-specific
1608 path variables (like :envvar:`LOADEDMODULES`). As a result no
1609 :envvar:`__MODULES_SHARE_\<VAR\>` variable is set in user environment for
1610 these variables. Exception is made for :envvar:`MODULEPATH` environment
1611 variable where the mechanism still applies.
1612 * When an element is added to a path-like variable through the
1613 :mfcmd:`append-path` or :mfcmd:`prepend-path` modulefile commands, add this
1614 element to the associated reference counter variable (named
1615 :envvar:`__MODULES_SHARE_\<VAR\>`) only when this element is added multiple
1616 times to the path-like variable. When an element is removed from a path-like
1617 variable, this element is removed from the reference counter variable when
1618 its counter is equal to 1.
1619 * When the :subcmd:`use` and :subcmd:`unuse` module sub-commands are not
1620 called during a modulefile evaluation, the reference counter associated with
1621 each entry in :envvar:`MODULEPATH` environment variable is ignored. In such
1622 context, a :subcmd:`module use<use>` will not increase the reference counter
1623 of a path entry already defined and a :subcmd:`module unuse<unuse>` will
1624 remove specified path whatever its reference counter value.
1625 * When the :subcmd:`append-path`, :subcmd:`prepend-path` and
1626 :subcmd:`remove-path` module sub-commands are not called during a modulefile
1627 evaluation, the reference counter associated with each entry in targeted
1628 environment variable is ignored. In such context, a
1629 :subcmd:`module append-path/prepend-path<prepend-path>` will not increase
1630 the reference counter of a path entry already defined and a
1631 :subcmd:`module remove-path<remove-path>` will remove specified path
1632 whatever its reference counter value.
1633 * Fix :subcmd:`unuse` sub-command when several modulepaths are specified as a
1634 single argument (i.e., ``/path/to/dir1:/path/to/dir2``). Enabled modulepaths
1635 were not correctly detected when specified this way.
1636 * Doc: clarify that an already defined path is not added again or moved when
1637 passed to the :subcmd:`use` sub-command or the
1638 :mfcmd:`append-path/prepend-path<prepend-path>` modulefile commands. (fix
1639 issue #60)
1640 * Change the :subcmd:`refresh` sub-command to evaluate all loaded modulefiles
1641 and re-apply the non-persistent environment changes they define (i.e., shell
1642 aliases and functions). With this change the :subcmd:`refresh` sub-command
1643 is restored to the behavior it had on Modules version 3.2.
1644 * Evaluate the modulefile commands resulting from a :mfcmd:`source-sh` command
1645 through the current modulefile Tcl interpreter in order to evaluate them
1646 according to the current modulefile evaluation mode.
1647 * When initializing Modules, refresh the loaded modules in case some user
1648 environment is already configured. This is especially useful when starting a
1649 sub-shell session as it ensures that the loaded environment in parent shell
1650 is correctly inherited, as the :subcmd:`refresh` sub-command re-applies the
1651 non-persistent environment configuration (i.e., shell alias and function
1652 that are not exported to the sub-shell). (fix issue #86)
1653 * Init: add example code in default :file:`initrc`, the initialization script
1654 of Modules, to either restore user's default collection if it exists or load
1655 a predefined module list at the end of the initialization process.
1656 * When initializing Modules, evaluate the :file:`initrc` configuration file in
1657 addition to the the :file:`modulespath` configuration file and not instead
1658 of this file. :file:`initrc` is evaluated after :file:`modulespath` file.
1659 * When the installation option :instopt:`--enable-modulespath` is set, the
1660 list of modulepath to enable by default is now only defined in the
1661 :file:`modulespath` configuration file and not anymore in the :file:`initrc`
1662 configuration file.
1663 * No error is raised when evaluating in ``display`` mode a modulefile without
1664 a value specified for the :mfcmd:`variant` it defines. This change helps to
1665 learn all the variant a modulefile defines. As a result, the unspecified
1666 variant is not instantiated in the :mfvar:`ModuleVariant` array variable.
1667 (fix issue #406)
1668 * When running the :mfcmd:`unsetenv` modulefile command on an unload
1669 evaluation, do not unset designated environment variable if no value to
1670 restore is provided.
1671 * Fix :mfcmd:`unsetenv` to distinguish between being called on a unload
1672 evaluation without a value to restore or with an empty string value to
1673 restore.
1674 * Make :mfcmd:`system` modulefile command available from a modulerc evaluation
1675 context whatever the underlying module evaluation mode.
1676 * Make :mfcmd:`is-used` modulefile command available from a modulerc
1677 evaluation context.
1678 * Remove internal state ``tcl_version_lt85`` as Tcl 8.5+ is now a requirement.
1679 * Forbid use of :subcmd:`module source<source>` command in modulefile or in an
1680 initialization rc file, the ``source`` Tcl command should be used instead.
1681 :subcmd:`source` sub-command should only be called from the command-line.
1682 * Report the modules loading and unloading during the :command:`module`
1683 command initialization (i.e., during the evaluation of the :file:`initrc`
1684 configuration file). These report messages are disabled when the
1685 :mconfig:`verbosity` configuration option is set to ``concise`` or
1686 ``silent``.
1687 * During a module :subcmd:`restore` or :subcmd:`source`, only report the
1688 module load and unload directly triggered by these sub-commands. Load and
1689 unload triggered by other modules are reported through the automated module
1690 handling messages of the main modules.
1691 * Enforce use of the module magic cookie (i.e., ``#%Module``) at the start of
1692 global or user rc files, :file:`initrc` configuration file or any scriptfile
1693 passed for evaluation to the :subcmd:`source` sub-command. These files are
1694 not evaluated and an error is produced if the magic cookie is missing or if
1695 the optional version number placed after the cookie string is higher than
1696 the version of the :file:`modulecmd.tcl` script in use.
1697 * Doc: alphabetically sort installation option in :ref:`INSTALL` document.
1698 * Update the :instopt:`--enable-quarantine-support` installation option to
1699 control a :mconfig:`quarantine_support` configuration option. When this
1700 option is enabled, the :subcmd:`autoinit` sub-command produces the shell
1701 code for the :command:`module` shell function definition with quarantine
1702 mechanism support. When disabled, code is generated without quarantine
1703 support.
1704 * Install: installation option :instopt:`--enable-quarantine-support` is set
1705 off by default.
1706 * Introduce the :envvar:`MODULES_QUARANTINE_SUPPORT` environment variable to
1707 control the :mconfig:`quarantine_support` configuration option once Modules
1708 is installed. To enable the quarantine mechanism,
1709 :envvar:`MODULES_QUARANTINE_SUPPORT` should be set to ``1`` prior Modules
1710 initialization or :mconfig:`quarantine_support` configuration option should
1711 be set to ``1`` in the :file:`initrc` configuration file.
1712 * Quarantine mechanism code in the Modules shell initialization scripts is now
1713 always defined and mechanism always applies if some environment variables
1714 are defined in :envvar:`MODULES_RUN_QUARANTINE`.
1715 * Code in the :file:`modulecmd.tcl` script to restore environment variables
1716 put in quarantine is now always generated and applies if the
1717 :envvar:`__MODULES_QUARANTINE_SET` environment variable is set to ``1``.
1718 This variable is set by the Modules initialization script prior calling the
1719 :subcmd:`autoinit` sub-command or by the :command:`module` shell function if
1720 it has been generated with quarantine support enabled.
1721 * Install: installation option :instopt:`--enable-silent-shell-debug-support`
1722 is set off by default.
1723 * Code to silence shell debug properties in the Modules shell initialization
1724 scripts is now always defined and mechanism applies if
1725 :envvar:`MODULES_SILENT_SHELL_DEBUG` environment variable is set to ``1``.
1726 * Code to silence shell debug properties in the :command:`module` shell
1727 function could now be enabled if :envvar:`MODULES_SILENT_SHELL_DEBUG` is set
1728 to ``1`` prior Modules initialization or if the
1729 :mconfig:`silent_shell_debug` configuration option is set to ``1`` in the
1730 :file:`initrc` configuration file.
1731 * Doc: clarify TOC and title of :ref:`MIGRATING<MIGRATING>` document.
1732 * Doc: extend description of Modules configuration steps of in :ref:`INSTALL`
1733 document.
1734 * Doc: document :file:`initrc` and :file:`modulespath` configuration files in
1735 :ref:`module(1)` man page.
1736 * Install: replace :file:`example.txt` by :file:`INSTALL.txt` guide in RPM.
1737 * Doc/Install: rename ``diff_v3_v4`` document into :ref:`changes<changes>`.
1738 * Doc: reorganize :ref:`changes` document to let room to describe Modules 5
1739 changes.
1740
1741
1742 .. _4.8 release notes:
1743
1744 Modules 4.8.0 (2021-07-14)
1745 --------------------------
1746
1747 * Introduce the :subcmd:`edit` sub-command that opens modulefile passed as
1748 argument in a text editor. Modulefile can be specified like with any other
1749 sub-command, leveraging defined symbolic versions, aliases or using advanced
1750 version specifiers.
1751 * Add the :mconfig:`editor` configuration option to select the text editor to
1752 use with :subcmd:`edit` sub-command. When this option is set through the
1753 :subcmd:`config` sub-command, the :envvar:`MODULES_EDITOR` environment
1754 variable is set. The :instopt:`--with-editor` installation option controls
1755 the default value of :mconfig:`editor` configuration option. If not set at
1756 installation time, ``vi`` is set as default editor.
1757 * Default value of :mconfig:`editor` configuration option is overridden by the
1758 :envvar:`VISUAL` or the :envvar:`EDITOR` environment variables, which are
1759 both in turn overridden by the :envvar:`MODULES_EDITOR` environment
1760 variable.
1761 * Doc: fix :file:`modulecmd.tcl` internal state check in recipes example
1762 codes. (fix issue #396)
1763 * The :ref:`Advanced module version specifiers` mechanism now allows the use
1764 of version range in version list (for instance ``mod@:1.2,1.4:1.6,1.8:``).
1765 Such specification helps to exclude specific versions. (fix issue #397)
1766 * Install: fix installation scripts to allow building Modules when its
1767 repository is set as a git submodule. (fix issue #398)
1768 * Doc: demonstrate in the :ref:`source-script-in-modulefile` recipe how to use
1769 the :mfcmd:`source-sh` command when software provide a specific
1770 initialization script for each shell it supports. (fix issue #399)
1771 * When defining a shell function with the :mfcmd:`set-function` modulefile
1772 command, only export this function when using the Bash shell (using the
1773 ``export -f`` shell command) to make it available in sub-shell contexts.
1774 Shell function export is not supported on other kind of sh shell (sh, ksh
1775 and zsh). (fix issue #401)
1776 * Doc: add :ref:`variants` design notes.
1777 * Add the :mfcmd:`variant` modulefile command that enables to pass down
1778 arguments, specified when designating the module to evaluate, within
1779 modulefile evaluation context. This command defines a variant name and a
1780 list of allowed values. When evaluated, :mfcmd:`variant` instantiates an
1781 element in the :mfvar:`ModuleVariant` array whose name equals variant name
1782 and value is set with value specified for variant when module is designated.
1783 If specified value does not correspond to an allowed value or if no value
1784 is specified for variant an error is raised.
1785 * Enhance the :ref:`Advanced module version specifiers` to handle variant
1786 specification following `Spack`_'s syntax (e.g., *name=value*). When the
1787 :mconfig:`advanced_version_spec` configuration is enabled, variant could be
1788 specified anywhere a module can be specified.
1789 * Add the ``--default`` option to the :mfcmd:`variant` modulefile command to
1790 indicate the default value of the variant to apply when the designation of
1791 the evaluating module does not mention this variant.
1792 * Add the ``--boolean`` option to the :mfcmd:`variant` modulefile command to
1793 indicate that the variant defined is of the Boolean type, thus no list of
1794 accepted value is expected.
1795 * Enhance the :ref:`Advanced module version specifiers` to handle Boolean
1796 variant specification following `Spack`_'s syntax (e.g., *+name*, *~name*
1797 and *-name*). The *-name* syntax is not supported on :ref:`ml(1)` command as
1798 the minus sign already means to unload designated module.
1799 * Accept any minus argument (*-word*) set after the sub-command name when the
1800 :mconfig:`advanced_version_spec` configuration is enabled and if sub-command
1801 accepts :ref:`Advanced module version specifiers` (like :subcmd:`load` or
1802 :subcmd:`unload` sub-commands). A *false* value may be set to Boolean
1803 variant this way.
1804 * Add the :mconfig:`variant_shortcut` configuration option to define shortcut
1805 characters that could be used to specify and report module variants. Default
1806 value for this option could be set at installation time with the
1807 :instopt:`--with-variant-shortcut` option. No variant shortcut is defined by
1808 default. This value could be superseded by setting up the
1809 :mconfig:`variant_shortcut` option with :subcmd:`config` sub-command. Which
1810 sets the :envvar:`MODULES_VARIANT_SHORTCUT` environment variable.
1811 * Enhance the :ref:`Advanced module version specifiers` to handle variant
1812 shortcut specification (e.g., *<shortcut>value*).
1813 * Record in user loaded environment, with
1814 :envvar:`MODULES_LMVARIANT<__MODULES_LMVARIANT>` environment variable, the
1815 value specified for the variants defined in the loaded modulefiles and their
1816 properties (if it is a Boolean variant and if the value set is the default
1817 one).
1818 * Add the ``variant`` element in the allowed value list of the
1819 :mconfig:`list_output` and :mconfig:`list_terse_output` configuration
1820 options. Set this new element in the default value list of the
1821 :mconfig:`list_output` option. When set, the variant defined for loaded
1822 modules are reported on module :subcmd:`list` command output.
1823 * Add the ``va`` color key in default light and dark color palettes to
1824 graphically enhance the report of variant value.
1825 * Update the key section to explain on :subcmd:`list` sub-command output the
1826 reported variant elements (*name=value*, *+name*, *-name* or
1827 *<shortcut>value*)
1828 * Record variant specification of loaded modules when saving collections and
1829 reload specified variants when restoring these collections.
1830 * When :mconfig:`collection_pin_version` configuration is disabled, only
1831 record in collections the variants whose value is not the default one.
1832 * Update module designation in error, warning or informational messages to
1833 report variant specification enclosed in curly braces (*{}*), enclose module
1834 name and version or variant specification in single quotes (*''*) if they
1835 contain a space character and highlight the module designation in report
1836 message if configured.
1837 * Introduce the :mfcmd:`getvariant` modulefile command to query for currently
1838 evaluating module the value of a given variant name.
1839 * When translating the ``@loaded`` version specifier also retrieve the variant
1840 specified for corresponding loaded module.
1841 * Update hide, forbid and tag mechanisms to apply them only if they match
1842 selected module variant.
1843 * Any variant defined in module specification passed as argument to search
1844 sub-commands (:subcmd:`avail`, :subcmd:`whatis`, :subcmd:`is-avail`,
1845 :subcmd:`path` and :subcmd:`paths`) is ignored.
1846 * Raise an error if a variant named ``version`` is declared in a modulefile to
1847 let room for the future implementation of this specific variant.
1848 * Doc: describe in the :ref:`changes` document argument handling change on
1849 :mfcmd:`setenv` since v3.2. (fix issue #402)
1850 * Introduce the :subcmd:`try-load` sub-command which like :subcmd:`load`
1851 sub-command tries to load the modulefile passed as argument, but does not
1852 complain if this modulefile cannot be found. (fix issue #392)
1853 * Init: fix stderr redirection in fish shell initialization script, now that
1854 use of the ``^`` character to redirect stderr is disabled by default (fish
1855 >=3.3).
1856 * Protect quarantine mechanism code from ``rcexpandparam`` Zsh option when
1857 initializing the :command:`module` command on this shell. (fix issue #403)
1858
1859
1860 .. _4.7 release notes:
1861
1862 Modules 4.7.1 (2021-04-06)
1863 --------------------------
1864
1865 * Doc: clarify the license terms used by the project. (fix issue #389)
1866 * Align all files from the Modules project under the GPLv2+ license. Scripts
1867 and libraries that were previously licensed with GPLv3+ have been moved to
1868 GPLv2+ with the consent of their respective copyright holders. (fix issue
1869 #389)
1870 * Revert "Install: have :file:`configure` script assume the ``.`` dot
1871 directory when invoked without the prepended ``./``" as consent was not
1872 obtained from author to re-license the contribution to GPLv2+.
1873 * Doc: fixes few typos in :ref:`module(1)` and :ref:`modulefile(5)`.
1874 * Update the :subcmd:`sh-to-mod` mechanism to support version 3.2 of the fish
1875 shell. Fish 3.2 introduces the ``.`` builtin command that should be
1876 regexp-escaped when determining the shell functions or aliases defined by
1877 the script analyzed by :subcmd:`sh-to-mod`.
1878 * Vim: update addon files to highlight modulefile variables
1879 :mfvar:`ModuleTool`, :mfvar:`ModuleToolVersion` and
1880 :mfvar:`ModulesCurrentModulefile`.
1881 * Doc: update the description and default value of the
1882 :instopt:`--with-dark-background-colors` and
1883 :instopt:`--with-light-background-colors` installation options.
1884 * Doc: add description of changes that occurred on versions 4.6 and 4.7 for
1885 the :instopt:`--with-dark-background-colors` and
1886 :instopt:`--with-light-background-colors` installation options and for the
1887 :envvar:`MODULES_COLORS` environment variable.
1888 * Doc: correct the default value of the :instopt:`--with-tag-abbrev`
1889 installation option.
1890 * Doc: add :ref:`sticky-modules-rcp` cookbook recipe.
1891
1892
1893 Modules 4.7.0 (2021-02-19)
1894 --------------------------
1895
1896 * Doc: simplify TOC of :ref:`MIGRATING` document
1897 * Add the :mfvar:`ModuleTool` and :mfvar:`ModuleToolVersion` Modules
1898 variables to determine during modulefile or modulerc evaluation the name and
1899 version of the *module* implementation currently in use.
1900 * Introduce the :mfcmd:`versioncmp` modulefile command to compare two version
1901 strings passed as argument.
1902 * Enable the use of wildcard character to designate multiple directories at
1903 once in :file:`modulespath` configuration file. (fix issue #125)
1904 * Distinguish aliases from symbolic versions in
1905 :envvar:`MODULES_LMALTNAME<__MODULES_LMALTNAME>` environment variable.
1906 Prefix these alias entries with the ``al|`` string.
1907 * Fetch modulefile modification time only if required by :subcmd:`list`
1908 sub-command display format.
1909 * Use symbolic versions recorded in environment, with
1910 :envvar:`MODULES_LMALTNAME<__MODULES_LMALTNAME>` variable, to report the
1911 symbols applying to loaded modules on :subcmd:`list` sub-command. Modulerc
1912 files are not evaluated anymore when performing a module list.
1913 * Move the definition of the :envvar:`FPATH` environment variable for Modules
1914 initialization on ksh shell from the initialization script of this shell to
1915 the resulting output of the :subcmd:`autoinit` sub-command.
1916 * Introduce the :mconfig:`shells_with_ksh_fpath` configuration option to
1917 define a list of shell where to ensure that any ksh sub-shell will get the
1918 module function defined by use of the :envvar:`FPATH` environment variable.
1919 When the :mconfig:`shells_with_ksh_fpath` option is set through the
1920 :subcmd:`config` sub-command, the :envvar:`MODULES_SHELLS_WITH_KSH_FPATH`
1921 environment variable is set. Accepted values are a list of shell among *sh*,
1922 *bash*, *csh*, *tcsh* and *fish* separated by colon character (``:``).
1923 * Add the :mconfig:`implicit_requirement` configuration option to control
1924 whether a prereq or a conflict requirement should be implicitly set onto
1925 modules respectively specified on :mfcmd:`module load<module>` or
1926 :mfcmd:`module unload<module>` commands in modulefile. Default value for
1927 this option could be set at configure time with the
1928 :instopt:`--enable-implicit-requirement` option (enabled by default). This
1929 value could be superseded by setting up the :mconfig:`implicit_requirement`
1930 option with :subcmd:`config` sub-command. Which sets the
1931 :envvar:`MODULES_IMPLICIT_REQUIREMENT` environment variable. (fix issue
1932 #260)
1933 * Add the ``--not-req`` option to the :mfcmd:`module` modulefile command to
1934 inhibit for its ``load`` and ``unload`` sub-commands the definition of a
1935 prereq or conflict requirement onto specified modules.
1936 * Add the ``lpopState`` and ``currentState`` procedures to respectively remove
1937 or return the last entry from the list of values of a given state.
1938 * Add the ``topState`` and ``depthState`` procedures to respectively return
1939 the first element from or the number of elements in the list of values of a
1940 given state.
1941 * Remove the pre-definition of runtime states with no specific property. These
1942 basic states are defined on-the-fly which implied they are not reported on a
1943 :subcmd:`module config --dump-state<config>` command unless if instantiated.
1944 * Introduce the ``loaded`` symbolic version among advanced version specifiers
1945 (e.g. ``foo@loaded``) to designate the currently loaded version of specified
1946 module. (fix issue #366)
1947 * Doc: add *Module tags* design notes.
1948 * Report tags applying to the modules returned by the :subcmd:`avail`
1949 sub-command. Adapt the regular, terse and JSON output styles to report these
1950 tags along the module they are attached to (enclosed in ``<>``). Reported
1951 tags currently are states that apply to modules: ``auto-loaded``,
1952 ``forbidden``, ``hidden``, ``loaded``, ``nearly-forbidden``, ``sticky`` and
1953 ``super-sticky``.
1954 * Record tags applying to each loaded module in the
1955 :envvar:`MODULES_LMTAG<__MODULES_LMTAG>` environment variable to make this
1956 information persist after module being loaded.
1957 * Report tags applying to the loaded modules returned by the :subcmd:`list`
1958 sub-command. Adapt the regular and JSON output styles to report these tags
1959 along the module they are attached to (enclosed in ``<>``). Reported tags
1960 currently are states applying to loaded modules: ``auto-loaded``,
1961 ``hidden-loaded``, ``nearly-forbidden``, ``sticky`` and ``super-sticky``.
1962 * Introduce the :mfcmd:`module-info tags<module-info>` modulefile command to
1963 query the tags that apply to the currently evaluated modulefile.
1964 * Add the :mfcmd:`module-tag` modulefile command to associate tag to
1965 designated modulefile. Those tags are reported on :subcmd:`avail` and
1966 :subcmd:`list` sub-commands along the module they are attached to.
1967 :mfcmd:`module-tag` supports the advanced module version specifier syntax.
1968 * Add the :mconfig:`tag_abbrev` configuration option to define abbreviated
1969 strings for module tags and use these abbreviations instead of tag names
1970 when reporting tags on :subcmd:`avail` and :subcmd:`list` command results.
1971 Default value for this option could be set at configure time with the
1972 :instopt:`--with-tag-abbrev` option. By default the following abbreviations
1973 are set: ``aL`` for *auto-loaded*, ``F`` for *forbidden*, ``H`` for
1974 *hidden*, ``H`` for *hidden-loaded*, ``L`` for *loaded*, ``nF`` for
1975 *nearly-forbidden*, ``S`` for *sticky*, ``sS`` for *super-sticky*. This
1976 value could be superseded by setting up the :mconfig:`tag_abbrev` option
1977 with :subcmd:`config` sub-command. Which sets the
1978 :envvar:`MODULES_TAG_ABBREV` environment variable.
1979 * A Select Graphic Rendition (SGR) code can be associated to module tag names
1980 or abbreviation strings in the color palette to graphically render these
1981 tags over the module name they are associated to. The default light and dark
1982 color palettes have been updated to set a color code for all basic module
1983 tags. When a color code is set for a tag, it is then graphically rendered
1984 over the module names and not reported along module name by its tag name or
1985 abbreviation. When multiple colored tags apply to a given module, each tag
1986 is graphically rendered over a sub-part of the module name.
1987 * Add the :mconfig:`tag_color_name` configuration option to designate module
1988 tags whose graphical rendering should be applied to their own name or
1989 abbreviation rather than over the module name they are attached to.
1990 Default value for this option could be set at configure time with the
1991 :instopt:`--with-tag-color-name` option (empty by default). This value could
1992 be superseded by setting up the :mconfig:`tag_color_name` option with
1993 :subcmd:`config` sub-command. Which sets the
1994 :envvar:`MODULES_TAG_COLOR_NAME` environment variable.
1995 * Add the ``--hidden-loaded`` option to the :mfcmd:`module-hide` modulefile
1996 command that indicates module should be hidden once loaded. When set, the
1997 ``hidden-loaded`` module tag applies to module specification set on
1998 :mfcmd:`module-hide` command.
1999 * Do not report on :subcmd:`list` sub-command results the loaded modules
2000 associated with the ``hidden-loaded`` tag, unless if the :option:`--all`
2001 option is set.
2002 * Doc: add an ``hidden-loaded`` example in the *Hide and forbid modules*
2003 cookbook recipe.
2004 * Introduce the ``verbose2`` verbosity level between ``verbose`` and ``trace``
2005 levels. Verbose2 mode can be enabled by setting the :mconfig:`verbosity`
2006 config to the ``verbose2`` value or by using the :option:`-v` command-line
2007 switch twice.
2008 * Do not report the load, unload or switch of modules set ``hidden-loaded`` if
2009 these modules have been loaded, unloaded or switched automatically. Unless
2010 the verbosity mode is set to ``verbose2`` or any higher level or if any
2011 specific messages have to be reported for these module evaluations.
2012 * Report when trying to load a module which is already loaded or when trying
2013 to unload a module which is not loaded in case the verbosity mode is set to
2014 ``verbose2`` or any higher level. (fix issue #187)
2015 * Doc: improve readability of version 4 improvements in :ref:`changes`
2016 document.
2017 * Introduce stickiness: module tagged ``sticky`` with :mfcmd:`module-tag`
2018 command cannot be unloaded unless if the unload is forced or if the module
2019 is reloaded. (fix issue #269)
2020 * Introduce super-stickiness: module tagged ``super-sticky`` with
2021 :mfcmd:`module-tag` command cannot be unloaded even if the unload is forced
2022 unless if the module is reloaded. (fix issue #269)
2023 * Allow swap of sticky or super-sticky modules by another modulefile version
2024 if stickiness definition applies to module parent name. E.g., *foo/1.0* can
2025 be swapped by *foo/2.0* if sticky tag applies to *foo*.
2026 * When forcing purge with a :subcmd:`purge --force<purge>` sub-command, also
2027 unload the modules that are depended by non-unloadable modules.
2028 * Doc: improve readability of Modules installation configuration in
2029 :ref:`INSTALL` document and enable hypertext reference to these elements.
2030 * Doc: improve readability of module command configuration option in
2031 :ref:`module(1)` document and enable hypertext reference to these elements.
2032 * Doc: describe in HTML documentation when installation options, module
2033 command configuration options and options of modulefile command or module
2034 sub-command were introduced.
2035 * Doc: update HTML documentation Table Of Content.
2036 * Doc: improve markup of module sub-commands, modulefile commands,
2037 installation option, module configuration option across documentation.
2038 * Doc: colorize terminal output examples in :ref:`MIGRATING` document.
2039 * Abort modulefile read if first file content chunk does not start with the
2040 ``#%Module`` magic cookie. (fix issue #375)
2041 * Install: add installation option :instopt:`--enable-new-features` that
2042 enables all at once the installation options that are disabled by default
2043 due to the substantial behavior changes they imply.
2044 * Add a *Key* section at the end of :subcmd:`avail` and :subcmd:`list`
2045 sub-commands to explain the meaning of graphical renditions or of elements
2046 set in parentheses or chevrons along module name.
2047 * Fix output of :subcmd:`avail` and :subcmd:`list` sub-commands on very small
2048 terminal width. (fix issue #378)
2049 * Add :mconfig:`mcookie_version_check` configuration to define if version set
2050 in modulefile magic cookie should be checked against :command:`module`
2051 current version to determine if modulefile can be evaluated. The new
2052 configuration, which is enabled by default, can be set at installation time
2053 with configure option :instopt:`--enable-mcookie-version-check` or can be
2054 superseded later on with the :envvar:`MODULES_MCOOKIE_VERSION_CHECK`
2055 environment variable. (fix issue #377)
2056 * Fix output of modulefile evaluation error stack trace on very small terminal
2057 width. (fix issues #379 and #381)
2058 * Correct :subcmd:`config` sub-command to set :mconfig:`nearly_forbidden_days`
2059 configuration. (fix issue #380)
2060 * Init: reduce usage of helper variables in :file:`bash_completion` and
2061 :file:`tcsh_completion` that are showing up in the output of the shell's
2062 ``set`` command. (fix issue #382 with contribution from Colin Marquardt)
2063 * Consider modulepath starting with a reference to an environment variable as
2064 absolute. (fix issue #376)
2065 * Consider the :subcmd:`module load<load>` performed in the user or the global
2066 RC file like load commands issued from initialization RC file. (fix issue
2067 #372)
2068 * Install: have :file:`configure` script assume the ``.`` dot directory when
2069 invoked without the prepended ``./``. (contribution from R.K. Owen)
2070 * Install: disable the Makefile rules to build the HTML documentation in case
2071 if the documentation is found pre-built in the dist archive.
2072 * Install: do not flag documentation as pre-built if :file:`configure` script
2073 is ran another time after building docs.
2074 * Restrict the value accepted by :mconfig:`nearly_forbidden_days`
2075 configuration and :instopt:`--with-nearly-forbidden-days` installation
2076 option to integers comprised between 0 and 365.
2077 * Install: color *ERROR* and *WARNING* message headers produced by
2078 :file:`configure` script if output is sent to a terminal.
2079 * Install: split error messages produced by :file:`configure` script over an
2080 additional line when too long.
2081 * Doc: add *Output configuration* design notes.
2082 * Introduce the :mconfig:`avail_output` and :mconfig:`avail_terse_output`
2083 configuration options to define the content to report in addition to the
2084 available module names respectively for :subcmd:`avail` sub-command regular
2085 and terse output modes. Excepted value for these configuration options is a
2086 colon separated list of elements to report. Default value is
2087 ``modulepath:alias:dirwsym:sym:tag:key`` for :mconfig:`avail_output` and
2088 ``modulepath:alias:dirwsym:sym:tag`` for :mconfig:`avail_terse_output`.
2089 These values can be changed at installation time respectively with the
2090 :instopt:`--with-avail-output` and :instopt:`--with-avail-terse-output`
2091 options. These values can then be superseded by using the :subcmd:`config`
2092 sub-command which sets the :envvar:`MODULES_AVAIL_OUTPUT` and
2093 :envvar:`MODULES_AVAIL_TERSE_OUTPUT` environment variables.
2094 * Introduce the :mconfig:`list_output` and :mconfig:`list_terse_output`
2095 configuration options to define the content to report in addition to the
2096 available module names respectively for :subcmd:`list` sub-command regular
2097 and terse output modes. Excepted value for these configuration options is a
2098 colon separated list of elements to report. Default value is
2099 ``header:idx:sym:tag:key`` for :mconfig:`list_output` and ``header`` for
2100 :mconfig:`list_terse_output`. These values can be changed at installation
2101 time respectively with the :instopt:`--with-list-output` and
2102 :instopt:`--with-list-terse-output` options. These values can then be
2103 superseded by using the :subcmd:`config` sub-command which sets the
2104 :envvar:`MODULES_LIST_OUTPUT` and :envvar:`MODULES_LIST_TERSE_OUTPUT`
2105 environment variables.
2106 * Add the :option:`--output`/:option:`-o` command-line switches to supersede
2107 the output configuration of :subcmd:`avail` or :subcmd:`list` sub-commands
2108 on their regular or terse output modes.
2109 * Remove the ``avail_report_dir_sym`` and ``avail_report_mfile_sym`` locked
2110 configuration options whose behaviors can now be obtained by respectively
2111 adding the ``dirwsym`` and ``sym`` elements to the :mconfig:`avail_output`
2112 or :mconfig:`avail_terse_output` configuration options.
2113 * When ``modulepath`` is omitted from the content to report on :subcmd:`avail`
2114 sub-command, available modules collected from global/user rc and enabled
2115 modulepaths are aggregated and reported all together.
2116 * Install: print generated file names rather commands executed to generate
2117 these files on Makefile build targets. Output obtained when building Modules
2118 is this way simplified. When option ``V=1`` is passed to ``make``, the
2119 verbose mode is enabled and run commands are shown. The simplified ``make``
2120 output does not apply to the install, test and clean targets or any target
2121 similar to them.
2122 * Install: fix configure and build files of Modules Tcl extension library to
2123 make them compatible with autoconf >=2.69.
2124 * Script: correctly detect previous Modules version number released from a
2125 side git branch on :command:`mpub` command.
2126 * Install: align RPM spec file syntax with spec file used on Fedora. Add
2127 missing build dependency on ``make`` package. Also remove obsolete ``Group``
2128 RPM tag.
2129 * Add the :mconfig:`term_width` configuration option to set the width of the
2130 output. This configuration option is set to ``0`` by default, which means
2131 that the output width is the full terminal width. The
2132 :option:`--width`/:option:`-w` command line switches are added to supersede
2133 the value of the configuration option. (fix issue #359 with contribution
2134 from Anaïs Gaertner)
2135 * Doc: add a *Get Modules* section in :ref:`INSTALL` document to provide
2136 download links for Modules' sources. (fix issue #387)
2137
2138
2139 .. _4.6 release notes:
2140
2141 Modules 4.6.1 (2020-11-14)
2142 --------------------------
2143
2144 * Lib: implement ``initStateClockSeconds`` as a Tcl command in
2145 libtclenvmodules to provide an optimized way to retrieve current Epoch time.
2146 * Lib: implement ``parseDateTimeArg`` as a Tcl command in libtclenvmodules to
2147 provide an optimized way to convert a datetime string into an Epoch time.
2148 * When full module specification is equal to ``@``, raise an error as no
2149 module name is provided. (fix issue #362)
2150 * Optimize internal recording of hidden module and tag specification when
2151 parsing modulerc files in order to reduce the time taken to test if a given
2152 module is hidden or if a given tag applies to it.
2153 * Script: add the ability to select the benchmark test to perform on
2154 :command:`mb` utility.
2155 * Doc: add *Use new features without breaking old module command* cookbook
2156 recipe
2157 * Doc: rework option description for :mfcmd:`module-hide` and
2158 :mfcmd:`module-forbid` commands in :ref:`modulefile(5)` document.
2159 * Doc: describe in :ref:`changes` document that shell special characters like
2160 backticks are escaped when used in values starting Modules 4.0. (fix issue
2161 #365)
2162 * Doc: make the ENVIRONMENT section from :ref:`modulefile(5)` man page point
2163 to the ENVIRONMENT section of :ref:`module(1)` man page.
2164 * Fix :subcmd:`clear` sub-command to unset the
2165 :envvar:`MODULES_LMSOURCESH<__MODULES_LMSOURCESH>` environment variable.
2166 (fix issue #367)
2167 * Correctly return on :subcmd:`avail` sub-command a symbolic version defined
2168 in a global RC file when specifically searched. (fix issue #368)
2169 * Fix module hiding resolution for symbolic versions defined in a global RC
2170 file when :mfcmd:`module-hide` statements are set in the modulepath where
2171 the modulefiles targeted by these symbols are located. (fix issue #369)
2172 * When a module fails to unload during a :subcmd:`purge` sub-command, preserve
2173 loaded the modules it requires to keep environment consistent. (fix issue
2174 #370)
2175 * Doc: add *Hide and forbid modules* cookbook recipe.
2176
2177
2178 Modules 4.6.0 (2020-09-16)
2179 --------------------------
2180
2181 * Rework internal state handling to gather all state definitions in a global
2182 array and use the same initialization and retrieval procedure, named
2183 ``getState``, for all these states.
2184 * Add the ``setState``, ``unsetState``, ``lappendState``, ``isStateDefined``
2185 and ``isStateEqual`` procedures to provide unified ways to set or check the
2186 value of state.
2187 * Introduce the :subcmd:`sh-to-mod` sub-command, to evaluate shell script and
2188 determine the environment changes it does. Corresponding modulefile
2189 content is outputted as a result. Changes on environment variables, shell
2190 aliases, shell functions and current working directory are tracked. The
2191 following shells are supported: sh, dash, csh, tcsh, bash, ksh, ksh93, zsh
2192 and fish.
2193 * Doc: add *Source shell script in modulefile* design notes.
2194 * Introduce the :mfcmd:`source-sh` modulefile command, to evaluate shell
2195 script and apply resulting environment changes through modulefile commands.
2196 When a modulefile using :mfcmd:`source-sh` modulefile command is loaded, the
2197 modulefile commands resulting from shell script evaluation are recorded in
2198 the :envvar:`MODULES_LMSOURCESH<__MODULES_LMSOURCESH>` environment variable
2199 to be able to undo these environment changes when modulefile is unloaded and
2200 to report the modulefile commands used when modulefile is displayed. The
2201 same kind of environment changes than the :subcmd:`sh-to-mod` sub-command
2202 are tracked. The same list of shells than :subcmd:`sh-to-mod` sub-command
2203 are supported. (fix issue #346)
2204 * Doc: add *Source shell script in modulefile* cookbook recipe.
2205 * Doc: embed new Modules logo on website, online README and documentation
2206 portal.
2207 * Install: disable by default the build of Modules compatibility version. From
2208 now on, option :instopt:`--enable-compat-version` has to be set to trigger
2209 this build.
2210 * Introduce the ``username`` sub-command to the :mfcmd:`module-info`
2211 modulefile command to get the username of the user currently running
2212 :file:`modulecmd.tcl` or to test a string passed as argument corresponds to
2213 this username.
2214 * Introduce the ``usergroups`` sub-command to the :mfcmd:`module-info`
2215 modulefile command to get all the groups of the user currently running
2216 :file:`modulecmd.tcl` or to test a string passed as argument corresponds to
2217 one of these groups.
2218 * Doc: improve markup of :ref:`NEWS` and :ref:`MIGRATING` documents starting
2219 from this 4.6 version to enable references to module sub-commands, command
2220 line switches, environment variables and modulefile Tcl commands.
2221 * Use inclusive terminology to eliminate *master* and *slave* terms as much as
2222 possible from code source and documentation.
2223 * Doc: use a versioned magic cookie in examples that demonstrate new
2224 modulefile features. (fix issue #349)
2225 * Introduce the :instopt:`--enable-multilib-support` configure option to add
2226 mechanism in :file:`modulecmd.tcl` to look at an alternative location to
2227 find the Modules Tcl extension library in case this library cannot be found
2228 at its main location.
2229 * Lib: remove *fetch_hidden* argument from ``getFilesInDirectory`` procedure
2230 of Modules Tcl extension library.
2231 * Doc: add *Hide or forbid modulefile* design notes.
2232 * Add the :mfcmd:`module-hide` modulefile command, to dynamically hide
2233 modulefile, module alias or symbolic version matching passed specification.
2234 When hidden, a modulefile, an alias or a symbolic version is not reported
2235 nor selected unless referred by its exact name, like for module whose name
2236 or version starts with a dot character. :mfcmd:`module-hide` supports the
2237 advanced module version specifiers. (fix issue #202)
2238 * Add option ``--soft`` to the :mfcmd:`module-hide` modulefile command to
2239 introduce a soften level of camouflage: modules targeted by such hide
2240 directive are made visible as soon as their root name is part of search
2241 query.
2242 * Add option ``--hard`` to the :mfcmd:`module-hide` modulefile command to
2243 introduce a hardened level of camouflage: modules targeted by such hide
2244 directive keep being hidden even if they are fully matched by search query.
2245 * Do not report among :subcmd:`whatis` search result the modulefiles with
2246 version name prefixed by a dot character and targeted by a symbolic version
2247 unless if they are precisely searched.
2248 * When a loading module has hidden alternative names (hidden due to their
2249 name or version starting with a dot character or because they match a
2250 :mfcmd:`module-hide` statement), these alternative names are not recorded in
2251 environment unless if they are not hard-hidden and if they have been used in
2252 query to select loading module.
2253 * On :subcmd:`avail` sub-command, remove hidden symbolic versions from the
2254 list to display along modulefile or directory they target, unless these
2255 symbols are not hard-hidden and are used in query to search modules.
2256 * When the :option:`--default` filter of :subcmd:`avail` sub-command is set,
2257 unhide all the *default* symbolic versions or modules targeted by these
2258 symbols unless if they are hard-hidden.
2259 * Define the *default* and *latest* automatic symbolic versions only if
2260 relative module name matches search query to ensure all elements for this
2261 module have been processed prior assigning the symbols.
2262 * In case a symbolic version is transitively applied toward a modulefile, like
2263 for instance when this symbol is first set onto a directory, record the
2264 resolution of each transitively applied symbol. By doing so, a module
2265 :subcmd:`load` tentative using the transitively applied symbolic version
2266 will now correctly resolve to the modulefile targeted by symbol.
2267 * Fix use of the advanced version specifiers in arguments to the
2268 :mfcmd:`is-avail` modulefile command.
2269 * Introduce the :option:`--all`/:option:`-a` option for :subcmd:`avail`,
2270 :subcmd:`aliases`, :subcmd:`whatis` and :subcmd:`search` sub-commands, to
2271 include in the search process all hidden modulefiles, module aliases or
2272 symbolic versions. Hard-hidden modules stay hidden even if
2273 :option:`--all`/:option:`-a` option is used.
2274 * Add the :mfcmd:`module-forbid` modulefile command, to dynamically forbid
2275 evaluation of modulefile matching passed specification. When forbidden, a
2276 module cannot be loaded and an access error is obtained when trying to
2277 evaluate them. :mfcmd:`module-forbid` supports the advanced module version
2278 specifiers.
2279 * Add ``--not-user`` and ``--not-group`` options to :mfcmd:`module-hide` and
2280 :mfcmd:`module-forbid` modulefile commands to ignore hiding or forbidding
2281 definition if current user is respectively part of specified username list
2282 or member of one of specified group list.
2283 * Add ``--before`` and ``--after`` options to :mfcmd:`module-hide` and
2284 :mfcmd:`module-forbid` modulefile commands to ignore hiding or forbidding
2285 definition respectively after and before a specified date time. Accepted
2286 date time format is ``YYYY-MM-DD[THH:MM]``.
2287 * Add ``--message`` option to :mfcmd:`module-forbid` modulefile command to
2288 supplement the error message obtained when trying to evaluate a forbidden
2289 module.
2290 * When a module that will soon be forbidden (as the date limit specified on
2291 the ``--after`` option of a matching :mfcmd:`module-forbid` command is near)
2292 is evaluated, warn user this module access will soon be denied.
2293 * The range of time the above warning appears can be controlled with the
2294 :mconfig:`nearly_forbidden_days` configuration option, whose value equals to
2295 the number of days prior the module starts to be forbidden. This
2296 configuration is set to ``14`` (days) by default and this value can be
2297 controlled at :file:`configure` time with
2298 :instopt:`--with-nearly-forbidden-days` option. When the
2299 :mconfig:`nearly_forbidden_days` configuration is set through the
2300 :subcmd:`config` sub-command, the :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS`
2301 environment variable is set.
2302 * Add ``--nearly-message`` option to :mfcmd:`module-forbid` modulefile command
2303 to supplement the warning message obtained when evaluating a nearly
2304 forbidden module.
2305 * Add the ``debug2`` verbosity level, to report each call of
2306 :file:`modulecmd.tcl` internal procedures in addition to debug messages.
2307 Debug2 mode can be enabled by setting the :mconfig:`verbosity` config to the
2308 ``debug2`` value or by using the :option:`-D` command-line switch twice.
2309 * Install: look for ``make`` rather ``gmake`` on MinGW and build library with
2310 a ``.dll`` extension on this platform.
2311 * Add the ``trace`` verbosity level, to report details on module searches,
2312 resolutions, selections and evaluations. Trace mode can be enabled by
2313 setting the ``verbosity`` config to the ``trace`` value or by using the
2314 :option:`-T`/:option:`--trace` command-line switches.
2315 * Introduce the ``tr`` key in the color palette to specifically render trace
2316 messages. Default value for ``tr`` key is ``2`` (decreased intensity).
2317 * When trying to set an environment variable to an empty value on the Windows
2318 platform, unset this environment variable instead to cope with the
2319 underlying OS behavior.
2320
2321
2322 .. _4.5 release notes:
2323
2324 Modules 4.5.4 (2026-09-07)
2325 --------------------------
2326
2327 * Init: fix command injection in Bash completion when module names contain
2328 shell meta-characters. Completion candidates were passed to ``compgen -W``
2329 which evaluates command substitution syntax. (fix `CVE-2026-85013`_ found
2330 by AISLE in partnership with Red Hat)
2331
2332
2333 Modules 4.5.3 (2020-08-31)
2334 --------------------------
2335
2336 * Install: take into account the ``--build``, ``--host``, ``--target``,
2337 ``--enable-dependency-tracking`` and ``--disable-dependency-tracking``
2338 configure options to transmit them to the :file:`configure` scripts of
2339 Modules Tcl extension library and Modules compatibility version. (fix issue
2340 #354)
2341 * Install: ignore some regular options of an Autoconf :file:`configure` script
2342 that are useless for this project but usually implied in build macros (like
2343 RPM ``%configure`` macro).
2344 * Install: ignore unsupported ``--enable-*`` and ``--with-*`` options on
2345 :file:`configure` script rather raise an error and add support to define
2346 environment variable and build system type as :file:`configure` script
2347 arguments to comply with `GNU configuration recommendations`_.
2348 * Install: fix :file:`modulecmd` pre-alternatives check in RPM spec file.
2349 * Install: use ``%make_build`` and ``%make_install`` macros in RPM spec file.
2350 * When :mfcmd:`module switch<module>` command is used in modulefile, do not
2351 state when processing it a conflict over switched-off module if its
2352 specification on the ``module switch`` command also matches switched-on
2353 module's specification. Allow this way the replacement of any loaded version
2354 of a module for a specific one required by currently loading module. (fix
2355 issue #355)
2356 * Correctly report failed attempts to load module requirements expressed with
2357 advanced version specifiers. (fix issue #356)
2358
2359 .. _GNU configuration recommendations: https://www.gnu.org/prep/standards/html_node/Configuration.html
2360
2361
2362 Modules 4.5.2 (2020-07-30)
2363 --------------------------
2364
2365 * Init: :subcmd:`list` and :subcmd:`source` sub-commands do not take available
2366 modules as argument in fish completion script.
2367 * Init: fix option list for :subcmd:`search` sub-command in bash completion
2368 script.
2369 * Fix double error counter increase when modulefile evaluation breaks.
2370 * Install: adapt :file:`configure` script to pass to the :file:`configure`
2371 script of Modules compatibility version only a subset of the options it
2372 supports (most commonly used options).
2373 * Install: raise an error when an unknown option is passed to
2374 :file:`configure` script rather silently ignore it. (fix issue #348)
2375 * Install: enable the definition of installation directory options of
2376 :file:`configure` script with the ``--option value`` syntax in addition to
2377 the ``--option=value`` syntax. (fix issue #348)
2378 * Doc: alphabetically sort sub-commands of :mfcmd:`module-info` modulefile Tcl
2379 command in :ref:`modulefile(5)` document.
2380 * Script: clean previously built environment-modules RPMs in :command:`mrel`.
2381 * Clearly separate quarantine variable definition from tclsh binary on
2382 :file:`modulecmd.tcl` evaluated command call in ``_module_raw`` function for
2383 *sh*, *bash*, *ksh* and *zsh* shells. (fix issue #350)
2384 * Doc: clarify in documentation index that Environment Modules should not be
2385 confused with language-specific modules. (contribution from Rob Hurt)
2386 * Adapt conflict detection tests to ensure a module loaded by its full
2387 pathname will not detect itself as a conflict when declaring a reflexive
2388 conflict. (fix issue #352)
2389 * Adapt the :command:`mrel` and :command:`mpub` commands to produce new
2390 Modules release from a *vZ.Y.x* git branch rather than from the repository
2391 main branch.
2392
2393
2394 Modules 4.5.1 (2020-06-01)
2395 --------------------------
2396
2397 * Install: consistently output Makefile warning messages on stderr.
2398 * Script: add the ``mrel`` script, that automates build of the Modules release
2399 files and performs tests over these distribution files to guaranty their
2400 correctness.
2401 * Script: add the ``mpub`` script, that automates Modules new release
2402 publishing over git repositories and websites.
2403 * Install: remove project-specific tools from git repository export thus from
2404 release distribution files.
2405 * Disable pager when ``clear`` sub-command is called from ``ml`` shortcut
2406 command. (fix issue #338)
2407 * In case a modulefile evaluation fails, environment context prior this failed
2408 evaluation is restored. Fix environment variable restoration mechanism to
2409 keep the link that monitors and updates environment variable array ``env``
2410 in every Tcl sub-interpreters. (fix issue #340)
2411 * Ensure environment variable change at the Tcl interpreter level is
2412 propagated to every sub-interpreters used to evaluate modulefiles or
2413 modulercs. (fix issue #342)
2414 * Use absolute path to load Modules Tcl extension library. (fix issue #344
2415 with contribution from Roy Storey)
2416 * Fix formatting of error stack trace not to look for internal commands to
2417 withdraw if start-up stack pattern cannot be matched.
2418
2419
2420 Modules 4.5.0 (2020-04-07)
2421 --------------------------
2422
2423 * Doc: fix typos and grammar mistakes on :ref:`module(1)`,
2424 :ref:`modulefile(5)` and :ref:`changes` documents. (contribution from Colin
2425 Marquardt)
2426 * Doc: update cookbook recipes to highlight code of the Tcl scripts included.
2427 (contribution from Colin Marquardt)
2428 * Doc: improve markup of :ref:`module(1)`, :ref:`modulefile(5)` and
2429 :ref:`changes` documents to enable references to module sub-commands,
2430 command line switches, environment variables and modulefile Tcl commands.
2431 (contribution from Colin Marquardt)
2432 * Doc: alphabetically sort module sub-commands, command-line switches,
2433 environment variables and modulefile Tcl commands in :ref:`module(1)` and
2434 :ref:`modulefile(5)` documents.
2435 * Introduce the ``ml`` command, a handy frontend to the ``module`` command.
2436 ``ml`` reduces the number of characters to type to trigger ``module``. With
2437 no argument ``ml`` is equivalent to ``module list``, ``ml mod`` corresponds
2438 to ``module load mod`` and ``ml -mod`` means ``module unload mod``. Multiple
2439 modules to either load or unload can be combined on a single command. ``ml``
2440 accepts all command-line switches and sub-commands accepted by ``module``
2441 command. ``ml`` command is defined by default. Its definition can be
2442 controlled at ``./configure`` time with :instopt:`--enable-ml` option or
2443 later on with :mconfig:`ml` configuration option (which defines
2444 ``MODULES_ML`` environment variable when set).
2445 * Fix module sub-command abbreviation match to ensure passed abbreviated
2446 form fully match sub-command, not only its minimal abbreviated form. As an
2447 example, ``lod`` or ``loda`` do not match anymore the ``load``
2448 sub-command, ``lo`` or ``loa`` still do.
2449 * Add the ``-j``/``--json`` command line switches to the ``avail``, ``list``,
2450 ``savelist``, ``whatis`` and ``search`` module sub-commands to render their
2451 output in `JSON`_ format. (fix issue #303)
2452 * Script: remove need to build project management-specific tools
2453 (``mtreview``, ``mb``, ``mlprof`` and ``playdemo``) prior using them.
2454 * Script: gather all distributed and maintained scripts in a ``script``
2455 directory at the root of the project repository tree.
2456 * Install: provide Windows-specific batch files when ``./configure`` option
2457 :instopt:`--enable-windows-support` is set. module command wrapper
2458 ``module.cmd`` is installed in ``bindir`` and initialization script
2459 ``cmd.cmd`` in ``initdir``. Those batch files are relocatable and expect
2460 ``modulecmd.tcl`` in ``..\libexec`` directory. (fix issue #272 with
2461 contribution from Jacques Raphanel)
2462 * Install: add ml command wrapper ``ml.cmd`` and install it in ``bindir`` when
2463 ``./configure`` option :instopt:`--enable-windows-support` is set.
2464 * Install: introduce envml command wrapper ``envml.cmd`` for Windows ``cmd``
2465 shell and install it in ``bindir`` when ``./configure`` option
2466 :instopt:`--enable-windows-support` is set. (contribution from Jacques
2467 Raphanel)
2468 * Doc: improve documentation portal index.
2469 * Install: add ``dist-win`` target to Makefile in order to build a
2470 distribution zipball containing the required files to run Modules on a
2471 Windows platform. ``INSTALL.bat`` and ``UNINSTALL.bat`` Windows batch files
2472 are introduced and shipped in the zipball to automate installation and basic
2473 configuration of Modules on the Windows platform.
2474 * Doc: update :ref:`INSTALL-win` document to describe how to install Modules
2475 with newly provided Windows-specific distribution zipball.
2476 * Install: enable build of Modules from ``git archive`` tarball or zipball
2477 exports (like download source archives automatically provided on GitHub
2478 project)
2479 * Install: ship reStructuredText and MarkDown source documents at the root of
2480 Modules distribution tarball rather their built txt counterpart.
2481 * Script: fix ``createmodule.sh`` script to correctly analyses environment
2482 when shell functions are found defined in it.
2483 * Script: inhibit output generated by scripts evaluated by ``createmodule.sh``
2484 and ``createmodule.py`` to ensure these outputs will not get in the way when
2485 analyzing the environment changes. (fix issue #309)
2486 * Correctly handle symbolic version target including a whitespace in their
2487 name.
2488 * Testsuite: output test error details whatever the testsuite run verbose
2489 mode.
2490 * Install: adapt configure script and Makefile to detect ``python`` command
2491 location and set it as shebang for ``createmodule.py`` and
2492 ``gitlog2changelog.py``. If ``python`` command is not found, ``python3``
2493 then ``python2`` are searched.
2494 * Install: enable to pass a specific Python interpreter command name or
2495 location at configure step with :instopt:`--with-python` option. Specified
2496 command name or location should be found on build system only if building
2497 from git repository.
2498 * Install: build ``createmodule.py`` script and install it in ``bindir``.
2499 * Install: update RPM spec file to explicitly define Python interpreter
2500 location.
2501 * Script: fix ``createmodule.py`` script for Python3 (fix issue #315 with
2502 contribution from Armin Wehrfritz)
2503 * Lift Perl variable strictness when defining ``_mlstatus`` variable in case
2504 ``modulecmd.tcl`` output is directly evaluated without use of the ``module``
2505 sub-routine in Perl script. (with contribution from Andrey Maslennikov)
2506 * Script: fix path de-duplication in ``createmodule.sh``. (fix issue #316)
2507 * Doc: add *Handling Compiler and other Package Dependencies* cookbook
2508 recipe, which discusses various strategies for creating modulefiles for
2509 packages with multiple builds depending on previously loaded compiler,
2510 MPI libraries, etc. (contribution from Tom Payerle)
2511 * Init: test availability of ``compopt`` Bash builtin prior using it in
2512 Bash completion script to avoid error with versions of this shell older
2513 than 4.0. (fix issue #318)
2514 * Install: adapt configure step to detect if ``sed`` option ``-E`` is
2515 supported and fallback to ``-r`` otherwise in shell completion scripts.
2516 (fix issue #317)
2517 * Add support for the ``NO_COLOR`` environment variable
2518 (https://no-color.org/) which when set (regardless of its value) prevents
2519 the addition of ANSI color. When set, ``NO_COLOR`` prevails over
2520 ``CLICOLOR`` and ``CLICOLOR_FORCE`` environment variables. ``MODULES_COLOR``
2521 overrides these three variables. (fix issue #310)
2522 * Script: when analyzing environment variable changes in ``createmodule.sh``
2523 applied by shell script passed as argument, produce a ``setenv`` modulefile
2524 statement for any variable found set prior script evaluation and for which
2525 value is completely changed after script evaluation. (fix issue #320)
2526 * When an error message is composed of multiple lines, render it in the same
2527 way whether it is part of a block message or not: lines after the first one
2528 are prepended with a 2-space padding. As a result error messages appear
2529 clearly separated from each other.
2530 * Append to the error message the error stack trace when a general unknown
2531 error occurs in ``modulecmd.tcl`` and provide a link to encourage users to
2532 report such error to the GitHub project.
2533 * Add to the error message the error stack trace for errors occurring during
2534 site-specific configuration evaluation. Error stack is expunged from the
2535 ``modulecmd.tcl`` internals to only report information relevant to
2536 site-specific configuration file.
2537 * When an error occurs during the evaluation of a modulefile or a modulerc,
2538 report associated error stack trace expunged from ``modulecmd.tcl`` internal
2539 references to only output useful information for users.
2540 * GitHub: add issue templates to guide people submitting a bug report or a
2541 feature request.
2542 * Doc: provide a link toward issues that have been fixed between versions 3.2
2543 and 4.0 in :ref:`changes` document.
2544 * Script: introduce ``envml.cmd`` script for Windows platform providing
2545 similar behavior than ``envml`` Bash script. (contribution from Jacques
2546 Raphanel)
2547 * Init: add Bash shell completion for the ``ml`` command. (contribution from
2548 Adrien Cotte)
2549 * Fix Fish shell stderr redirection for newer Fish versions. (fix issue #325)
2550 * Correctly handle modulefiles and modulepaths containing a space character in
2551 their name whether they are used from the command-line, in collections,
2552 within modulefiles or from loaded environment definitions.
2553 * Doc: add *Default and latest version specifiers* design note.
2554 * An ``avail`` search over a symbolic version targeting a directory now
2555 correctly returns the special modules (alias and virtual module) lying in
2556 this directory. (fix issue #327)
2557 * ``whatis`` and ``paths`` searches only return special modules (symbolic
2558 version, alias and virtual modules) that fully match search query, not
2559 those that partially match it. (fix issue #328)
2560 * alias and virtual module whose name mention a directory that does not
2561 exists are correctly handled. (fix issue #168)
2562 * Hide special modules (aliases, symbolic versions and virtual modules)
2563 whose version name starts with a dot character (``.``) from ``avail``,
2564 ``whatis`` and ``paths`` searches if their query does not fully match
2565 special module name. (fix issue #329)
2566 * Filter-out from the output of the ``aliases`` sub-command all hidden
2567 aliases, symbolic versions or hidden modules targeted by a non-hidden
2568 symbolic version. (fix issue #330)
2569 * Enable resolution of default module in module sub-directory when this
2570 default symbol targets a hidden directory (whose name starts with a dot
2571 character). (fix issue #331)
2572 * Doc: clarify hidden module location in :ref:`modulefile(5)` man page.
2573 * Install: define ``LD_PRELOAD`` as quarantine var along with
2574 ``LD_LIBRARY_PATH`` in RPM specfile.
2575 * When :mconfig:`implicit_default` and :mconfig:`advanced_version_spec`
2576 configuration are enabled, automatically define a ``default`` and ``latest``
2577 symbolic version for each module name (at each module depth for deep
2578 modules) if those version names does not already exist. (fix issue #210)
2579 * Once a module is loaded, the automatically defined symbols associated to it
2580 are recorded in loaded environment in the ``MODULES_LMALTNAME`` environment
2581 variable. They are distinguished from the other alternative names applying
2582 to the module by a ``as|`` prefix, which qualifies their *auto symbol* type.
2583 * When an advanced version specifier list contains symbolic version
2584 references, fix resolving to honor default version if part of the specified
2585 list. (fix issue #334)
2586
2587 .. _JSON: https://tools.ietf.org/html/rfc8259
2588
2589
2590 .. _4.4 release notes:
2591
2592 Modules 4.4.1 (2020-01-03)
2593 --------------------------
2594
2595 * Fix error and warning messages relative to dependency management to enclose
2596 dependency specification in single quotes to clearly distinguish
2597 specification from each other.
2598 * Skip output of module loading message if module is already loaded.
2599 * Doc: add demonstration material played at SC19 to promote the new features
2600 of Modules.
2601 * Contrib: add ``playdemo`` script to play recorded demonstration cast.
2602 * Doc: add a web anchor to each modulefile Tcl command, module sub-command
2603 and module environment variable documentation.
2604 * Install: update RPM spec file to enable build on ``el8``.
2605 * Doc: fix RST syntax for bullet lists in design docs. (fix issue #306)
2606 * In case ``module avail`` query does not match a directory but only its
2607 contained elements (for instance ``module av mod/7`` matches ``mod/7.1`` and
2608 ``mod/7.2`` but not ``mod/``), fix query processing to correctly return
2609 latest or default element in case ``--latest`` or ``--default`` flags are
2610 set.
2611 * In case a ``module avail`` query performed in a no-indepth mode with
2612 ``--latest`` or ``--default`` flags either enabled or disabled, fix query
2613 processing to return directory elements if they are part of result.
2614 * When a ``module avail`` query performed in no-indepth mode targets a virtual
2615 module, fix result to filter-out the directory holding the virtual module
2616 from result.
2617 * Fix ``module avail --default`` queries when modulefile default version does
2618 not match query: select latest version from modulefiles matching query
2619 unless ``implicit_default`` configuration is disabled in which case no
2620 default version is returned.
2621 * Improve highlighting of module ``avail`` and ``whatis`` search result by
2622 coloring module names matching search query expressed with the advanced
2623 version specifiers. ``name@1,3`` or ``name@1:3`` queries now highlight
2624 ``name/1`` and ``name/3`` strings found in search result.
2625 * Contrib: add the ``mlprof`` script which wraps ``modulecmd.tcl`` to collect
2626 profiling information on its execution.
2627 * Contrib: adapt ``mb`` script to profile ``modulecmd.tcl`` run tests rather
2628 bench them when ``profile`` argument is passed to the script.
2629 * Improve overall performances of module names and versions comparison by
2630 introducing optimized procedures and caching in memory module search
2631 results.
2632
2633
2634 Modules 4.4.0 (2019-11-17)
2635 --------------------------
2636
2637 * Doc: add *Return file basename on module-info name for full path modulefile*
2638 recipe to cookbook. (fix issue #297)
2639 * Rework internal handling of configuration options to gather all option
2640 definitions in a global array and use the same initialization and retrieval
2641 procedure, named ``getConf``, for all these options.
2642 * Add the ``setConf``, ``unsetConf`` and ``lappendConf`` procedures to provide
2643 unified ways to set the value of configuration option. These procedures
2644 should be used in site configuration files to override configuration option
2645 value instead of directly setting corresponding option variable as it was
2646 done in previous Modules releases.
2647 * Add the ability to match module specification in a case insensitive manner.
2648 Default case sensitiveness behavior is set at ``./configure`` time with the
2649 ``--with-icase`` option. It could be superseded with the ``MODULES_ICASE``
2650 environment variable, that could be set with ``config`` module sub-command
2651 through the ``icase`` option. Command-line switch ``--icase`` (``-i``)
2652 enables to supersede defined case sensitiveness configuration. (fix issue
2653 #212 with contribution from Eric Deveaud)
2654 * Introduce the extended default mechanism, to help selecting a module when
2655 only the first numbers in its version are specified. Starting portion of the
2656 version, part separated from the rest of the version string by a ``.``
2657 character, will get matched to the appropriate complete version name. In
2658 case multiple versions match partial version specified and only one module
2659 should be returned, default version (implicit or explicit) among matches is
2660 returned. In case ``implicit_default`` option is disabled and no explicit
2661 default is found among matches, an error is returned. This mechanism is
2662 enabled through a new configuration option named ``extended_default`` (which
2663 defines ``MODULES_EXTENDED_DEFAULT`` environment variable when set). It may
2664 be enabled by default in ``modulecmd.tcl`` script with option
2665 ``--enable-extended-default`` passed to the ``./configure`` script.
2666 * Introduce the advanced module version specifiers mechanism to specify finer
2667 constraints on module version. This new feature enables to filter the module
2668 selection to a given version list or range by specifying after the module
2669 name a version constraint prefixed by the ``@`` character. It leverages the
2670 version specifier syntax of the `Spack`_ package manager. A single version
2671 can be specified with the ``@version`` syntax, a list of versions with
2672 ``@version1,version2,...``, a greater than or equal to range with
2673 ``@version1:`` syntax, a less than or equal to range with ``@:version2`` and
2674 an in between or equal to range with ``@version1:version2`` syntax. In case
2675 ``implicit_default`` option is disabled and no explicit default is found
2676 among version specifier matches, an error is returned. This mechanism is
2677 enabled through a new configuration option named ``advanced_version_spec``
2678 (which defines ``MODULES_ADVANCED_VERSION_SPEC`` environment variable when
2679 set). It may be enabled by default in ``modulecmd.tcl`` script with option
2680 ``--enable-advanced-version-spec`` passed to the ``./configure`` script.
2681 * Conflict defined with a generic module name or an advanced version specifier
2682 may match multiple loaded modules (generally in case multiple loaded modules
2683 share same root name). Loaded environment analysis has been fixed to bind
2684 conflict to all loaded modules matching it. As a result the *Dependent
2685 Reload* mechanism is not triggered when one loaded module matching conflict
2686 is removed if another loaded module still match the conflict.
2687 * Doc: add *Module selection contexts*, *Insensitive case*, *Extended default*
2688 and *Advanced module version specifiers* design notes.
2689 * Make ``MODULESHOME`` environment variable controllable through the
2690 ``config`` sub-command with ``home`` configuration option. A
2691 ``--with-moduleshome`` argument is also added to the ./configure script to
2692 set specific default value for this option at installation time. (fix issue
2693 #292)
2694
2695 .. _Spack: https://github.com/spack/spack
2696
2697
2698 .. _4.3 release notes:
2699
2700 Modules 4.3.1 (2019-09-21)
2701 --------------------------
2702
2703 * Contrib: add ``mb`` script to bench Modules versions.
2704 * Correct ``modulecmd.tcl`` script startup to correctly report error in case
2705 Tcl extension library fails to load. (fix issue #284)
2706 * Install: fix typo on ``CFLAGS`` definition in ``lib/Makefile``. (fix issue
2707 #287 with contribution from Felix Neumärker)
2708 * Remove useless code in Modules Tcl extension library
2709 * Make URLs in README correctly rendered in HTML. (contribution from Per
2710 Persson)
2711 * Doc: clarify modulefile evaluation modes in modulefile.4 man page. (fix
2712 issue #289)
2713 * When looking at the closest match among loaded modules when switching module
2714 with just a single module argument specified, load the information on the
2715 currently set environment to get the alternative names of loaded modules
2716 prior to look at closest module match. (fix issue #290)
2717 * Doc: describe the way to determine the site-specific configuration script
2718 location in cookbook recipes implying the installation of such a file. (fix
2719 issue #266)
2720 * Doc: add *Log module command* recipe to cookbook. (fix issue #283)
2721 * Doc: add *Expose procedures and variables to modulefiles* recipe to
2722 cookbook.
2723 * Doc: add *Make defined modulepaths persist over sudo* recipe to cookbook.
2724 * Doc: add *Ensure user fully qualify the modules they use* recipe to
2725 cookbook.
2726 * Introduce the ``wa_277`` configuration option to workaround an issue with
2727 Tcsh history mechanism. Default ``module`` alias definition for Tcsh hits
2728 an issue with shell history mechanism: erroneous history entries are
2729 recorded each time the ``module`` command is called. When ``wa_277`` option
2730 is enabled (which sets the ``MODULES_WA_277`` environment variable to *1*),
2731 an alternative module alias is defined which fixes the history mechanism
2732 issue. However the alternative definition of the module alias weakens shell
2733 evaluation of the code produced by modulefiles. Characters with special
2734 meaning for Tcsh shell (like *{* and *}*) may not be used anymore in shell
2735 alias definition elsewhere the evaluation of the code produced by
2736 modulefiles will return a syntax error. (fix issue #277)
2737 * Doc: add *Tips for Code Reuse in Modulefiles* recipe to cookbook.
2738 (contribution from Tom Payerle)
2739 * Fix the ``whatis`` and ``paths`` sub-command results for module symbolic
2740 versions targeting a directory when ``implicit_default`` configuration
2741 option is disabled. No error is returned and same result is now obtained
2742 whether the symbolic name or its target is used as argument for those two
2743 sub-commands. (fix issue #294)
2744 * Fix the ``whatis`` and ``paths`` sub-command results for module aliases
2745 targeting a directory when ``implicit_default`` configuration option is
2746 disabled. No error is returned and same result is now obtained whether the
2747 alias name or its target is used as argument for those two sub-commands.
2748 (fix issue #295)
2749 * Rework all the ternary operator expressions in ``modulecmd.tcl`` that may
2750 result in a *nan* value (whatever the case used to write this string) as the
2751 ``expr`` Tcl command raises an error when it returns such a value, which
2752 breaks Modules as soon as a modulefile, an alias or a symbolic version is
2753 named *nan*. (fix issue #296)
2754
2755
2756 Modules 4.3.0 (2019-07-26)
2757 --------------------------
2758
2759 * Introduce Vim addon files to highlight the modulefile syntax. Installation
2760 of these files, which is enabled by default, is controlled by the
2761 ``--enable-vim-addons`` and ``--vimdatadir`` configure options.
2762 (contribution from Felix Neumärker)
2763 * If modulefile is fully read, cache the content read and the file header
2764 computed to avoid another file read if the same modulefile need to be read
2765 multiple times.
2766 * Except for path, paths, list, avail and aliases module commands always fully
2767 read a modulefile whether its full content is needed or just its header to
2768 verify its validity. Proceed this way to only read file once on commands
2769 that first just check modulefile validity then read again valid files to get
2770 their full content.
2771 * Introduce Modules Tcl extension library (written in C) to extend Tcl
2772 language in order to provide more optimized I/O commands to read a file or a
2773 directory content than native Tcl commands do.
2774 * Install: add ``--libdir``, ``--enable-libtclenvmodules``, ``--with-tcl`` and
2775 ``--with-tclinclude`` options to configure script to control
2776 libtclenvmodules build and installation.
2777 * When an error is caught during modulecmd.tcl first initialization steps,
2778 ensure the error report facility is initialized to render error message.
2779 * When looking for modulefiles in enabled modulepaths, take ``.modulerc`` file
2780 found at the root of a modulepath directory into account. Which means these
2781 rc files are now evaluated like global rc files and can be used to define
2782 module aliases targeting modulefiles stored in the underlying file tree.
2783 * Correctly get available default (-d) and latest (-L) version whether search
2784 pattern is passed with an ending forward slash character or not or if it
2785 contains a ``*`` wildcard character.
2786 * Append a forward slash character to any directory result of an avail command
2787 to better distinguish these directories from regular files.
2788 * Introduce the ability to control whether ``avail`` command search results
2789 should recursively include or not modulefiles from directories matching
2790 search query by use of the ``--indepth`` and ``--no-indepth`` command-line
2791 switches or the environment variable ``MODULES_AVAIL_INDEPTH``. Default
2792 behavior is set at the ``./configure`` time with the
2793 ``--enable-avail-indepth`` and ``--disable-avail-indepth`` switches. (fix
2794 issue #150)
2795 * Update ``bash``, ``fish`` and ``zsh`` completion scripts to propose
2796 available modulefiles in the no in depth mode.
2797 * Add the ability to graphically enhance some part of the produced output to
2798 improve readability by the use of the ``--color`` command-line switch or the
2799 ``MODULES_COLOR`` environment variable. Both accept the following values:
2800 ``never``, ``auto`` and ``always``. When color mode is set to ``auto``,
2801 output is colored if stderr is attached to a terminal. Default color mode
2802 could be controlled at configure time with the ``--enable-color`` and the
2803 ``--disable-color`` option, which respectively correspond to the ``auto``
2804 and ``never`` color mode.
2805 * Control the color to apply to each element with the ``MODULES_COLORS``
2806 environment variable or the ``--with-dark-background-colors`` and
2807 ``--with-light-background-colors`` configure options. These variable and
2808 options take as value a colon-separated list in the same fashion
2809 ``LS_COLORS`` does. In this list, each element that should be highlighted is
2810 associated to a Select Graphic Rendition (SGR) code.
2811 * Inform Modules of the terminal background color with the
2812 ``MODULES_TERM_BACKGROUND`` environment variable or the
2813 ``--with-terminal-background`` configure option, which helps to determine if
2814 either the dark or light background colors should be used to color output in
2815 case no specific color set is defined with the ``MODULES_COLORS``.
2816 * Color prefix tag of debug, error, warning, module error and info messages.
2817 * Highlight the modulefile or collection name when reporting messages for a
2818 an action made over this modulefile or collection.
2819 * Color the modulepaths reported on a ``use`` command.
2820 * Highlight title of separator lines or column name of table header.
2821 * Color modulepaths, directories, aliases and symbols reported by the
2822 ``avail``, ``aliases``, ``list``, ``whatis`` and ``search`` commands.
2823 * When color mode is enabled and module aliases are colored, do not associate
2824 them a ``@`` tag as the color already distinguish them from regular
2825 modulefile.
2826 * When color mode is enabled and a Select Graphic Rendition (SGR) code is set
2827 for the ``default`` modulefile symbol, apply this SGR code to the modulefile
2828 name instead of associating it the ``default`` symbol tag.
2829 * Highlight matched module search query string among ``avail``, ``whatis`` and
2830 ``search`` command results.
2831 * Highlight the modulefile and collection full path name on ``display``,
2832 ``help``, ``test`` and ``saveshow`` command reports.
2833 * Color modulefile Tcl commands set in a modulefile on a ``display`` command
2834 report.
2835 * Color module commands set in a collection on a ``saveshow`` command report.
2836 * Re-introduce ``clear`` sub-command. (fix issue #203)
2837 * Leverage ``--force`` command-line switch on ``clear`` sub-command to skip
2838 confirmation dialog. (fix issue #268)
2839 * Init: improve readability of variable definition operations by writing one
2840 definition operation per line rather having multiple commands on a single
2841 line like ``VAR=val; export VAR``. (fix issue #225)
2842 * Add the ability to define a site-specific configuration file with an
2843 environment variable: ``MODULES_SITECONFIG``. When set, the script file
2844 pointed by the variable is sourced (if readable) after the site-specific
2845 configuration file initially defined in ``modulecmd.tcl``. (contribution
2846 from Ben Bowers, fix issue #234)
2847 * Doc: add description in the module.1 man page of ``MODULERCFILE`` in the
2848 environment section and ``siteconfig.tcl`` in the files section.
2849 * Install: provide at installation time a bare site-specific configuration
2850 script in designated ``etcdir`` if no pre-existing ``siteconfig.tcl`` file
2851 is found at designated location.
2852 * Introduce the ``config`` sub-command to get and set ``modulecmd.tcl``
2853 options and to report its current state.
2854 * Contrib: update ``createmodule.py`` script to support execution from the
2855 *cmd* shell. (contribution from Jacques Raphanel, fix issue #270)
2856 * Add the ability to configure when unloading a module and multiple loaded
2857 modules match request if firstly loaded module should be chosen or lastly
2858 loaded module. Configure option ``--with-unload-match-order`` defines this
2859 setting which can be superseded with the ``MODULES_UNLOAD_MATCH_ORDER``
2860 environment variable. This variable can be set with the option
2861 ``unload_match_order`` on the ``config`` sub-command. By default, lastly
2862 loaded module is selected. It is recommended to keep this behavior when the
2863 modulefiles used express dependencies between each other.
2864 * Add the ability to configure whether an implicit default version should be
2865 defined for modules with no default version explicitly defined. When
2866 enabled, which stays the default behavior, a module version is automatically
2867 selected (latest one) when the generic name of the module is passed. When
2868 implicit default selection is disabled, the name of modules to evaluate
2869 should be fully qualified elsewhere an error is returned. This option is set
2870 at ``./configure`` time with the ``--enable-implicit-default`` and
2871 ``--disable-implicit-default`` options. It could be superseded with the
2872 ``MODULES_IMPLICIT_DEFAULT`` environment variable, that could be set with
2873 ``config`` module sub-command through the ``implicit_default`` option.
2874 * Install: add to the configure script the ``--with-locked-configs`` option to
2875 ignore environment variable superseding of Modules configurations defined in
2876 ``modulecmd.tcl`` script. Lockable configuration option are
2877 ``extra_siteconfig`` and ``implicit_default``. Currently locked options are
2878 reported through the ``locked_configs`` option on the ``config``
2879 sub-command.
2880 * Introduce the ability to control the module search match. Search query
2881 string should match module name start or any part of module fully qualified
2882 name. Default search match behavior is set at ``./configure`` time with the
2883 ``--with-search-match`` option. It could be superseded with the
2884 ``MODULES_SEARCH_MATCH`` environment variable, that could be set with
2885 ``config`` module sub-command through the ``search_match`` option.
2886 Command-line switches ``--starts-with`` (``-S``) and ``--contains`` (``-C``)
2887 for ``avail`` module sub-command enable to supersede defined search match
2888 configuration.
2889 * Introduce the ability not to set the shell startup file that ensure
2890 ``module`` command is defined once shell has been initialized. Setting shell
2891 startup file currently means defining ``ENV`` and ``BASH_ENV`` environment
2892 variables to the Modules bourne shell initialization script. ``./configure``
2893 options ``--enable-set-shell-startup`` and ``--disable-set-shell-startup``
2894 define if shell startup should be set or not by default. It could be
2895 superseded with the ``MODULES_SET_SHELL_STARTUP`` environment variable, that
2896 could be set with ``config`` module sub-command through the
2897 ``set_shell_startup`` option.
2898 * Cookbook: add the *test-modulefiles* recipe. (fix issue #182 with
2899 contribution from Colin Marquardt)
2900 * Fix location of global RC file to ``@etcdir@/rc`` instead of
2901 ``@prefix@/etc/rc`` to cope with ``@etcdir@`` specific setup (``@etcdir@``
2902 defaults to ``@prefix@/etc``).
2903 * Take into account Modules initialization configurations found in ``etc``
2904 directory if they exist rather in ``init`` directory. If ``initrc``
2905 configuration file is found in ``etcdir`` then it is preferred over
2906 ``modulerc`` file in ``initdir``. Following the same trend, ``modulespath``
2907 configuration file is found in ``etcdir`` then it is preferred over
2908 ``.modulespath`` file in ``initdir``.
2909 * Introduce the ability to install the Modules initialization configuration
2910 files in the ``etcdir`` rather than in the ``initdir``. A new configure
2911 option is introduced for this task: ``--with-initconf-in``. Accepted values
2912 for this option are: ``etcdir`` or ``initdir`` (default).
2913 * Add the ``--enable-modulespath`` configure option, which is an alias for the
2914 ``--enable-dotmodulespath`` option as ``.modulespath`` configuration file is
2915 named ``modulespath`` when installed in ``etcdic``.
2916 * Install: update RPM spec file to disable ``set_shell_startup`` option by
2917 default, set ``/etc/environment-modules`` as configuration directory and
2918 store Modules initialization configuration files in it.
2919 * Report an error when a module load or unload evaluation aborts due to the
2920 use of the ``break`` or ``exit`` modulefile commands. This error
2921 notification clarifies that module evaluation failed. (fix issue #267)
2922 * Remove the message block display output for the ``reload``, ``purge`` and
2923 ``restore`` sub-commands to preserve this output style for modulefile
2924 evaluation modes (load, unload and switch) and thus clarify understanding.
2925 * When unloading a module that contains a ``module load`` or ``module switch``
2926 modulefile command, inhibit the unload performed of the useless requirement
2927 when auto_handling mode is disabled if currently performing a ``purge``,
2928 ``reload`` or ``restore`` sub-command. As the unload sequence is determined
2929 and managed from these top commands.
2930 * Add ability to control module command message verbosity with configuration
2931 option. Introduced verbosity levels from the least to the most verbose are
2932 ``silent``, ``concise``, ``normal``, ``verbose`` and ``debug``. This option
2933 could be set at ``./configure`` time with ``--with-verbosity`` option.
2934 It could be superseded with the ``MODULES_VERBOSITY`` environment variable,
2935 that could be set with ``config`` module sub-command through the
2936 ``verbosity`` option. Silent, verbose and debug verbosity modes can be set
2937 at the command-line level respectively with ``--silent``/``-s``,
2938 ``--verbose``/``-v`` and ``--debug``/``-D`` command-line switches. (fix
2939 issue #204)
2940 * When verbosity level is ``normal`` or higher, reports every module loads or
2941 unloads performed to ``restore`` a collection or ``source`` a scriptfile,
2942 even if there is no specific message to output for these module evaluations.
2943 Clarifies what module evaluations have been triggered by these sub-commands.
2944 * Also honor the ``CLICOLOR`` and ``CLICOLOR_FORCE`` environment variables to
2945 define color mode. (fix issue #279)
2946
2947
2948 .. _4.2 release notes:
2949
2950 Modules 4.2.5 (2019-07-08)
2951 --------------------------
2952
2953 * Correctly escape ``?`` character in shell alias. (fix issue #275)
2954 * When resolving the enabled list of modulepaths, ensure resolved path
2955 entries are unique. (fix issue #274)
2956 * Right trim '#' characters from the fetched modulefile magic cookie string
2957 to ensure a correct compatibility version comparison. Useful when modulefile
2958 first line is equal to ``#%Module4.2##############``.
2959 * Fix argument parsing for the ``append-path``, ``prepend-path`` and
2960 ``remove-path`` modulefile commands to consider every arguments found after
2961 the variable name as variable values and not command option even if argument
2962 starts with ``-`` character. (fix issue #278)
2963 * Fix automatic loading of modulefiles when multiple module names are set on a
2964 single ``module load`` modulefile command. When auto_handling mode was
2965 disabled, the load of not loaded modules was not achieved as soon as some
2966 modules on this list were already loaded. (fix issue #281)
2967
2968
2969 Modules 4.2.4 (2019-04-26)
2970 --------------------------
2971
2972 * Better track each module evaluation and the context associated to it in
2973 order to report a more accurate information on the additional modules
2974 loaded or unloaded when proceeding the main evaluation request. (fix issue
2975 #244, #245, #246, #247 and #248)
2976 * Doc: preserve quotes and dashes when making HTML docs. (fix issue #250 with
2977 contribution from Riccardo Coccioli)
2978 * Fix hanging ``list`` sub-command when terminal width is equal to the single
2979 column text width to be printed. (contribution from Jesper Dahlberg)
2980 * During an additional evaluation triggered by an automated module handling
2981 mechanism, ensure warning and error messages are reported under the message
2982 block of the main evaluation. (fix issue #252)
2983 * During the unload of a module when the automated module handling mode is
2984 disabled, report a warning message for each unload of a useless requirement
2985 that fails as done when the automated module handling mode is enabled. (fix
2986 issue #253)
2987 * When multiple modules are listed on a ``prereq`` command, drop the output of
2988 those modules that fails to load (by the *Requirement Load* automated
2989 mechanism) to only keep the output of the module whose load succeed. (fix
2990 issue #254)
2991 * Fix ``switch`` sub-command when the switched-off module cannot be unloaded
2992 when other loaded modules depend on it. Whole switch process is failed and
2993 no load of the switched-on module is attempted. (fix issue #251)
2994 * When switching modules, report failure of switched-off module unload or
2995 switched-on module load under the message block of the switch action. A
2996 failed switched-off module unload is reported as an error, as it aborts the
2997 switch evaluation, whereas a failed switched-on module load is reported as a
2998 warning. (fix issue #255)
2999 * When a module requirement is seen missing but the load of this module was
3000 attempted, report a more specific error or warning message to let user
3001 understand that the load of the requirement was attempted but failed. (fix
3002 issue #257)
3003 * When loading a module, report any missing requirement on the message
3004 reporting block corresponding to this module load. This warning or error
3005 message comes in addition to the eventual *Requirement Load* message
3006 reported under the message block of the main evaluation. (fix issue #258)
3007 * When unloading a module which has some dependent module still loaded,
3008 produce a more specific error or warning message if an evaluation of these
3009 dependent modules has been realized or if the unload of the required module
3010 is forced. (fix issue #259)
3011 * When a conflicting module is seen loaded but the unload of this module was
3012 attempted, report a *Conflict Unload* error or warning message toward the
3013 main evaluation message block. (fix issue #261)
3014 * When loading a module, report any loaded conflict on the message reporting
3015 block corresponding to this module load. This warning or error message comes
3016 in addition to the eventual *Conflict Unload* message reported under the
3017 message block of the main evaluation. (fix issue #261)
3018 * Correctly report loading state of conflicting module. (fix issue #262)
3019 * Adapt warning, error and info messages relative to the *Dependent Reload*
3020 mechanism to distinguish the unload phase from the load (reload) phase of
3021 this mechanism. In the automated module handling summary report, unloaded
3022 modules via this mechanism are reported in the *Unloading dependent* list
3023 and modules reloaded afterward are reported against the *Reloading
3024 dependent* list. (fix issue #263)
3025 * When the automated module handling mode is disabled, do not attempt to load
3026 a requirement expressed in a modulefile with a ``module load`` command, if
3027 this requirement is already loaded or loading.
3028 * Skip load or unload evaluation of a module whose respectively load or unload
3029 was already attempted but failed. If this second evaluation attempt occurs
3030 within the same main evaluation frame. (fix issue #264)
3031 * When reloading modules through the *Dependent Reload* automated mechanism,
3032 prevent modules to automatically load of other modules with the ``module
3033 load`` modulefile command, as it is done for the ``prereq`` command. (fix
3034 issue #265)
3035 * Raise an error when an invalid option is set on ``append-path``,
3036 ``prepend-path`` or ``remove-path`` modulefile command. (fix issue #249)
3037 * Zsh initializes by default the ``MANPATH`` environment variable to an empty
3038 value when it starts. To preserve ``manpath`` system configuration even
3039 after addition to this variable by modulefiles, set ``MANPATH`` variable to
3040 ``:`` if found empty. (improve fix for issue #224)
3041 * Doc: provide a short installation guideline in README file. (fix issue #230)
3042
3043
3044 Modules 4.2.3 (2019-03-23)
3045 --------------------------
3046
3047 * Add all the module dependency-related internal information to those saved
3048 prior a modulefile evaluation in order to correctly restore internal state
3049 in case modulefile evaluation fails.
3050 * Init: in shell initialization scripts, initialize ``MANPATH`` if not set
3051 with a value that preserves ``manpath`` system configuration even after
3052 addition of paths to this variable by modulefiles. (fix issue#224)
3053 * Enable to define an entire path entry to the ``MODULEPATH`` variable which
3054 corresponds to a variable reference only. (fix issue#223)
3055 * Cookbook: add the *modulefiles-in-git* recipe. (contribution from Scott
3056 Johnson)
3057 * When ``module switch`` commands are found in modulefiles, track switched-off
3058 modulefile as a conflict and switched-to modulefile as a requirement to
3059 apply same behaviors than for ``module load`` and ``module unload`` commands
3060 in modulefiles. If ``module switch`` has only one argument, do not define a
3061 conflict toward switched-off modulefile. *CAUTION: it is not recommended to
3062 use module switch command in modulefiles*. (fix issue#229)
3063 * When unloading a module, revert ``module switch`` commands found in
3064 modulefile: switched-on module is converted to a ``module unload``, like for
3065 ``module load`` command. Nothing is done for switched-off module, like for
3066 ``module unload`` command. (fix issue#226)
3067 * For default element in a modulefile directory which is a module alias that
3068 points to a modulefile, when this modulefile is loaded, it receives as
3069 alternative names the eventual module aliases set on the distant directory
3070 holding the alias pointing to it. (fix issue#231)
3071 * When unloading a module that contains ``module load`` or ``module switch``
3072 commands in its modulefile, select for unload the automatically loaded
3073 requirement module which has been loaded prior its dependent. (fix
3074 issue#232)
3075 * Doc: describe Emacs settings useful for adhering to coding conventions in
3076 CONTRIBUTING guide. (fix issue #233 with contribution from Ben Bowers)
3077 * When looking for a loaded or loading dependency requirement, select among
3078 the eventual multiple candidates the closest match to the dependent module.
3079 * During the unload of a module, if the unload of one of its dependent (by the
3080 *Dependent Unload* mechanism) fails, abort the whole unload process.
3081 Exception made if the force mode is enabled. In this case failing module
3082 stays loaded and the *Dependent Unload* mechanism continues with next module
3083 to unload.
3084 * During the unload of a module, if the unload of one of its useless
3085 requirements (by the *Useless Requirement Unload* mechanism) fails, keep the
3086 requirements of this failing module loaded. Such error is reported as a
3087 warning and it does not stop the whole unload process. (fix issue#240)
3088 * During the load or the unload of a module, if the unload of one of its
3089 dependent (by the *Dependent Reload* mechanism) fails, abort the whole
3090 unload or load process. Exception made if the force mode is enabled. In this
3091 case failing module stays loaded and *Dependent Reload* mechanism continues
3092 with next module to unload. This failing module is removed from the
3093 *Dependent Reload* list, so it will not take part of the load phrase of the
3094 mechanism. (fix issue#239)
3095 * During the load or the unload of a module, if the load of one of its
3096 dependent (by the *Dependent Reload* mechanism) fails, abort the whole
3097 unload or load process. Exception made if the force mode is enabled. In this
3098 case failing module stays loaded and *Dependent Reload* mechanism continues
3099 with next module to load. When the mechanism is applied during a ``switch``
3100 command, force mode is enabled by default on the load phase. (fix issue#241)
3101 * When reloading all loaded modules with the ``reload`` sub-command, if one
3102 reloading module fails to unload or load, abort the whole reload process to
3103 preserve environment sanity. (fix issue#237)
3104 * During the unload of a module when the automated module handling mode is
3105 disabled and this module declares its requirements with the ``module load``
3106 modulefile command. If the unload of one of its useless requirements (by the
3107 *Useless Requirement Unload* mechanism) fails, whole unload process is not
3108 aborted and continue with next module to unload. (fix issue#238)
3109 * Contrib: add ``mtreview`` utility script that analyzes test suite log file
3110 to compare actual and expected output of failed test. ``mt`` does not output
3111 the full test suite logs anymore but only the information produced by
3112 ``mtreview`` on failed tests.
3113 * Install: exclude Continuous Integration configurations from dist tarballs.
3114
3115
3116 Modules 4.2.2 (2019-02-17)
3117 --------------------------
3118
3119 * Correct the *Dependent Unload* mechanism when it triggers the unload of 2
3120 modules making together a requirement from another module. This module is
3121 now also added to the dependent modules to unload.
3122 * Doc: add a cookbook section in the documentation and port there the 3
3123 pre-existing recipes: *inhibit-report-info*, *top-priority-values* and
3124 *unload-firstly-loaded*.
3125 * Doc: add a CONTRIBUTING guide.
3126 * Doc: fix a typo on the Python initialization example in module man page.
3127 * Doc: add a FAQ entry to describe the use of module from Makefile. (with
3128 contribution from Robert McLay)
3129 * Trim any white-space, newline or ``;`` characters at the beginning or end of
3130 the function body passed to set-function modulefile command.
3131 * Init: add recognition of the ``--auto``, ``--no-auto`` and ``--force``
3132 command-line switches in fish shell completion script.
3133 * Init: add recognition of the ``--auto``, ``--no-auto``, ``--force``,
3134 ``--paginate`` and ``--no-pager`` command-line switches in zsh shell
3135 completion script.
3136 * When the load of a modulefile is asked but a conflict is registered against
3137 this modulefile by an already loaded module, the load evaluation is now
3138 performed and the conflict is checked after this evaluation. If the conflict
3139 is still there, this evaluation (and the evaluation of its requirements) is
3140 rolled back. (fix issue#216)
3141 * Init: fix ``_module_not_yet_loaded`` alias in tcsh completion script to
3142 handle situation when ``noclobber`` variable is set. Also ensure actual
3143 ``rm`` command is called and not an alias. (fix issue#219)
3144 * Fix warning message when the load of a modulefile is forced over a reflexive
3145 conflict (message was reported twice).
3146 * When looking at the dependency of a loaded module, only consider requirement
3147 loaded before dependent module (holding a prior position in the loaded
3148 module list) as valid. Those loaded after dependent module are considered as
3149 an unmet dependency thus they are not taking part in the *Dependent Unload*,
3150 the *Useless Requirement Unload* and the *Dependent Reload* mechanisms.
3151
3152
3153 Modules 4.2.1 (2018-11-11)
3154 --------------------------
3155
3156 * Cookbook: add the *inhibit-report-info* recipe.
3157 * Cookbook: port *unload-firstly-loaded* and *top-priority-values* recipes to
3158 v4.2.
3159 * Init: fix listing of loaded modules for *fish* and *tcsh* shell completions.
3160 * Init: fix saved collection listing when no collection found for *bash*,
3161 *zsh*, *tcsh* and *fish* shell completions.
3162 * Adapt ``system`` modulefile Tcl command to execute the command passed as
3163 argument through shell, like it is performed on compatibility version. (fix
3164 issue#205)
3165 * Correctly filter modulefile search memory cache entries when using a full
3166 search result to search later on a specific modulefile.
3167 * Prefix debug messages by information on the current modulefile or modulerc
3168 interpreter if any.
3169 * Init: fix listing of loaded modules on unload and switch sub-commands for
3170 *bash* shell completion.
3171 * Refrain ``module unload`` modulefile command from unloading a module
3172 required by another loading module.
3173 * Enable ``is-loaded`` modulefile Tcl command in modulerc interpretation
3174 context, like done on compatibility version. (fix issue#207)
3175 * Check a required module is not already loading before attempting to load it.
3176 Helps to handle cyclic dependencies.
3177 * Compute loaded modules requirement dependency relations without cycle and
3178 consider the module closing the cycle in a constraint violation state to
3179 avoid reloading loops on the *Dependent Reload* mechanism.
3180 * Safely unset dependency reference when computing dependency relations as
3181 some dependencies expressed may target same module.
3182 * Ensure a loaded module matching multiple entries of a same *or* ``prereq``
3183 will just be considered as one module matching this requirement.
3184 * Init: quote prompt in *csh* and *tcsh* script with ``:q`` rather double
3185 quotes to accommodate prompts with embedded newlines. (fix issue#209 with
3186 contribution from Satya Mishra)
3187 * Init: skip shell environment alteration if ``autoinit`` command fails. (fix
3188 issue#208)
3189 * Reword path-like variable element counter reference handling to simply
3190 ignore the counter values not coherent with the content of related
3191 path-like variable. (fix issue#206)
3192
3193
3194 Modules 4.2.0 (2018-10-18)
3195 --------------------------
3196
3197 * Add ``chdir`` and ``puts`` environment settings to the per-modulefile
3198 evaluation saved context. So previous values of these settings are restored
3199 in case of evaluation failure.
3200 * Fix save and restore of ``x-resource`` environment settings on the
3201 per-modulefile evaluation context.
3202 * Use the correct warning procedure to report the full reference counter
3203 inconsistency message (so this message is fully inhibited during global
3204 ``whatis`` evaluations).
3205 * Make ``append-path``, ``prepend-path``, ``remove-path`` and ``unsetenv``
3206 commands alter ``env`` Tcl global array during ``display``, ``help``,
3207 ``test`` or ``whatis`` evaluation modes. Thus an invalid argument passed to
3208 these commands will now raise error on these modes. (see
3209 :ref:`v42-variable-change-through-modulefile-evaluation` section in
3210 MIGRATING document)
3211 * On ``whatis`` mode, ``append-path``, ``prepend-path``, ``remove-path``,
3212 ``setenv`` and ``unsetenv`` commands initialize variables if undefined but
3213 do not set them to their accurate value for performance concern.
3214 * Clear value instead of unsetting it during an unload mode evaluation of
3215 ``setenv`` or ``*-path`` commands to avoid breaking later reference to the
3216 variable in modulefile.
3217 * Make ``getenv`` command returns value on ``help``, ``test`` or ``whatis``
3218 evaluation modes. (fix issue#188)
3219 * Add an argument to the ``getenv`` command to return the value of this
3220 argument if the queried variable is undefined.
3221 * Use a different modulefile interpreter for each evaluation mode.
3222 * Adapt the procedure called for each modulefile command depending on the
3223 evaluation mode to adapt behavior of these commands to the module command
3224 currently running.
3225 * Report calling name and arguments for modulefile commands on ``display``
3226 mode. For the commands evaluated during this mode, trigger this report at
3227 the end of the evaluation.
3228 * Inhibit ``chdir``, ``conflict``, ``module``, ``module-log``,
3229 ``module-trace``, ``module-user``, ``module-verbosity``, ``prereq``,
3230 ``set-alias``, ``system``, ``unset-alias``, ``x-resource`` commands on
3231 ``help``, ``test`` and ``whatis`` evaluation modes.
3232 * Ignore ``chdir``, ``module``, ``module-trace``, ``module-verbosity``,
3233 ``module-user`` and ``module-log`` commands found during modulerc
3234 evaluation.
3235 * Correctly restore an empty string value on sub-interpreter global variables
3236 when sanitizing this interpreter between two modulefile/modulerc
3237 evaluations.
3238 * Cache in memory results of a modulefile search to reuse it in case of rerun
3239 instead of re-walking the filesystem.
3240 * Evaluate global rc files once module sub-command is known and registered,
3241 so it can be queried during their evaluation.
3242 * Rename ``_moduleraw`` shell function in ``_module_raw`` to use a common
3243 ``_module_`` prefix for all module-related internal shell functions.
3244 * Install: add ``--enable-append-binpath`` and ``--enable-append-manpath``
3245 configure options to append rather prepend the bin or man directory when
3246 adding them to the relative environment variable.
3247 * Doc: clarify documentation for module usage on scripting language like Perl
3248 or Python to mention that arguments to the ``module`` function should be
3249 passed as list and not as a single string.
3250 * When interpreting a ``setenv`` modulefile order during an unload evaluation,
3251 variable is still set to be unset in generated shell code but it is set to
3252 the value defined on the ``setenv`` order in the interpreter context instead
3253 of being cleared.
3254 * Register the conflicts defined by loaded modules in the environment
3255 (variable ``MODULES_LMCONFLICT``) and ensure they keep satisfied. (see
3256 :ref:`v42-conflict-constraints-consistency` section in MIGRATING document)
3257 * Register the prereqs defined by loaded modules in the environment (variable
3258 ``MODULES_LMPREREQ``) and ensure they keep satisfied. (see
3259 :ref:`v42-prereq-constraints-consistency` section in MIGRATING document)
3260 * Introduce the automated module handling mode, which consists in additional
3261 actions triggered when loading or unloading a modulefile to satisfy the
3262 dependency constraints it declares. Those actions are when loading a
3263 modulefile: the *Requirement Load* and the *Dependent Reload*. When
3264 unloading a modulefile, *Dependent Unload*, *Useless Requirement Unload* and
3265 *Dependent Reload* actions are triggered. (see
3266 :ref:`v42-automated-module-handling-mode` section in MIGRATING document)
3267 * Track the loaded modules that have been automatically loaded (with
3268 environment variable ``MODULES_LMNOTUASKED``) to distinguish them from
3269 modules that have been explicitly asked by user. This information helps to
3270 determine what module becomes a useless requirement once all its dependent
3271 modules are unloaded.
3272 * Track in saved collections the loaded modules that have been automatically
3273 loaded by add of a ``--notuasked`` argument to ``module load`` collection
3274 lines. So this information is restored in loaded environment when collection
3275 is restored. This ``--notuasked`` argument is ignored outside of a
3276 collection restore context.
3277 * Consider modules loaded from a ``module source`` file as explicitly asked by
3278 user.
3279 * Install: add ``--enable-auto-handling`` configure option to enable or
3280 disable the automatic modulefile handling mechanism.
3281 * Process list of loaded modules or modules to load one by one during the
3282 ``restore``, ``purge`` and ``reload`` sub-commands whatever the auto
3283 handling mode is.
3284 * Add the ability to control whether the auto_handling mode should be enabled
3285 or disabled with an environment variable called ``MODULES_AUTO_HANDLING`` or
3286 from the command-line with ``--auto`` and ``--no-auto`` switches. These
3287 command-line switches are ignored when called from modulefile.
3288 * Init: add pager-related command-line options in shell completion scripts.
3289 * Doc: describe ``MODULES_LMCONFLICT``, ``MODULES_LMPREREQ`` and
3290 ``MODULES_LMNOTUASKED`` in module.1 man page.
3291 * Add ``-f`` and ``--force`` command-line switches to by-pass dependency
3292 consistency during ``load``, ``unload`` or ``switch`` sub-commands. (see
3293 :ref:`v42-by-passing-module-constraints` section in MIGRATING document)
3294 * Disallow collection ``save`` or loaded modules ``reload`` if some loaded
3295 modules have some of their dependency constraints unsatisfied.
3296 * The *Dependent Reload* action of a ``load``, ``unload`` and ``switch``
3297 sub-commands excludes modules that have unsatisfied constraints and includes
3298 modules whose constraints are satisfied again (when sub-command process
3299 solves a conflict for instance).
3300 * Doc: describe ``--force``, ``--auto`` and ``--no-auto`` command-line
3301 switches and ``MODULES_AUTO_HANDLING`` variable in module.1 man page.
3302 * Ignore directories ``.SYNC`` (DesignSync) and ``.sos`` (SOS) when walking
3303 through modulepath directory content. (contribution from Colin Marquardt)
3304 * Install: look for ``make`` rather ``gmake`` on MSYS2.
3305 * Fix ``exec()`` usage in Python module function definition to retrieve the
3306 correct return status on Python3.
3307 * Cookbook: add the *top-priority-values* and *unload-firstly-loaded* recipes.
3308 * Install: add ``gcc`` to the build requirements in RPM specfile.
3309 * Silent any prereq violation warning message when processing *Dependent
3310 Reload* mechanism or ``purge`` sub-command.
3311 * Doc: mention ``createmodule.sh`` and ``createmodule.py`` scripts in FAQ.
3312 (fix issue#189)
3313 * Register all alternative names of loaded modules in environment with
3314 ``MODULES_LMALTNAME`` variable. These names correspond to the symbolic
3315 versions and aliases resolving to the loaded modules. Helps to consistently
3316 solve ``conflict`` or ``prereq`` constraints set over these alternative
3317 names. (fix issue#143 / see
3318 :ref:`v42-consistency-module-load-unload-commands` section in MIGRATING
3319 document)
3320 * Doc: describe ``MODULES_LMALTNAME`` in module.1 man page.
3321 * Install: add ``--with-bin-search-path`` configure option to get in control
3322 of the path list used to search the tools required to build and configure
3323 Modules. (fix issue#164)
3324 * Install: add ``--enable-silent-shell-debug-support`` configure option to add
3325 the ability to control whether or not code to support silent shell debug
3326 should be added to the module function and sh-kind initialization scripts.
3327 (fix issue#166)
3328 * Install: add ``--enable-quarantine-support`` configure option to add the
3329 ability to control whether or not code to support quarantine mechanism
3330 should be added to the module function and initialization scripts.
3331 (fix issue#167)
3332 * Check version set in modulefile magic cookie. If modulefile sets a version
3333 number greater than ``modulecmd.tcl`` script version, this modulefile is not
3334 evaluated like when no magic cookie is set at all. (fix issue#171 / see
3335 :ref:`v42-versioned-magic-cookie` section in MIGRATING document)
3336 * Fix uninitialized variable in procedure producing list of element output.
3337 (fix issue#195)
3338 * Ensure the consistency of ``module load`` modulefile command once the
3339 modulefile defining it has been loaded by assimilating this command to a
3340 ``prereq`` command. Thus the defined constraint is recorded in the
3341 ``MODULES_LMPREREQ`` environment variable. Same approach is used for
3342 ``module unload`` modulefile command which is assimilated to a ``conflict``
3343 command. Thus the defined constraint is recorded in the
3344 ``MODULES_LMCONFLICT`` environment variable. (see
3345 :ref:`v42-alias-symbolic-name-consistency` section in MIGRATING document)
3346 * Only look at loaded modules when unloading so unloading an nonexistent
3347 modulefile does not produce an error anymore. (fix issue#199)
3348 * Report error raised from modulefile evaluation as ``ERROR`` rather
3349 ``WARNING``, like when a conflict constraint is hit. Moreover this kind of
3350 evaluation error is now silenced on global evaluation like when processing
3351 ``avail`` or ``search`` sub-commands.
3352 * Record messages to report them by block on when processing a ``load`` or an
3353 ``unload`` modulefile evaluation to improve readability on these evaluating
3354 modes that may cascade additional actions. (see
3355 :ref:`v42-module-message-report` section in MIGRATING document)
3356 * Foreground ``load``, ``unload``, ``switch`` and ``restore`` actions (i.e.,
3357 asked on the command-line) now report a summary of the additional load and
3358 unload evaluations that were eventually triggered in the process.
3359 * Support ``del`` and ``remove`` aliases for ``unload`` sub-command like on
3360 compatibility version. (fix issue#200 with contribution from Wenzler)
3361 * Correctly transmit the arguments along with the command to execute on
3362 ``system`` modulefile command. (fix issue#201)
3363 * Contrib: add ``mt`` utility script which helps to run just specific part of
3364 the test suite.
3365 * Introduce ``set-function`` and ``unset-function`` modulefile commands to
3366 define shell function on sh-kind and fish shells. (fix issue#193 with
3367 contribution from Ben Bowers)
3368
3369
3370 .. _4.1 release notes:
3371
3372 Modules 4.1.4 (2018-08-20)
3373 --------------------------
3374
3375 * Doc: fix typo on ``getenv`` command description in modulefile(5) man page
3376 and clarify this command should be preferred over ``::env`` variable to
3377 query environment variable value in modulefile.
3378 * Init: fix ``bash`` and ``zsh`` completion scripts to enable Extended Regular
3379 Expression (ERE) on ``sed`` command with ``-E`` argument (rather ``-r``) for
3380 compatibility with OS X's and BSDs' sed. (fix issue#178)
3381 * Handle default version sets on an hidden modulefile (were not found
3382 previously). (fix issue#177)
3383 * Init: fix ``ksh`` initialization script for ksh88 compatibility. (fix
3384 issue#159)
3385 * Install: use ``sed`` command rather ``grep`` and ``cut`` in ``configure``
3386 and ``Makefile`` scripts. (fix issue#175 with contribution from Michael
3387 Sternberg)
3388 * Fix typo, tab indentation and pipe opening mode on ``createmodule.py``
3389 utility script. (contribution from Jan Synacek)
3390 * Check ``ModulesVersion`` value set from ``.version`` rc file to ensure this
3391 value refers to a version name in current directory. Report error if a
3392 nested value is detected and ignore this value. (fix issue#176)
3393
3394
3395 Modules 4.1.3 (2018-06-18)
3396 --------------------------
3397
3398 * Make ``setenv`` command alter ``env`` Tcl global array during ``help``,
3399 ``test`` or ``whatis`` evaluation modes. (fix issue#160)
3400 * Doc: describe MANPATH variable special treatment on compatibility version
3401 in diff_v3_v4 document.
3402 * Initialize and export _moduleraw SH shell function if ``stderr`` is attached
3403 to a terminal. Was previously checking ``stdout``. (fix issue#169)
3404 * For ``csh`` shells, quote code generated by modulecmd.tcl to pass it to the
3405 ``eval`` shell command.
3406 * Escape special characters when producing code to define shell aliases (fix
3407 issue#165)
3408 * Correct modulefile lookup when a modulefile directory is overwritten by a
3409 module alias definition but it contains an empty sub-directory. (fix
3410 issue#170)
3411 * Doc: describe ``getenv`` command in modulefile(5) man page.
3412 * Improve SH shell detection in profile.sh initialization script to use shell
3413 variable on ``bash`` or ``zsh`` to determine current shell name. (fix
3414 issue#173)
3415
3416
3417 Modules 4.1.2 (2018-03-31)
3418 --------------------------
3419
3420 * Add an example global rc file in ``contrib/etc`` directory that ensures
3421 ``MODULEPATH`` is always defined.
3422 * Check ``HOME`` environment variable is defined on ``savelist`` and
3423 ``is-saved`` commands or raise error if not.
3424 * Fix saving of deep module default version in collection when version pinning
3425 is disabled: if ``foo/bar/version`` is default version for ``foo``,
3426 collection will retain just ``foo`` (was retaining ``foo/bar``).
3427 * Enable to save and restore collections containing full path modulefiles
3428 eventually with no modulepath defined.
3429 * Run ``puts`` command not related to ``stderr`` or ``stdout`` channels in
3430 calling modulefile context to correctly get access to the targeted file
3431 channel. (fix issue#157)
3432 * Quote ``autoinit`` result for eval interpretation on SH-kind shells to avoid
3433 parameter expansion to randomly occur on generated code depending on file
3434 or directory names of current working directory. (fix RH bug#1549664)
3435 * Ignore empty elements found in ``MODULEPATH``, ``LOADEDMODULES`` or
3436 ``_LMFILES_`` to ensure all elements in these variables are non-empty
3437 strings.
3438 * Raise error if loaded environment is in an inconsistent state when calling
3439 commands requiring correlation of information from the ``LOADEDMODULES`` and
3440 the ``_LMFILES_`` environment variables. Error raised on ``load``,
3441 ``unload``, ``switch``, ``reload``, ``purge``, ``list``, ``save`` and
3442 ``restore`` commands. May affect ``info-loaded`` or ``is-loaded`` commands
3443 if module passed as argument to these command is specified as a full path
3444 modulefile.
3445 * Fix ``list`` command to process loaded modules information before performing
3446 any content output.
3447 * Install: adapt ``configure`` script and Makefiles to support installation on
3448 Cygwin system.
3449 * Detect terminal width on Windows ``cmd`` terminal with ``mode`` command.
3450 * Improve Windows ``cmd`` shell support: error code returned, echoing text,
3451 shell alias creation and removal, working directory change.
3452 * Raise error when an empty module name is passed to module sub-commands like
3453 ``load``, ``display`` or ``unload``.
3454 * Raise error when an empty collection name is passed to module sub-commands
3455 like ``save``, ``saveshow`` or ``restore``.
3456 * Raise error when an empty path is passed to module ``unuse`` sub-command,
3457 like already done on ``use`` sub-command.
3458 * Clear argument list if an empty module command name is passed.
3459 * Fix ``module`` function definition for all shells in ``autoinit`` command to
3460 correctly handle empty-string parameters or parameters containing
3461 white-spaces, quotes, escape characters.
3462 * Fix ``module`` function definition for Python to accept being called with no
3463 argument.
3464 * Fix parameter expansion on ``module`` function for all SH-kind shells when
3465 quarantine mode is activated.
3466 * Escape ``\`` character when producing R shell code.
3467
3468
3469 Modules 4.1.1 (2018-02-17)
3470 --------------------------
3471
3472 * Make separator lines, used on ``display`` command result for instance, fit
3473 small screen width.
3474 * Install: give ability to build and install Modules from git repository
3475 without documentation if ``sphinx-build`` cannot be found.
3476 * Install: adapt ``configure`` script and Makefiles to support installation on
3477 FreeBSD, Solaris and OS X systems. (fix issue#147)
3478 * Rework code generated by ``autoinit`` for sh-kind shells to avoid use of
3479 local variables as those are defined differently through the sh variants.
3480 (also fix issue#147)
3481 * Init: use a default value on undefined variables in sh-kind scripts to avoid
3482 unbound variables in bash ``-eu`` mode. (fix issue#151)
3483 * Correctly detect terminal column number on Solaris.
3484 * Init: fix csh init script to get compatibility with pure csh shell
3485 * Sanitize content of ``MODULEPATH`` before using it at run-time, to make
3486 potential relative paths absolute, remove trailing slashes, etc. (fix
3487 issue#152)
3488 * Check loaded modulefiles still exists before displaying statistics on them
3489 during a ``list`` action.
3490 * Use a specific reference counter variable name (``MODULES_MODSHARE_<VAR>``
3491 instead of ``<VAR>_modshare``) for DYLD-specific variables. (fix issue#153)
3492 * No error raise when updating a DYLD or LD path-like variable on OS X when
3493 System Integrity Protection (SIP) is enabled. In this situation, these
3494 variables are not exported in subshell context, so they appear undefined.
3495 * Init: protect arguments passed to the ``_moduleraw`` sh function from
3496 interfering content of current working directory. (fix issue#154)
3497 * Install: move ``hostname`` RPM requirement to the compat sub-package.
3498 * Start pager process only if some text has to be printed. (partially fix
3499 issue#146)
3500 * Ignore ``PAGER`` environment variable to configure Modules pager to avoid
3501 side effects coming from a general pager configuration not compatible with
3502 Modules pager handling. (fix issue#146)
3503 * Do not blank anymore default Modules pager options if default pager is
3504 ``less`` when the ``LESS`` environment variable is defined. (fix issue#146)
3505
3506 .. warning:: With this bugfix release, changes have been made on the pager
3507 setup to avoid side effects coming from the system general pager
3508 configuration. As a result ``PAGER`` environment variable is now ignored
3509 and ``MODULES_PAGER`` should be used instead to adapt Modules pager
3510 configuration at run-time.
3511
3512
3513 Modules 4.1.0 (2018-01-15)
3514 --------------------------
3515
3516 * Extend stderr output redirection on sh-kind shells to all terminal-attached
3517 shell session, not only interactive shell session.
3518 * Extend shell code produced by the ``autoinit`` command to perform the same
3519 environment initialization as done in ``init`` shell scripts (default value
3520 set for module-specific environment variables, parse or source of
3521 configuration files).
3522 * Make init shell scripts rely on ``autoinit`` command to define the
3523 ``module`` command and setup its default environment.
3524 * Fix error rendering code for Tcl shell by producing a call to the ``error``
3525 procedure.
3526 * Introduce pager support to handle informational messages, using ``less``
3527 command with ``-eFKRX`` options by default. Environment variable
3528 ``MODULES_PAGER`` or ``PAGER`` may be used to supersede default pager
3529 command and options. ``--paginate`` and ``--no-pager`` switches enable or
3530 disable pager from the command line.
3531 * Install: add ``--with-pager`` and ``--with-pager-opts`` configure options to
3532 define default pager command and its relative command-line options.
3533 * Introduce quarantine mechanism to protect module execution against side
3534 effect coming from the current environment definition. Variables whose name
3535 has been put in ``MODULES_RUN_QUARANTINE`` will be emptied or set to the
3536 value hold by ``MODULES_RUNENV_<VAR>`` in the modulecmd.tcl run-time
3537 environment. Quarantine variable original value is then restored within
3538 modulecmd.tcl execution context once it has started.
3539 * Install: add ``--with-quarantine-vars`` configure option to define at build
3540 time the ``MODULES_RUN_QUARANTINE`` and ``MODULES_RUNENV_<VAR>`` environment
3541 variables set in initialization scripts.
3542 * Add ``MODULES_SILENT_SHELL_DEBUG`` environment variable to disable on sh
3543 shell and derivatives any ``xtrace`` or ``verbose`` debugging property for
3544 the duration of either the module command or the module shell initialization
3545 script. (fix issue#121)
3546 * Change error code produced by modulecmd.tcl for the Tcl, Perl, Python, Ruby,
3547 CMake and R scripting languages to return a 'false' boolean value in case of
3548 error rather raising a fatal exception.
3549 * Adapt module function definition for Tcl, Perl, Python, Ruby, CMake and R
3550 scripting languages to always return a value, result of the modulecmd.tcl
3551 run. When modulecmd.tcl run does not produce a specific status, a 'true'
3552 boolean value is returned. On CMake, resulting value is returned though a
3553 ``module_result`` global variable.
3554 * Spool content sent to the stdout channel with ``puts`` command during a
3555 modulefile interpretation, to effectively transmit this content to stdout
3556 after rendering the environment changes made by this modulefile. (fix
3557 issue#113)
3558 * Introduce ``append-path``, ``prepend-path``, ``remove-path`` and
3559 ``is-loaded`` module sub-commands, based on existing modulefile-specific
3560 Tcl commands. (fix issue#116)
3561 * Introduce ``is-saved``, ``is-used`` and ``is-avail`` modulefile Tcl commands
3562 and module sub-commands to test availability of collection, modulepath or
3563 modulefile.
3564 * Raise error when a call to ``path`` or ``paths`` module sub-commands is
3565 attempted during a modulefile interpretation. Both commands now return text
3566 rather print text on scripting languages. An empty string is returned in
3567 no match case instead of a false boolean value.
3568 * Introduce ``module-info loaded`` modulefile command and its module
3569 sub-command counterpart ``info-loaded``. This new command returns name of
3570 the modules currently loaded corresponding to the name passed as argument.
3571 (fix issue#3)
3572 * Fix ``is-loaded`` command to correctly handle multiple module names passed
3573 as argument (fix issue#138)
3574 * Support no argument on ``is-loaded``, ``is-saved`` and ``is-used`` commands
3575 to return if anything is respectively loaded, saved or used.
3576 * Interpret ``module source`` command set in modulefile in ``unload`` mode
3577 when the modulefile itself is interpreted in this mode.
3578 * Consider a modulefile passed with name starting by ``./`` or ``../`` a full
3579 path name modulefile, like those starting by ``/``. These kind of names are
3580 converted to absolute path names, for instance to register them in loaded
3581 modulefile list during a ``load`` command.
3582 * Correlate modulefile passed as full path name (starting by either ``./``,
3583 ``../`` or ``/``) to already loaded modulefile registered with regular
3584 module name (file name without its modulepath prefix) to prevent for
3585 instance from loading twice same modulefile. Correlate in the same way
3586 regular module name to already loaded full path name modulefile.
3587 * Introduce ``MODULES_COLLECTION_PIN_VERSION`` environment variable to record
3588 modulefile version number when saving collections even if version
3589 corresponds to the default one. (fix issue#89)
3590 * Fix location of ``etc/rc`` global RC file to ``@prefix@/etc/rc`` instead of
3591 ``$MODULESHOME/etc/rc`` not to depend on ``MODULESHOME`` environment
3592 variable value.
3593 * Strengthen argument check for ``append-path``, ``prepend-path`` and
3594 ``remove-path`` modulefile Tcl commands and module sub-commands. Raise error
3595 if argument list is not correct.
3596 * Fix support for the ``--delim=C`` argument form on ``append-path``,
3597 ``prepend-path`` and ``remove-path`` commands.
3598 * Fix path reference counter handling in case path element is an empty string.
3599 Distinguish an empty path element from a variable set empty to clear it.
3600 * Pass multiple path elements separated by delimiter character as one string
3601 on ``append-path``, ``prepend-path`` and ``remove-path`` commands.
3602 * Accept multiple path element arguments on ``append-path``, ``prepend-path``
3603 and ``remove-path`` commands.
3604 * Introduce the ``--duplicates`` argument option to ``append-path`` and
3605 ``prepend-path`` commands to add a path element already registered in
3606 variable.
3607 * Introduce the ``--index`` argument option to ``remove-path`` command to
3608 delete a path entry by passing its position index in variable.
3609 * Provide the ability to setup a site-specific configuration sourced at the
3610 start of ``modulecmd.tcl`` main procedure. This configuration is a Tcl
3611 script named ``siteconfig.tcl`` which enables to supersede any Tcl
3612 definition made in ``modulecmd.tcl``. Location of this file is controlled
3613 at configure time with the ``--etcdir`` option.
3614 * Add the ability to handle paths containing reference to environment variable
3615 in ``MODULEPATH``. When these kind of paths are used by ``module`` command,
3616 the variable references are converted to their corresponding value or to an
3617 empty string if they are not defined.
3618 * Enclose value set to environment variable on Tcl within curly braces rather
3619 double quotes to protect special characters in it from interpretation.
3620 * Correctly parse ``.modulespath`` initialization file to handle lines without
3621 any ``#`` character or to handle files with no content to extract.
3622 * Re-introduce the ``--enable-versioning`` configure option, which appends
3623 Modules version to installation prefix and deploy a ``versions`` modulepath
3624 shared between all versioning enabled Modules installation. A modulefile
3625 corresponding to Modules version is added to the shared modulepath and
3626 enables to switch from one Modules version to another.
3627 * Fix removal of CMake generated temporary script file by stripping newline
3628 character from script file name.
3629 * Add ``MODULES_CMD`` environment variable to expose path to the currently
3630 active module command script. This variable is set at initialization time.
3631 * Introduce ``modulecmd`` wrapper script, installed in binary directory, which
3632 executes the active module command.
3633 * Fix modulefile Tcl interpreter reset when handling list variables. (fix
3634 issue#145)
3635 * Introduce 'module-virtual' modulefile Tcl command to associate a virtual
3636 module name to a modulefile. This module can be located with its virtual
3637 name and the associated modulefile is the script interpreted when loading,
3638 unloading, etc.
3639 * Resolution of relative paths occurring during a modulefile interpretation to
3640 target a modulefile or a modulepath now takes the directory of the currently
3641 interpreted modulefile as the current working directory to solve the
3642 relative paths.
3643
3644
3645 .. _4.0 release notes:
3646
3647 Modules 4.0.0 (2017-10-16)
3648 --------------------------
3649
3650 Starting with this release, modules-tcl has become Modules. The following
3651 changes describe the differences with last modules-tcl release (1.923). To
3652 learn about the changes between this release and last Modules 3.2 release,
3653 please see the :ref:`MIGRATING` document.
3654
3655 * Relax constraint on command-line argument position so options and
3656 switches can be passed either before or after command name.
3657 * Report ``unsupported option`` warning rather stop on error when
3658 compatibility-version specific command-line switches are passed (
3659 ``--force``, ``--human``, ``--verbose``, ``--silent``, ``--create``,
3660 ``--icase``, ``--userlvl``).
3661 * Keep empty ``module load`` line in shell configuration files after running
3662 the ``initrm`` or ``initclear`` commands.
3663 * Always return the value of ``tcl_platform(osVersion)`` for ``uname release``
3664 * Optimize code output, for Perl to only return ``1;`` once for a no-operation
3665 situation and for Python to not ``import os`` when there is only an error
3666 to render.
3667 * Use value of system command ``uname -n`` for ``uname nodename``.
3668 * Add support for CMake *shell*
3669 * Ignore ``/`` character used as suffix in modulefile name passed on command
3670 line.
3671 * Rename Perl initialization script in ``perl.pm`` and Python in
3672 ``python.py``.
3673 * Add support for Ruby *shell* (with contribution from Tammo Tjarks)
3674 * Add support for R *shell* (with contribution from Roy Storey)
3675 * When a *default* is set for a given module name, target modulefile can
3676 be referred on as *modulename/default* in addition to just *modulename*.
3677 * Locate symbolic versions on ``avail`` command even these symbols are set
3678 over a module alias or another symbolic version. In this situation the
3679 symbol spread along the resolution path until reaching a modulefile.
3680 * Define a more standard shebang on modulecmd.tcl script.
3681 * Determine modulefile corresponding to given module name using the loaded
3682 context only on ``unload`` situation.
3683 * Enable to unload *mod/dir/subdir/vers* when unload of *mod* or *mod/dir*
3684 asked. Was previously working only if deep module to unload was also the
3685 default version for these root names.
3686 * Make -l/-t switches mutually exclusive. Last switch mentioned on the
3687 command-line is honored.
3688 * Output parsable modulepath header when -l/-t switches are enabled.
3689 * When searching for a module in a given modulepath directory, if a module
3690 alias or a symbolic version matches searched module but the target of
3691 this alias or symbol is not found in current modulepath directory,
3692 search for this target restarting search from the first modulepath in
3693 list to ensure modulepath priority.
3694 * Solve aliases or symbolic versions looking for all modulepaths on ``search``
3695 and ``paths`` commands. Was previously solved if their target was found in
3696 same modulepath directory.
3697 * Add support for hidden *dot* modulefiles. A hidden modulefile does not
3698 appear in case of wild search, it is only returned when search is about
3699 its exact name.
3700 * No table header print in --long mode on an ``avail`` command if no result
3701 are returned.
3702 * Add blank line between displayed list of elements, for instance between
3703 modulepath content on ``avail`` command.
3704 * Improve readability of error messages encountered during modulefile
3705 execution by putting Tcl error message first after the ``Module ERROR``
3706 prefix.
3707 * Do not exit immediately when an internal error occurs in currently
3708 interpreted modulefile. Consider this interpretation as failed and
3709 continue to proceed the other modulefile arguments.
3710 * When multiple modulefiles are passed on ``display``, ``help`` and ``test``
3711 commands only output one separator line between 2 interpreted modulefiles.
3712 * Fix environment settings stack handling issue when restoring stack after
3713 a failed attempt to load a modulefile in a modulefile.
3714 * Failed attempt to load or unload a modulefile within a modulefile now
3715 leads to this upper modulefile load or unload failure. Previously upper
3716 modulefile were loaded respectively unloaded even if its dependent
3717 sub-modulefile failed to load or unload.
3718 * During a ``switch`` command, if the unloading part fails the loading part
3719 will not be tried. Unloading part fails if module to unload does not
3720 exist or its unload interpretation raise error.
3721 * Init: use ``module source`` rather shell command ``source`` to load modulerc
3722 system configuration in sh-kind, csh-kind and fish shell init scripts.
3723 * Install: transform configuration options to bind to an existing
3724 compatibility Modules version into option (--enable-compat-version) to
3725 build and install this compatibility version along with main version.
3726 * Init: adapt initialization scripts to handle both main and compatibility
3727 version. By default a shell script enables main version and if the
3728 environment variable MODULES_USE_COMPAT_VERSION is set to 1, the
3729 compatibility version is enabled instead of main version.
3730 * Install: import from compatibility version and install ``add.modules``
3731 and ``mkroot`` utility scripts (scripts developed by R.K. Owen).
3732 * Install: update RPM spec file to handle compatibility version as a
3733 ``compat`` sub-package.
3734 * Add completion script for Fish shell (contribution from BEFH).
3735 * Doc: extend content of diff_v3_v4 to details all noticeable changes
3736 between v3.2 and v4.0.
3737 * Doc: introduce MIGRATING guide to learn the major changes when moving
3738 from v3.2 to v4.0.
3739 * Fix ``list`` command when full pathname modulefile is loaded (fix bug#132)
3740 * Install: handle version number though git tags in scripts, documentation
3741 and RPM spec file.
3742 * Doc: migrate documents from POD format to reStructuredText to benefit from
3743 Sphinx documentation framework and Read The Docs publishing capabilities.
3744
3745 Above changes describe the differences with modules-tcl release 1.923. To
3746 learn about the changes between Modules 4.0 and last Modules 3.2 release,
3747 please see the :ref:`MIGRATING` document.
3748
3749
3750 modules-tcl-1.923 (2017-07-20)
3751 ------------------------------
3752
3753 * Fix ``aliases`` command when a global or user RC file is set.
3754 * Find and solve global or user RC aliases and symbolic versions on
3755 ``search``, ``whatis`` and ``paths`` commands.
3756 * Do not look at currently loaded modules to resolve the target of a module
3757 alias.
3758 * Rework default and latest versions search on ``avail`` command. Correct
3759 display when at a given level a sub-directory element is last element in
3760 directory among modulefiles. Previously sub-directory was printed but
3761 last file among modulefiles was also printed (2 latest versions at the
3762 same level). A directory tagged "default" does not appear anymore in
3763 default listing result as its content (the default version found in that
3764 directory) will be displayed.
3765 * When an alias is set and overrides name of an existing directory, take
3766 this alias into account for default and latest choice and ignore
3767 directory content.
3768 * Bad default set will lead to no result displayed for the corresponding
3769 module in case of default ``avail`` display.
3770 * Correct inclusion of aliases in output result when these aliases are not
3771 part of the exact same module path than module path of the search.
3772 * Rewrite existing shell initialization file with initadd, initprepend,
3773 initswitch, initrm and initclear commands rather than writing a new
3774 file then copying this new file to replace the existing initialization
3775 file. In addition only re-writes shell initialization file if its content
3776 need to be altered.
3777 * Raise an error on initadd, initprepend, initswitch, initrm and initclear
3778 commands when no ``module load`` line are found in shell initialization
3779 file.
3780 * Normalize error messages for the various collection-related commands
3781 when collection cannot be accessed.
3782 * Cleanup existing reference counters of a path list variable when this
3783 variable is altered by a ``setenv`` or an ``unsetenv`` command.
3784 * Init: do not pollute tab-completion with moduleraw command. (Bert Wesarg)
3785 * Make use of the same Tcl interp for each modulefile interpretation and
3786 use another one for each modulerc (but the same for each modulerc). By
3787 doing so we proceed like on C-version where same interpreter is used
3788 across modulefile or modulerc interpretation. Huge performance
3789 improvement is achieved with this change on commands making intensive
3790 use of interp like ``avail``. Interpreter state is reset from one
3791 interpretation to another: the initial variable and procedure state is
3792 restored before each new interpretation to avoid spread of definitions
3793 from one interpretation to another. Also in case of nested interpretation
3794 each interpretation level has its own interpreter so a module loaded by
3795 another does not influence the interpretation of the module loading it.
3796 * Improve performance of aliases and symbolic versions resolution by
3797 computing these resolution at definition time. As a consequence
3798 resolution loop are not registered anymore and produce an error message
3799 when spotted not at display time.
3800 * Reduce number of ``access`` system call by trying access to modulefile
3801 when reading the content of a modulefile directory rather testing access
3802 before trying it.
3803 * No error raise on empty argument list for load. To cope with initadd
3804 behavior that requires at least an empty ``module load`` line in startup
3805 files. (fix SF bug#88)
3806 * Fix initadd to handle load line without trailing space. Was previously
3807 expecting load directive to be written "module load " to get a match. With
3808 fix, ``module load`` line will also be matched.
3809 * Like C-version catch raised error when break or continue are called from
3810 outside of a loop to handle them as when they are called from modulefile
3811 main body. (fix SF bug#87)
3812 * Return error on ``module use`` command when an empty path string is
3813 provided rather ignoring it.
3814 * Workaround ``min`` and ``max`` functions and ``lreverse`` procedure for
3815 correct operations under Tcl version 8.4.
3816 * Install: add --with-tclsh configure option to give the ability to choose
3817 the Tcl interpreter shell to setup in initialization scripts.
3818 * Handle error raised from the ModulesDisplay, ModulesHelp and ModulesTest
3819 procedures in the same way than for the evaluation of the modulefile
3820 content. An error occurring during the evaluation of the modulefile
3821 content will lead to no evaluation of the ``display``, ``help`` and
3822 ``test`` command specific functions.
3823 * Remove ``debug`` module command
3824 * Doc: describe ``path``, ``paths`` and ``autoinit`` module command.
3825 * Correct use of xrdb tool when not installed in default path.
3826 * Fix ``init*`` module commands to behave more like C-version and document
3827 remaining differences in diff_with_c-version.
3828 * Init: make ``sh`` init script closer to POSIX specification to support sh
3829 flavors different than Bash or Zsh like Dash.
3830 * Fix column-mode display for very short width terminal.
3831 * Install: introduce an ``install`` non-regression testsuite which is
3832 triggered by the ``make testinstall`` command and checks modules-tcl
3833 installation is operational.
3834 * Init: fix modulerc load test on ``fish`` init script.
3835 * Init: fix interactive shell test on ``sh`` init script.
3836 * Install: add --enable-example-modulefiles configure option that install
3837 by default some modulefiles provided as example in the system modulefiles
3838 directory.
3839 * Install: when uninstalling, do not remove modulefiles directory if it is
3840 not empty.
3841 * Add completion script for Zsh shell.
3842 * Add ``module test`` command to trigger when called execution of a
3843 ModulesTest procedure in target modulefile following same kind of
3844 mechanism than ``module help``.
3845
3846
3847 modules-tcl-1.832 (2017-04-29)
3848 ------------------------------
3849
3850 * Fix ``getenv`` sub-command to correctly return environment variable value.
3851 * Clarify in man-pages display of module alias and symbolic version-name on
3852 ``avail`` command and management of file access issue when locating
3853 modulefiles.
3854 * Distinguish access issue (permission denied) from find issue (cannot
3855 locate) when trying to access directly a directory or a modulefile as
3856 done on ``load``, ``display`` or ``whatis`` commands. In addition on this
3857 kind of access, not readable .modulerc files are ignored rather producing a
3858 missing magic cookie error.
3859 * When mode is set to unload, ``module load`` commands in modulefile are
3860 interpreted as ``module unload`` commands. To guaranty correct behavior
3861 regarding requirements, the module list passed to the load command is
3862 reversed to unload the modulefiles in the reverse order than they have
3863 been loaded.
3864 * Correct ``display`` command to only report module commands set in
3865 modulefile and not those set in the various .modulerc on the path toward
3866 this modulefile.
3867 * Fix bash and tcsh completion scripts to eliminate symbolic version names
3868 from ``avail`` command result.
3869 * Improve ``avail`` command when a symbolic version-name is passed as
3870 argument to return the modulefile target of this symbolic version-name.
3871 * When looking for an implicit default in a directory, now a module alias is
3872 taken into account so it can be returned as the last element in it
3873 (highest numerically sorted version).
3874 * Fix ``list`` command to correctly display the ``default`` tag along loaded
3875 modules when set via a .version file.
3876 * Fix long output of ``list`` command to display the symbolic version-names
3877 associated to each loaded module if any.
3878 * Improve ``avail`` command to return alias module when an alias name is
3879 passed as argument.
3880 * On a ``--default`` listing, a modulefile does not appear anymore if a
3881 directory is set default at the same level. On a ``--latest`` listing, a
3882 directory does not appear anymore if set default but not the latest.
3883 * Read modulerc and validate its header in a single open/read/close sequence
3884 instead of two in order to reduce to number of IO operations during an
3885 ``avail`` command.
3886 * Drastically reduce grid size computation time which removes overhead when
3887 displaying module avail results in column-mode.
3888 * Translate module name to currently interpreted module name when name
3889 correspond to the last part this interpreted module only in case of
3890 symbolic version-name or alias resolution.
3891 * Avoid resetting regular path (/usr/bin) or manpath (/usr/share/man) when
3892 switching from Tcl to C version in switchml utility.
3893 * Raise error on x-resource if DISPLAY environment variable is not set.
3894 * Fix lisp init script which was broken for environment change actions.
3895
3896
3897 modules-tcl-1.775 (2017-03-07)
3898 ------------------------------
3899
3900 * Improve README with examples, requirements, links, etc. Also update
3901 INSTALL documentation with details on the new configure/make/make install
3902 process.
3903 * Add display of a release date next to the version number when calling for
3904 ``--help`` or ``--version``.
3905 * Update diff_with_c-version document to describe the features of the
3906 Tcl-version that are not supported on the C-version. Also state that the
3907 diff takes C version 3.2.10 against Tcl version 1.729 as a basis.
3908 * Introduce ``switchml`` tool, a shell function (or alias for csh or tcsh
3909 shells) that swap currently enabled Modules version (C or Tcl) by the
3910 other version (C or Tcl). Configure option ``--with-cver-initdir`` must be
3911 defined to enable ``switchml`` in initialization script.
3912 * Define a PATH and MANPATH in shell initialization scripts that point to
3913 the defined modules-tcl installation directories.
3914 * Give ability to generate distribution tarball from the git repository with
3915 Makefile ``dist`` target.
3916 * Introduce an installation process for this software following the
3917 configure/make/make install fashion. Configure step enables to choose
3918 installation paths and init scripts features to activate. Make step mainly
3919 translates init scripts with the configuration set. Make install creates
3920 target directories and copy files into them.
3921 * Fix MODULESHOME setup in autoinit command to define it as an absolute path
3922 and set it to the upper directory when modulecmd.tcl is located in a ``bin``
3923 or a ``libexec`` directory.
3924 * Correct alias and version resolution on avail command which was erroneous
3925 in case of a modulefile holding symbols (like ``default``) and targeted by
3926 aliases. Avail output was showing the aliases holding the symbols instead
3927 of the modulefile.
3928
3929
3930 modules-tcl-1.729 (2017-02-01)
3931 ------------------------------
3932
3933 * Add documentation in module(1) man page on the modulefile collection
3934 concept and the relative ``save``, ``restore``, ``saverm``, ``saveshow``
3935 and ``savelist`` commands.
3936 * Add document to list the differences of the functionalities that can be
3937 found on the C-version of the Modules package compared to the
3938 Tcl-version.
3939 * Improve modulecmd.tcl shebang to only search ``tclsh`` once if found in
3940 PATH.
3941 * Add ``module-info mode`` check against ``remove`` and ``switch`` values.
3942 * Introduce ``module-info command`` Modules-specific Tcl command to
3943 distinguish complex ``load`` or ``unload`` commands that cannot be
3944 determined with ``module-info mode`` alone. For instance a modulefile can
3945 now be aware that a ``switch``, a ``restore`` or a ``purge`` command is
3946 currently being run.
3947 * Enable usage of ``module-info`` Modules-specific Tcl command from a
3948 modulerc file.
3949 * Fix ``module-info specified`` Modules-specific Tcl command.
3950 * No exit raise on modulefile or modulerc error during ``avail``, ``aliases``,
3951 ``whatis`` and ``search`` commands to avoid harming results from these
3952 global commands if error exists in a few modulefiles.
3953 * Exit with error code when a critical error is encountered when
3954 interpreting a modulefile or a modulerc.
3955 * Inhibit non-critical error report raised from modulefiles during ``avail``,
3956 ``aliases``, ``whatis`` and ``search`` commands to avoid error flood when
3957 parsing all modulefiles or modulercs.
3958 * Handle multiple lines of ``module-whatis`` Modules-specific Tcl commands
3959 defined for the same modulefile.
3960 * Handle multiple arguments passed to the ``module-whatis`` Modules-specific
3961 Tcl commands. They are joined to get a single line of text.
3962 * Return error on ``whatis`` command if searched modulefile is not found.
3963
3964
3965 modules-tcl-1.704 (2017-01-20)
3966 ------------------------------
3967
3968 * Set path variable counter to 1 for paths without a known reference count
3969 (was previously set to 999999999).
3970 * Introduce ``envml`` utility which acts as an application launcher where
3971 module commands are instantiated to setup environment before launching
3972 the given application.
3973 * Always register paths provided to be part of MODULEPATH environment
3974 variable as absolute paths to get independent from the current working
3975 directory.
3976 * Inhibit next modulefiles interpretation with ``exit`` Modules-specific Tcl
3977 command only if current mode is ``load``.
3978 * Add argument to ``module-info shell`` and ``module-info shelltype`` to test
3979 current shell or shelltype value.
3980 * Fix use of ``default`` version-name to not consider it as a module symbol
3981 if a modulefile is named ``default``.
3982 * Fix path variable counters when ``:`` character is used in elements of a
3983 path-like variable.
3984 * Update module(1) and modulefile(5) man pages to clear content specific to
3985 the C version of Modules and add content specific to or adapt content that
3986 behave differently on this Tcl version.
3987 * Fix TCLSH variable issue in Python init script.
3988
3989
3990 modules-tcl-1.677 (2017-01-04)
3991 ------------------------------
3992
3993 * Make ``switch`` command handle a single argument. The modulefile to switch
3994 to is the one passed on the command-line and the modulefile to unload is
3995 assumed to be the currently loaded module with the same root name as
3996 this modulefile specified on the command-line.
3997 * Make ``switch`` command idempotent by always ending up with ``old`` unloaded
3998 and ``new`` loaded, whatever the starting situation is.
3999 * Fix ``exit`` Modules-specific Tcl command.
4000 * Add ``refresh`` command as alias on ``reload`` command.
4001 * Add dummy ``module-log``, ``module-trace``, ``module-user`` and
4002 ``module-verbosity`` Modules-specific Tcl commands to enable support for
4003 modulefiles using them.
4004 * Fix ``system`` Modules-specific Tcl command to behave like described on the
4005 man page.
4006 * Fix ``module list`` when module loaded with full path
4007 * Disable ``g_force`` property by default to avoid loading a modulefile
4008 already loaded. It also avoids path element reference counting to get
4009 increased when the same module is asked twice for load.
4010 * Clarify module-info ``mode`` option and set ``help`` mode on ``module help``
4011 command.
4012 * Clarify module-info ``flags`` and ``user`` options.
4013 * Handle empty or separator path on ``add-path`` ad ``unload-path`` commands.
4014 * Delete environment variable targeted by an ``unsetenv`` command on
4015 ``unload`` mode if no value has been provided along. On display mode, print
4016 environment variable value if any has been passed to ``unsetenv`` command.
4017 * When setting Tcl variable, enclose value within double quotes.
4018 * Fix perl quoting style for variable set, escape single quotes rather
4019 double quotes.
4020 * Call ``unuse`` command instead of ``use`` command on a ``module unload``.
4021 * Fix ``continue`` Modules-specific Tcl command.
4022 * Add ``chdir`` Modules-specific Tcl command.
4023 * Fix ``break`` Modules-specific Tcl command.
4024
4025
4026 modules-tcl-1.655 (2016-11-23)
4027 ------------------------------
4028
4029 * No display of modulepath header if no module found in it.
4030 * Remove call to ``module aliases`` on ``module avail`` command, as aliases
4031 are now directly included in the ``avail`` results.
4032 * Include module aliases in the displayed result of an ``avail`` command.
4033 Also display aliases defined in a global or user modulerc file.
4034 * Exit with error code if error occurred on display or help commands.
4035 * Fix module-info symbols resolution.
4036 * Better handling of .modulerc and .version files when searching for a
4037 modulefile.
4038 * Fix module-info version resolution.
4039 * Fix module-info alias resolution.
4040 * Register alias and version by the short module name and improve their
4041 resolution to avoid loop.
4042 * Source $MODULERCFILE/modulerc when $MODULERCFILE is dir.
4043 * Make it so you can do ``module avail un``, wildcard ``*`` character
4044 implied.
4045
4046
4047 modules-tcl-1.632 (2016-09-06)
4048 ------------------------------
4049
4050 * Raise error if command does not receive the excepted number of arguments.
4051 * Improve column-mode display to get a denser output on ``avail`` command.
4052 * Standardize the output of Warning, Error, InternalBug and ErrorAndExit
4053 messages.
4054 * Add short option -d for --delim on prepend-path.
4055 * Introduce collection target concept to distinguish between machines,
4056 environments or domains that are incompatible with each other.
4057 * Introduce ``saveshow`` command, to display content of saved collections.
4058 * Improve ``save`` and ``restore`` commands to handle collection specified as
4059 absolute or relative file path.
4060 * Introduce ``saverm`` command, to delete saved collections.
4061 * Enable to ``restore`` collection with multiple modulefiles specified on the
4062 same line.
4063 * Fix ``restore`` command when there is no module to load in collection.
4064 * Fix ``restore`` command when collection fully rewind module paths.
4065 * Fix ``restore`` command to preserve module path order set in collection.
4066 * Raise error if try to save an empty environment in a collection.
4067
4068
4069 modules-tcl-1.602 (2016-08-13)
4070 ------------------------------
4071
4072 * Add support for Fish shell.
4073 * Import recent tests added to C-version on 10-use and 50-cmds testsuites.
4074 * Add short option -d for --delim on append-path and remove-path.
4075 * Fix load and implement unload x-resource.
4076 * Fix Python code that was broken or not Python3-compliant. Fixed code is
4077 used to define the module command, to render error and to process
4078 x-resource.
4079 * Always dictionary-sort (also called numerical-sort) list of modulefiles
4080 or list of collections.
4081 * Fix bash completion script to be compliant with bash posix mode.
4082
4083
4084 modules-tcl-1.578 (2014-12-24)
4085 ------------------------------
4086
4087 * First release to be described in this NEWS file but it does not mean this
4088 is the first version of modules-tcl as this Modules flavor is born in
4089 2002.
4090 * At this stage, modules-tcl handles a majority of the module commands and
4091 modulefile Tcl commands available on C version.