Skip to content

Commit

Permalink
Update mod designation with tags set by DepRe modules
Browse files Browse the repository at this point in the history
Update module designation with the tags set by reloading dependent
module.

Closes #460.
  • Loading branch information
xdelaruelle committed May 28, 2022
1 parent f907194 commit 6528e54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Modules 5.1.1 (not yet released)
retrieved due to the removal of this directory. (fix issue #457)
* Update tags set through :mfcmd:`prereq` command on all already loaded
requirements. (fix issue #459)
* Update module designation with the tags set by reloading dependent module.
(fix issue #460)


Modules 5.1.0 (2022-04-30)
Expand Down
8 changes: 4 additions & 4 deletions tcl/subcmd.tcl.in
Original file line number Diff line number Diff line change
Expand Up @@ -1107,10 +1107,6 @@ proc cmdModuleLoad {context uasked tag_list args} {
append-path __MODULES_LMEXTRATAG $modtag
}

# record module title (name, variants and tags)
registerModuleDesignation $msgrecid $modname [getVariantList\
$modname 1] [getExportTagList $modname]

# Load phase of dependent module reloading. These modules can adapt
# now that mod is seen loaded. Except if switch action ongoing (DepRe
# load phase will occur from switch)
Expand All @@ -1121,6 +1117,10 @@ proc cmdModuleLoad {context uasked tag_list args} {
failed} depre
}

# record module title (name, variants and tags)
registerModuleDesignation $msgrecid $modname [getVariantList\
$modname 1] [getExportTagList $modname]

# consider evaluation hidden if hidden loaded module is auto loaded
# and no specific messages are recorded for this evaluation
if {$hidden && !$uasked && ![isMsgRecorded]} {
Expand Down
3 changes: 1 addition & 2 deletions testsuite/modules.50-cmds/465-tag-opt.exp
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,7 @@ lappend ans [list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile]
lappend ans [list set LOADEDMODULES foo/1.0:bar/1.0:$mod]
lappend ans [list set __MODULES_LMEXTRATAG foo/1.0&foo:bar/1.0&foo]
lappend ans [list set __MODULES_LMTAG foo/1.0&foo&auto-loaded:bar/1.0&foo]
#FIXME: tag applied by DepRe reloading module does not appear on info messages
set tserr [msg_top_load bar/1.0 {} {} $mod]
set tserr [msg_top_load {bar/1.0 <foo>} {} {} $mod]
testouterr_cmd sh "load --auto bar/1.0" $ans $tserr

# both requirement loaded, but not tagged
Expand Down

0 comments on commit 6528e54

Please sign in to comment.