Skip to content

Commit

Permalink
doc/ts: desc. some limitation of full path module tags
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Sep 29, 2023
1 parent 1e293dd commit aebb34a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/source/design/sticky-modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,14 @@ Current limitations
- If specified swapped-on module is the generic module name, for instance *foo*
- ``switch`` sub-command raises an error even if the sticky module is the default version (either implicit or explicitly set) for this module

- When swapping a sticky module defined over a full path modulefile by another
in different modulepath but with same module name and version

- This switched-on module is currently considered as the sticky module
reloading

- When swapping a sticky module by itself but specified as full path module
swap command is not able to detect same module is reloading


.. vim:set tabstop=2 shiftwidth=2 expandtab autoindent:
22 changes: 22 additions & 0 deletions testsuite/modules.50-cmds/463-sticky-full-path.exp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ set tserr [msg_switch {tag/1.1 <sS>} foo/2.0 $err_superstickyunload]
testouterr_cmd sh {switch tag/1.1 foo/2.0} ERR $tserr


setenv_var TESTSUITE_FPMOD_TAG sticky1
setenv_loaded_module [list tag/1.0] [list $mp/tag/1.0]
setenv_var __MODULES_LMTAG tag/1.0&sticky
setenv_path_var MODULEPATH $modpath.3:$mp

set ans [list]
lappend ans [list set _LMFILES_ $modpath.3/tag/1.0]
lappend ans [list set LOADEDMODULES tag/1.0]
lappend ans [list set __MODULES_LMTAG tag/1.0&sticky]
# FIXME: sticky tag applies to full path module, should not escape to
# another module with same name but in different modulepath
testouterr_cmd sh {switch tag/1.0} $ans {}

# FIXME: sticky tag applies to full path module, should be able to reload
# when specified full path
setenv_var MODULES_ADVANCED_VERSION_SPEC 0
set tserr [msg_switch {tag/1.0 <S>} $mp/tag/1.0 $err_stickyunload]
testouterr_cmd sh "switch $mp/tag/1.0" ERR $tserr
setenv_path_var MODULEPATH $mp
unsetenv_var MODULES_ADVANCED_VERSION_SPEC


#
# restore
#
Expand Down

0 comments on commit aebb34a

Please sign in to comment.