Skip to content

Commit b599861

Browse files
committed
doc: fail if sticky module does not reload
1 parent 6511982 commit b599861

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

NEWS.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Modules 5.6.1 (not yet released)
3636
* Drop tags stored in memory that applies to a module when unloading it. It
3737
ensures that tags applied to the module when reloaded from a different
3838
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)
3942

4043
.. _Furo: https://github.com/pradyunsg/furo
4144

doc/source/design/evaluation-errors.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ The following list describes the different kind of evaluation error:
3636
* *forbidden*: evaluated modulefile is tagged forbidden
3737
* *sticky unload*: when unloading a module tagged sticky
3838
* *super-sticky unload*: when unloading a module tagged super-sticky
39+
* *dependent sticky reload*: *dependent reload* special case where a sticky
40+
dependent module fails to reload (during the load phase)
41+
* *dependent super-sticky reload*: *dependent reload* special case where a
42+
super-sticky dependent module fails to reload (during the load phase)
3943

4044
.. note:: Use of ``continue`` Tcl command in modulefile shortens evaluation
4145
but it is not considered an error.
@@ -123,6 +127,12 @@ configuration options are set to a given value.
123127
+---------------------+------------+-------------------------------+
124128
| super-sticky unload | unload | |
125129
+---------------------+------------+-------------------------------+
130+
| dependent sticky | load | |
131+
| reload | | |
132+
+---------------------+------------+-------------------------------+
133+
| dependent | load | |
134+
| super-sticky reload | | |
135+
+---------------------+------------+-------------------------------+
126136

127137
When evaluation mode and/or configuration option matches for these error kinds
128138
to raise, a :ref:`default error behavior<default>` error behavior is applied.
@@ -142,6 +152,7 @@ following errors:
142152
* conflict
143153
* missing requirement
144154
* dependent reload
155+
* dependent sticky reload
145156

146157
Following behavior is observed:
147158

@@ -160,6 +171,12 @@ nonexistent modulefile.
160171
``abort_on_error`` configuration option is ignored when ``--force`` option is
161172
in use. Which means *continue on error* behavior is applied.
162173

174+
*Abort on error* behavior is applied whatever the value of
175+
:mconfig:`abort_on_error` if following kind of error occurs:
176+
177+
* dependent sticky reload and force mode is disabled.
178+
* dependent super-sticky reload
179+
163180
Multiple modulefiles passed as argument
164181
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165182

@@ -299,6 +316,12 @@ force mode is enabled or if reload is removed from :mconfig:`abort_on_error`
299316
configuration option (where it is enabled by default). In this case, a
300317
*continue on error* behavior is applied.
301318

319+
*Abort on error* behavior is applied whatever the value of
320+
:mconfig:`abort_on_error` if:
321+
322+
* a sticky module is not able to reload and force mode is disabled.
323+
* a super-sticky module is not able to reload
324+
302325
Prior running evaluations, dependencies of loaded modules are checked. If at
303326
least one dependency (requirement or conflict) is not satisfied, an error is
304327
raised.
@@ -332,6 +355,7 @@ following errors:
332355
* dependent reload
333356
* unloading dependent
334357
* sticky unload
358+
* dependent sticky reload
335359

336360
Following behavior is observed:
337361

@@ -345,6 +369,12 @@ it from user's loaded environment.
345369
``abort_on_error`` configuration option is ignored when ``--force`` option is
346370
in use. Which means *continue on error* behavior is applied.
347371

372+
*Abort on error* behavior is applied whatever the value of
373+
:mconfig:`abort_on_error` if following kind of error occurs:
374+
375+
* dependent sticky reload and force mode is disabled.
376+
* dependent super-sticky reload
377+
348378
Multiple modulefiles passed as argument
349379
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
350380

doc/source/module.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4537,7 +4537,9 @@ ENVIRONMENT
45374537
available.
45384538

45394539
However, reload is always attempted if the modulefile is tagged as
4540-
``super-sticky`` or ``sticky``, and force mode is not enabled. Dependent
4540+
``super-sticky`` or ``sticky``, and force mode is not enabled. *Abort on
4541+
error* behavior is applied if reload of such module kind fails whatever the
4542+
value of the :mconfig:`abort_on_error` configuration option. Dependent
45414543
Reload modulefiles whose reload has been skipped are treated as Dependent
45424544
Unload modulefiles.
45434545

@@ -4571,6 +4573,10 @@ ENVIRONMENT
45714573
.. versionchanged:: 5.5
45724574
Reload of all Dependent Reload modules occurs after the main evaluation
45734575

4576+
.. versionchanged:: 5.6
4577+
*Abort on error* behavior is always applied if reload of a Dependent
4578+
Reload sticky or super-sticky module fails
4579+
45744580
.. envvar:: MODULES_AVAIL_INDEPTH
45754581

45764582
If set to ``1``, enable in depth search results for :subcmd:`avail`

0 commit comments

Comments
 (0)