Debian Codegraph @

doc/source/design/module-selection-contexts.rst

raw
1 .. _module-selection-contexts:
2
3 Module selection contexts
4 =========================
5
6 Description of the different contexts where a module is expressed to get resolved to modulefiles.
7
8 .. _module_identification_to_select_one_module:
9
10 Module identification to select one module
11 ------------------------------------------
12
13 - specification expresses exactly one module
14 - must qualify version to select in case a module has multiple versions
15 - expression may
16
17 - be absolute like *mod/version*
18 - be relative to the modulefile currently being evaluated like *./version* or */version*
19 - refer to symbolic version or module alias
20
21 - specification used to resolve argument passed to the following commands:
22
23 - ``module-version``
24 - ``module-alias``
25 - ``module-virtual`` (cannot use symbolic version or module alias, should define an actual module)
26 - ``module-info symbols``
27 - ``module-info version``
28 - ``module-info loaded``
29
30 - relies on ``getModuleNameVersion`` procedure to get absolute name
31
32 .. _module_version_specification_to_return_all_matching_modules:
33
34 Module version specification to return all matching modules
35 -----------------------------------------------------------
36
37 - specification expresses one or multiple modules
38 - expression may
39
40 - be absolute like *mod/version*
41 - refer to implicit or explicitly defined default version like *mod*
42 - refer to extended default version like *mod/1* (to refer to *mod/1.1.1*)
43 - refer to symbolic version or module alias
44 - specify multiple versions as list (*mod@1,2*) or range (*mod@:1* or *mod@1:2*)
45 - refer to a variant specification (with or without a module name specification)
46
47 - all modules matching specification are retrieved with ``getModules``
48 - specification used to resolve argument passed to the following commands:
49
50 - ``avail``
51 - ``spider``
52 - ``paths``
53 - ``whatis``
54 - ``list`` (matching specification retrieved from loaded modules, not ``getModules``)
55
56 - used to get all alias and symbolic version of loaded modules treated by:
57
58 - ``list``
59
60 - used to get all existing aliases and symbolic version (no module specification) by:
61
62 - ``aliases``
63
64 - used to get all existing modulefiles (no module specification) by:
65
66 - ``search``
67
68 .. _module_version_specification_to_select_one_module:
69
70 Module version specification to select one module
71 -------------------------------------------------
72
73 - specification expresses one or multiple modules
74 - relies on the module version specification to return all matching modules
75 - then among matching modules, one is selected with ``getPathToModule``:
76
77 - the one set has the default version (also called the explicit default version)
78 - or the highest version in case no explicit default is found among results (also called the implicit default version)
79 - nothing is returned in case no explicit default is found among matching modules and implicit default version mechanism is disabled
80
81 - module selection may trigger another match retrieval
82
83 - for instance in case selection leads to an alias that resolves to a bare module name
84
85 - specification used to resolve argument passed to the following commands:
86
87 - ``load``
88 - ``unload`` (with attempt to match against loaded modules to resolve argument)
89 - ``switch``
90 - ``help``
91 - ``test``
92 - ``display``
93 - ``path``
94 - ``is-avail``
95
96 - used to resolve aliases or symbolic versions treated by following commands:
97
98 - ``paths``
99 - ``search``
100
101 .. _module_version_specification_to_check_compatibility:
102
103 Module version specification to check compatibility
104 ---------------------------------------------------
105
106 - specification expresses one or multiple modules
107 - expression may
108
109 - be absolute like *mod/version*
110 - refer to implicit or explicitly defined default version like *mod*
111 - refer to extended default version like *mod/1* (to refer to *mod/1.1.1*)
112 - refer to symbolic version or module alias
113 - specify multiple versions as list (*mod@1,2*) or range (*mod@:1* or *mod@1:2*)
114
115 - version specification is matched against loaded or loading modules with variety of procedures:
116
117 - ``getLoadedMatchingName``
118 - ``getLoadedWithClosestName``
119 - ``isModuleEvaluated``
120
121 - specification used to resolve argument passed to the following commands:
122
123 - ``is-loaded``
124 - ``info-loaded``
125 - ``prereq``
126 - ``conflict``
127
128 - for prereq command when version specification does not have a match among loaded or loading modules
129
130 - version specification is used to select one module per module specification
131 - for instance ``prereq mod@:1.8 [email protected]`` triggers load tentative of default version among *mod@:1.8* then if this tentative fails load of *[email protected]* is attempted
132 - another example with ``prereq mod [email protected]``, which triggers load tentative of *mod/default* then if it fails load of [email protected] is attempted
133
134 .. vim:set tabstop=2 shiftwidth=2 expandtab autoindent: