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