Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ Modules 5.8.0 (not yet released)
value. (fix issue #712)
* Doc: add :ref:`subcmd-alias` design notes.
* Doc: add :ref:`spack-like-sub-command-names` cookbook recipe.
* Fix :subcmd:`avail` and :subcmd:`spider` sub-commands error when symbolic
versions are reported as independent entries (``indesym`` element set in
output configuration) and a symbolic version is defined in a directory
that only contains hidden modules. Shell completion of module names was
also affected, as completion scripts rely on this output element.


.. _5.7 release notes:
Expand Down
7 changes: 7 additions & 0 deletions tcl/modfind.tcl.in
Original file line number Diff line number Diff line change
Expand Up @@ -3725,6 +3725,13 @@ proc getModules {dir {mod {}} {fetch_mtime 0} {search {}} {filter {}}} {
# skip adding element to directory content if in error
} elseif {[info exists err_list($elt)]} {
set direlt .
# withdraw version reported independently if the directory it is
# defined in is not found (as it holds no visible module), like when
# version is reported along its target
} elseif {$elt_type eq {version} && [set pardir [file dirname\
$elt]] ne {.} && ![info exists found_list($pardir)]} {
unset mod_list($elt)
set direlt .
} else {
set direlt $elt
}
Expand Down
5 changes: 5 additions & 0 deletions testsuite/modules.70-maint/360-avail_output.exp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ setenv_var MODULES_AVAIL_TERSE_OUTPUT key:indesym
testouterr_cmd sh {avail -t foo/bar} OK "foo/bar"
testouterr_cmd sh {avail -t foo/1.0} OK "foo/1.0"
unsetenv_var MODULES_AVAIL_TERSE_OUTPUT
# symbolic version defined in a directory that only holds hidden modules
setenv_path_var MODULEPATH $modpath
testouterr_cmd sh {avail -t -o indesym loc_rc010/subdir} OK {}
testouterr_cmd sh {avail -t -o indesym loc_rc010/subdir/default} OK {}
testouterr_cmd sh {avail -t -o indesym loc_rc010/2} OK loc_rc010/2.0
setenv_path_var MODULEPATH $modpath.2
testouterr_cmd_re sh {avail -w 120 -o modulepath:key:dirwsym:indesym hide3/sub2} OK "$modlin $modpathre.2 $modlin\nhide3/sub2/4.0 hide3/sub2/5.0 hide3/sub2/default hide3/sub2/new hide3/sub2/sym"
testouterr_cmd_re sh {avail -w 120 -o modulepath:key:indesym hide3/sub2} OK "$modlin $modpathre.2 $modlin\nhide3/sub2/4.0 hide3/sub2/5.0 hide3/sub2/default hide3/sub2/new hide3/sub2/sym"
Expand Down
5 changes: 5 additions & 0 deletions testsuite/modules.70-maint/362-spider_output.exp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ setenv_var MODULES_SPIDER_TERSE_OUTPUT key:indesym
testouterr_cmd sh {spider -t foo/bar} OK "foo/bar"
testouterr_cmd sh {spider -t foo/1.0} OK "foo/1.0"
unsetenv_var MODULES_SPIDER_TERSE_OUTPUT
# symbolic version defined in a directory that only holds hidden modules
setenv_path_var MODULEPATH $modpath
testouterr_cmd sh {spider -t -o indesym loc_rc010/subdir} OK {}
testouterr_cmd sh {spider -t -o indesym loc_rc010/subdir/default} OK {}
testouterr_cmd sh {spider -t -o indesym loc_rc010/2} OK loc_rc010/2.0
setenv_path_var MODULEPATH $modpath.2
testouterr_cmd_re sh {spider -w 120 -o modulepath:key:dirwsym:indesym hide3/sub2} OK "$modlin $modpathre.2 $modlin\nhide3/sub2/4.0 hide3/sub2/5.0 hide3/sub2/default hide3/sub2/new hide3/sub2/sym"
testouterr_cmd_re sh {spider -w 120 -o modulepath:key:indesym hide3/sub2} OK "$modlin $modpathre.2 $modlin\nhide3/sub2/4.0 hide3/sub2/5.0 hide3/sub2/default hide3/sub2/new hide3/sub2/sym"
Expand Down
Loading