@@ -11,6 +11,101 @@ that will be encountered when upgrading.
1111v5.6 (not yet released)
1212=======================
1313
14+ This new version is backward-compatible with previous version 5 release. It
15+ fixes bugs but also introduces new functionalities that are described in this
16+ section. See the :ref: `5.6 release notes<5.6 release notes> ` for a complete
17+ list of the changes between Modules v5.5 and v5.6.
18+
19+ spider sub-command
20+ ------------------
21+
22+ Support has been added for the :subcmd: `spider ` sub-command introduced by the
23+ `Lmod `_ project. This sub-command lists available modules found in enabled
24+ modulepaths and recursively found in modulepaths enabled by available modules.
25+
26+ .. parsed-literal ::
27+
28+ :ps: `$ ` module avail
29+ --------------------- :sgrdi: `/path/to/modulefiles ` ---------------------
30+ foo/1 foo/2
31+ :ps: `$ ` module show foo/1
32+ -------------------------------------------------------------------
33+ :sgrhi: `/path/to/modulefiles/foo/1 `:
34+
35+ :sgrcm: `module ` use /path/to/modulefiles.2
36+ -------------------------------------------------------------------
37+ :ps: `$ ` module show foo/2
38+ -------------------------------------------------------------------
39+ :sgrhi: `/path/to/modulefiles/foo/2 `:
40+
41+ :sgrcm: `append-path ` MODULEPATH /path/to/modulefiles.3
42+ -------------------------------------------------------------------
43+ :ps: `$ ` module spider
44+ --------------------- :sgrdi: `/path/to/modulefiles ` ---------------------
45+ foo/1 foo/2
46+
47+ -------------- :sgrdi: `/path/to/modulefiles.2 ` (via foo/1) --------------
48+ bar/1 bar/2
49+
50+ -------------- :sgrdi: `/path/to/modulefiles.3 ` (via foo/2) --------------
51+ bar/3 bar/4
52+
53+ -------------- :sgrdi: `/path/to/modulefiles.3 ` (via bar/1) --------------
54+ qux/1 qux/2
55+
56+ The :subcmd: `spider ` sub-command relies on the :ref: Extra match search
57+ mechanism to scan modulefiles and identify the modulepaths they enable. Since
58+ all modulefiles are evaluated during this scan, it is recommended to build
59+ and use a :ref: `Module cache ` to improve search performance.
60+
61+ The output of :subcmd: `spider ` is similar to that of the :subcmd: `avail `
62+ sub-command and supports the same set of options and queries.
63+
64+ .. parsed-literal ::
65+
66+ :ps: `$ ` module spider -t bar@2:
67+ :sgrdi: `/path/to/modulefiles.2 `:
68+ :sgrhi: `bar/2 `
69+
70+ :sgrdi: `/path/to/modulefiles.3 `:
71+ bar/3
72+ bar/4
73+
74+ The :subcmd: `spider ` sub-command has its own configuration options to control
75+ the content of its output: :mconfig: `spider_indepth `,
76+ :mconfig: `spider_output `, and :mconfig: `spider_terse_output `.
77+
78+ These settings make it possible to define output for :subcmd: `spider ` that
79+ differs from the :subcmd: `avail ` sub-command.
80+
81+ .. parsed-literal ::
82+
83+ :ps: `$ ` module config spider_output -modulepath
84+ :ps: `$ ` module config spider_indepth 0
85+ :ps: `$ ` module spider
86+ :sgrdi: `bar `/ :sgrdi: `foo `/ :sgrdi: `qux `/
87+
88+ When a modulepath is enabled by a specific module, that modulepath is
89+ considered available *via * that module. When the module is loaded, this *via *
90+ information is stored in the :envvar: `__MODULES_LMUSE ` environment variable to
91+ track which modules enable which modulepaths.
92+
93+ By default, the *via * information is included in the standard output of the
94+ :subcmd: `spider ` sub-command. Additionally, the JSON output for both the
95+ :subcmd: `avail ` and :subcmd: `spider ` sub-commands has been updated to include
96+ *via * details for each modulefile.
97+
98+ .. parsed-literal ::
99+
100+ :ps: `$ ` module spider -j bar@2:
101+ {"/path/to/modulefiles.2": {
102+ "bar/2": { "name": "bar/2", "type": "modulefile", "symbols": [], "tags": [], "pathname": "/path/to/modulefiles.2/bar/2", "via": "foo/1"}
103+ },
104+ "/path/to/modulefiles.3": {
105+ "bar/3": { "name": "bar/3", "type": "modulefile", "symbols": [], "tags": [], "pathname": "/path/to/modulefiles.3/bar/3", "via": "foo/2"},
106+ "bar/4": { "name": "bar/4", "type": "modulefile", "symbols": [], "tags": [], "pathname": "/path/to/modulefiles.3/bar/4", "via": "foo/2"}
107+ }}
108+
14109 Always see hidden modules
15110-------------------------
16111
0 commit comments