Skip to content

Commit d58e7fd

Browse files
committed
doc: update add-property to define tag with "value" arg
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 0821e6f commit d58e7fd

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

NEWS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ Modules 5.6.0 (not yet released)
112112
version of Modules within :file:`siteconfig.tcl` script.
113113
* Introduce :mfcmd:`module-help` modulefile command which defines help text to
114114
print when modulefile is evaluated in ``help`` mode.
115+
* Update :mfcmd:`add-property` modulefile command to use its *value* argument
116+
to define tag on currently loading module.
115117

116118
.. _Security policy: https://github.com/envmodules/modules/blob/main/SECURITY.md
117119
.. _Modules chat room: https://matrix.to/#/#modules:matrix.org

doc/source/design/lmod-tcl-modulefile-compat.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,27 @@ Lmod Tcl modulefile compatibility
4141
- Could be unset with ``remove-property``
4242
- Defined as a key-value
4343

44-
- These commands will be first implemented as a no-operation command (``nop``)
44+
- As of Modules version 5.1, these commands are implemented as a no-operation
45+
command (``nop``)
4546

4647
- No error raised if used
4748
- And no warning message to avoid polluting output
4849

4950
- These commands are intended for use only within modulefile evaluation
5051
context (not within modulerc)
5152

52-
- *FUTURE*: it could be interesting to map some properties on tags like the
53-
``lmod:sticky`` property which corresponds to the ``sticky`` tag
53+
- An update is made on Modules version 5.6: argument *value* of
54+
mfcmd:`add-property` is converted to :mfcmd:`module-tag` onto loading
55+
modulefile
56+
57+
- Argument *name* is ignored as it seems *value* is the deterministic
58+
information (can be understood just by itself)
59+
- Argument *value* is split as sometimes multiple values are aggregated with
60+
``:`` separator
61+
- ``remove-property`` stays as a no-op operation as Modules does not have
62+
a tag-withdrawn mechanism (and it does not seem useful)
63+
- ``add-property`` is no-op during scan evaluation mode as module tags
64+
search does not currently trigger an extra match search
5465

5566

5667
``extensions``

doc/source/modulefile.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ the Module commands return the empty string. Some commands behave differently
6666
when a *modulefile* is loaded or unloaded. The command descriptions assume
6767
the *modulefile* is being loaded.
6868

69+
.. mfcmd:: add-property name value
70+
71+
Associate module tag *value* to currently loading *modulefile*. Argument
72+
*name* is ignored. See :mfcmd:`module-tag` command for more information on
73+
tags.
74+
75+
.. only:: html
76+
77+
.. versionadded:: 5.6
78+
6979
.. mfcmd:: always-load [options] modulefile...
7080

7181
Load *modulefile* and apply the ``keep-loaded`` tag to it in order to avoid

0 commit comments

Comments
 (0)