Skip to content

Commit 2f6672a

Browse files
committed
doc: desc. module-warn in MIGRATING
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent c043e7d commit 2f6672a

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

MIGRATING.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,32 @@ commands (:subcmd:`avail`, :subcmd:`list` and :subcmd:`spider`).
3333
When set, this is equivalent to always adding the :option:`--all` command-line
3434
option.
3535

36+
Issue warning upon module evaluation
37+
------------------------------------
38+
39+
The mfcmd:`module-warn` modulefile Tcl command is introduced to define warning
40+
message to print when loading specified modulefiles.
41+
42+
.. parsed-literal::
43+
44+
:ps:`$` cat /path/to/modulefiles/foo/1.0
45+
#%Module
46+
module-warn --message {Please consider using "bar" module instead} foo
47+
:ps:`$` module load foo
48+
Loading :sgrhi:`foo/1.0`
49+
:sgrwa:`WARNING`: Please consider using "bar" module instead
50+
51+
The warning message is printed when targeted modulefile is evaluated in
52+
*load*, *display*, *help* or *test* mode.
53+
54+
:mfcmd:`module-warn` supports the same kind of options than
55+
:mfcmd:`module-tag` or :mfcmd:`module-hide`: it is possible to specify a list
56+
of affected or unaffected users or groups. Warning may also be only effective
57+
before or after a particular date.
58+
59+
The ``warning`` tag is set on modules targeted by a mfcmd:`module-warn`
60+
command.
61+
3662

3763
v5.5
3864
====

doc/source/design/module-warn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module-warn modulefile command
44
==============================
55

66
This design document describes the :mfcmd:`module-warn` Tcl command that emits
7-
warning message when targeted module is loaded.
7+
warning message when targeted module is evaluated.
88

99
Need for such command comes from `EESSI`_ software-layer where a warning
1010
message is printed when loading modules if a file is not found.

0 commit comments

Comments
 (0)