Commit Graph

5875 Commits

Author SHA1 Message Date
Xavier Delaruelle
c9d0ac3581 Split isLoadedMatchSpecificPath with specific proc for loading 2024-11-10 18:24:37 +01:00
Xavier Delaruelle
974168286d Include mod loaded from other path in conflict_unload
Update *Conflict Unload* mechanism to also include module loaded from
another modulepath than the one specified for a requirement to load.

As a result, such module loaded from another path will be unloaded to be
replaced by the module from the selected modulepath.
2024-11-10 18:24:37 +01:00
Xavier Delaruelle
33ad74e9bd ts: use requirement modpath info to compute dependencies 2024-11-10 18:24:37 +01:00
Xavier Delaruelle
f41e5aaeb5 Use requirement modpath info to compute dependencies
Use the modulepath-specific property of the requirements to correctly
compute module dependencies. Especially to determine if a loaded or
loading module is an actual dependency of another module.

g_unmetDepHash array structure is updated to hold the specific
modulepath list next to the loaded module name.

Split isLoadedMatchSpecificPath to create isModulefileMatchSpecificPath
procedure. Useful when working on a *not-yet loaded* context.
2024-11-10 18:24:37 +01:00
Xavier Delaruelle
6aa74aa65c doc: desc. __MODULES_LMPREREQPATH env var 2024-11-10 15:38:42 +01:00
Xavier Delaruelle
0996f8f868 ts: record requirement modulepath spec in environment 2024-11-10 15:38:42 +01:00
Xavier Delaruelle
4900b8f426 Record requirement modulepath spec in environment
When a requirement is defined with a specific modulepath set, record
this spec in the user environment. This information is stored in
__MODULES_LMPREREQPATH environment variable.
2024-11-10 15:38:42 +01:00
Xavier Delaruelle
e1eda1b2fd ts: add modulepath-specific prereq loaded tests in 50/641 2024-11-10 15:38:42 +01:00
Xavier Delaruelle
5dd29ef3ee doc: add Links section to index page 2024-11-07 07:07:45 +01:00
Xavier Delaruelle
a7abe9302b doc: add download badge on index page 2024-11-07 06:58:42 +01:00
Xavier Delaruelle
3cffe197ba doc: add "Edit on GitHub" link on RTD page 2024-11-06 08:04:52 +01:00
Xavier Delaruelle
5f221be528 doc: add some project badges on the index page 2024-11-06 08:04:52 +01:00
Xavier Delaruelle
8c757d59c0 ts: fix 70/410 when no stdin and re chars in path
Fixes #552
2024-10-28 07:08:20 +01:00
Xavier Delaruelle
0d56321530 ts: check stickiness prior processing dependent unload 2024-10-27 17:43:47 +01:00
Xavier Delaruelle
d826c11843 Check stickiness prior processing dependent unload
Move stickiness check when unloading a module prior processing any
automated module handling mechanism.

Stickiness check procedure is renamed failOrSkipUnloadIfSticky and moved
from interp.tcl to modeval.tcl file.

Fixes #536
2024-10-27 17:43:36 +01:00
Xavier Delaruelle
f7994a4aad script: report stats of each test case with issue on "mt" 2024-10-21 14:57:02 +02:00
Xavier Delaruelle
acea5b4b19 script: fix "mb" now modulecmd.tcl may exit with non-zero code 2024-10-21 13:45:09 +02:00
Xavier Delaruelle
fba276eb1a doc: desc. DepRe of ConUn in MIGRATING 2024-10-20 20:37:22 +02:00
Xavier Delaruelle
44c751c4fc doc: no force unload by default of DepRe modules 2024-10-20 20:37:22 +02:00
Xavier Delaruelle
b3baced3fd ts: no force unload by default of DepRe modules 2024-10-20 20:37:22 +02:00
Xavier Delaruelle
bb4b76e648 No force unload by default of DepRe modules
When unloading Dependent Reload modules, do not force this unload unless
asked with --force option. As a result an error is obtained when trying
to reload DepRe modules that conflict with other loaded modules. This
error may be by-passed with --force command-line option.
2024-10-20 10:21:08 +02:00
Xavier Delaruelle
e98326b357 No force disable when calling cmdModuleUnload on UReqUn ctx
As force argument of cmdModuleUnload now only affects unload of module
depended by other loaded modules, this argument has no impact on
"urequn" unload context as a UReqUn module has no dependent by
definition.
2024-10-19 16:32:20 +02:00
Xavier Delaruelle
0834014ade Remove unneeded nagelfar warning ignore comment 2024-10-19 16:17:44 +02:00
Xavier Delaruelle
ec2aede81a Remove unused force argument on unloadDepUnDepReModules 2024-10-19 14:05:40 +02:00
Xavier Delaruelle
233dcb778e doc: no force unload of DepUn of ConUn or switched-off module 2024-10-18 07:48:57 +02:00
Xavier Delaruelle
7e6d4d8646 ts: no force unload of DepUn of ConUn or switched-off module 2024-10-18 07:48:57 +02:00
Xavier Delaruelle
1544739fc0 No force unload of DepUn of ConUn or switched-off module
When a loading module requires a Dependent Unload module, the unload of
this module was forced when it was triggered by a Conflict Unload or a
switched-off module. The unload of such Dependent Unload module is not
forced anymore by default and an error is raised if a loading module
requiring the Dependent Unload module is detected.
2024-10-18 06:22:29 +02:00
Xavier Delaruelle
a124745566 ts: adapt 50/400 tests when install manpath is default
Fix source-sh tests in 50/400 test case to adapt expected value set to
MANPATH variable when the installed MANPATH value set at configure step
is included in the default MANPATH value set for test.

Fixes #549
2024-10-15 20:19:52 +02:00
Xavier Delaruelle
5ccaf0f2a1 doc: desc DepRe load phase changes in MIGRATING 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
fe0758b321 doc: transform DepUn of ConUn into DepRe 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
c6ebab9d47 ts: transform DepUn of ConUn into DepRe 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
7b1a4891b5 Transform DepUn of ConUn into DepRe
Transform the Dependent Unload modules of Conflict Unload modules into
Dependent Reload Modules. An attempt to reload these modules is only
performed if their requirements are satisfied.
2024-10-11 08:30:57 +02:00
Xavier Delaruelle
f1cdf98135 doc: apply DepRe load phase only on top load/unload/switch 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
f910551e0e ts: apply DepRe load phase only on top load/unload/switch 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
807739b446 Apply DepRe load phase only on top load/unload/switch
Proceed with Dependent Reload load phase on load, unload or switch
evaluation only when these evaluations are top level ones.

As a consequence DepRe modules are reloaded after top module load,
unload or switch. They were previously reloaded right after the load,
unload or switch of the module that triggered the DepRe unload phase.

In case a DepRe is a ReqLo for another module to load, it will be loaded
as ReqLo. Currently it looses its extra tags and gets the auto-loaded
tag. This is something to fix in the future.

With this change when a DepRe module triggered by a sub module switch
operation fails to reload, a real error is rendered rather a simple
warning.

As all DepRe are reloaded at the end, some of them that could be
qualified as UReqUn skip this step and are not auto unloaded.
2024-10-11 08:30:57 +02:00
Xavier Delaruelle
29d95af6c2 Save reloading mod list in global list
Save reloading module list (DepRe modules) in a global list rather
transmitting a list variable to the procedures that interact with DepRe
modules.
2024-10-11 08:30:57 +02:00
Xavier Delaruelle
ddd4563f08 ts: fix isTopEvaluation when reloading DepRe modules 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
db9475aeab Fix isTopEvaluation when reloading DepRe modules
Register current module evaluation context as a state to be able to
correctly determine is we are running the top evaluation.

As DepRe reload mechanism during switch occurs outside of a modulefile
evaluation it was wrongly considered top evaluation until now.

It also fixes UReqUn mechanism from unload evaluation, which now
correctly happens everytime after main evaluation.
2024-10-11 08:30:57 +02:00
Xavier Delaruelle
cf4c0d0dc0 doc: desc. non-loadable depre reload skip in man/NEWS 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
0bda70867b doc: desc. non-loadable depre reload skip in changes/design 2024-10-11 08:30:57 +02:00
Xavier Delaruelle
8ab617fba7 ts: add complementary loadable dependent reload tests 2024-10-11 08:30:56 +02:00
Xavier Delaruelle
949524c98d ts: skip reload of DepRe if requirement not satisfied 2024-10-11 08:30:56 +02:00
Xavier Delaruelle
f977a027e7 Skip reload of DepRe if requirement not satisfied
Test that DepRe module is not conflicting with loaded environment and
its requirements are loaded prior reloading it. If its requirements are
not satisfied, skip its reload.

Exception is made if DepRe module is sticky (super-sticky or sticky and
force mode disabled). In which case an attempt to reload sticky DepRe is
performed even if its requirements are not satisfied.
2024-10-11 08:30:56 +02:00
Xavier Delaruelle
fdf688346a Save tag & conflict & prereq of DepRe unloading module
Prior unloading a Dependent Reload module, save its tags, conflict and
prereq definitions. These information will help to determine if this
module is able to reload or if this is a DepUn rather a DepRe.
2024-10-11 08:30:56 +02:00
Xavier Delaruelle
111ddf3f7b ts: improve coverage of changeContextOfModuleEval proc 2024-10-11 08:30:56 +02:00
Xavier Delaruelle
21b761fb65 No DepRe list update if unload phase fail
When unloading Dependent Reload modules, if one unload fails an error is
raised. If force mode is enabled, no evaluation may fail (as
super-sticky modules are allowed to be reloaded). So there is no need to
update DepRe module list as a failure will lead to a global error that
will stop processing.
2024-10-11 08:30:56 +02:00
Xavier Delaruelle
b545adef61 Fail on first "module unload" failure like "conflict"
Treat conflict unload of multiple modulefiles through "module unload"
command failing the same way like with "conflict": first failed module
evaluation leads to stop "module unload" processing unless force mode is
enabled.
2024-10-11 08:30:56 +02:00
Xavier Delaruelle
4771ddcadd Distinguish between already loaded and loading variant 2024-10-11 08:30:56 +02:00
Xavier Delaruelle
e1b052b975 ts: make more traced scan tests robust to file change 2024-10-11 08:30:56 +02:00
Xavier Delaruelle
40370ea0e6 ts: check conflict_unload and implicit_default 2024-10-11 08:30:56 +02:00