Skip to content

Commit 9f8efdf

Browse files
committed
doc: change approach with version req in cache file magic cookie
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 101475d commit 9f8efdf

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

NEWS.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ Modules 5.6.0 (not yet released)
139139
containing newline character. Exception is made for *csh* and *tcsh* shells
140140
where newline characters are chopped from value. (fix issue #557)
141141
* Sort modules in JSON output as done on regular output.
142+
* :subcmd:`cachebuild` command now sets the minimal Modules version specified
143+
in the cache file magic cookie header to the oldest Modules version
144+
compatible with this cache file, rather than the version that generated the
145+
cache file. Freshly generated cache files are compatible with Modules 5.3
146+
and above.
142147

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

doc/source/changes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,12 @@ The following module sub-commands appeared on Modules 5.
10091009
module specification is provided as argument or if :file:`.modulecache` file
10101010
is specifically linted.
10111011

1012+
:subcmd:`cachebuild`
1013+
1014+
Starting Modules 5.6, the minimal Modules version specified in the cache file
1015+
header indicates the oldest Modules version compatible with this cache file
1016+
(5.3), rather than the version that generated the cache file.
1017+
10121018
Environment
10131019
"""""""""""
10141020

doc/source/design/module-cache.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ used or not if only a subset of elements is recorded.
183183
Cache validity
184184
--------------
185185

186+
From Modules 5.3 to 5.5
187+
^^^^^^^^^^^^^^^^^^^^^^^
188+
186189
Cache file header indicates a Modules version number. It corresponds to the
187190
Modules version:
188191

@@ -197,6 +200,35 @@ upgraded to a newer minor version (for instance from 5.3 to 5.4):
197200
* better to ensure cache file is accurate for the Modules version as modulerc
198201
and modulefile commands may evolve from one version to another
199202

203+
Starting Modules 5.6
204+
^^^^^^^^^^^^^^^^^^^^
205+
206+
Approach to cache validity is changed on Modules 5.6 to cover use cases where
207+
different Modules installation uses the same set of modulepaths. This is for
208+
instance the case when a service provides modulepaths with cache files in them
209+
and just requires a minimal version of Modules. Or on a computing center, when
210+
the same modulepaths are used by different supercomputers which may use
211+
different version of Modules at some point in time.
212+
213+
With this change the cache file header still indicates a Modules version
214+
number. But this version number now corresponds to the minimal Modules version
215+
able to use this cache file.
216+
217+
With such change, backward compatibility is expected on module cache Tcl
218+
commands. Addition of new commands will lead to an increase of the minimal
219+
version required. Argument change to existing command is not possible, only
220+
the introduction of optional argument will be ok (with increase of minimal
221+
version required).
222+
223+
When generating cache file, minimal version required is set back to ``5.3`` as
224+
no change occurred on the cache file format since the introduction of the
225+
cache feature.
226+
227+
As minimal Modules version check code is the same for cache file than for
228+
modulefile since the introduction of the cache feature, cache file has always
229+
been taken into account as soon as the Modules version matches the minimal
230+
requirement.
231+
200232
Cache usage
201233
-----------
202234

0 commit comments

Comments
 (0)