Skip to content

Commit 7cec68b

Browse files
committed
Register tag list in module designation
Update registerModuleDesignation procedure to also register the list of tags applied along module name and variants.
1 parent 50fb319 commit 7cec68b

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

tcl/report.tcl.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,8 @@ proc isEltInReport {elt {retifnotdef 1}} {
710710
return $ret
711711
}
712712
713-
proc registerModuleDesignation {evalid mod vrlist} {
714-
set ::g_moduleDesgination($evalid) [list $mod $vrlist]
713+
proc registerModuleDesignation {evalid mod vrlist taglist} {
714+
set ::g_moduleDesgination($evalid) [list $mod $vrlist $taglist]
715715
}
716716
717717
proc getModuleDesignation {from {mod {}} {sgr 1}} {
@@ -720,19 +720,22 @@ proc getModuleDesignation {from {mod {}} {sgr 1}} {
720720
spec {
721721
set moddesig [getModuleNameAndVersFromVersSpec $mod]
722722
set vrlist [getVariantList $mod 1 0 1]
723+
set taglist {}
723724
}
724725
loaded {
725726
set moddesig $mod
726727
set vrlist [getVariantList $mod 1]
728+
set taglist {}
727729
}
728730
default {
729731
# fetch information from passed evaluation id
730732
if {[info exists ::g_moduleDesgination($from)]} {
731-
lassign $::g_moduleDesgination($from) moddesig vrlist
733+
lassign $::g_moduleDesgination($from) moddesig vrlist taglist
732734
# if not found, use passed spec to compute designation
733735
} else {
734736
set moddesig [getModuleNameAndVersFromVersSpec $mod]
735737
set vrlist [getVariantList $mod 1 0 1]
738+
set taglist [getExportTagList $mod]
736739
}
737740
}
738741
}

tcl/subcmd.tcl.in

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,11 @@ proc cmdModuleLoad {context uasked tag_list args} {
899899
}
900900
}
901901

902-
# record module title (with the variant specified on load call) prior
903-
# module evaluation to get this title ready in case of eval error
904-
registerModuleDesignation $msgrecid $modname [getVariantList $mod 1 0 1]
902+
# record module title (with the variant specified on load call, and no
903+
# tag list) prior module evaluation to get this title ready in case of
904+
# eval error
905+
registerModuleDesignation $msgrecid $modname [getVariantList $mod 1 0\
906+
1] {}
905907

906908
pushSettings
907909
if {[set errCode [catch {
@@ -920,7 +922,7 @@ proc cmdModuleLoad {context uasked tag_list args} {
920922
if {$isloaded && [isVerbosityLevel verbose2]} {
921923
reportInfo "Module '$modname' is already loaded"
922924
registerModuleDesignation $msgrecid $modname\
923-
[getVariantList $modname 1]
925+
[getVariantList $modname 1] [getExportTagList $modname]
924926
reportMsgRecord "Loading [getModuleDesignation $msgrecid {}\
925927
2]"
926928
}
@@ -1102,9 +1104,9 @@ proc cmdModuleLoad {context uasked tag_list args} {
11021104
append-path __MODULES_LMEXTRATAG $modtag
11031105
}
11041106

1105-
# record module title (name and variant)
1107+
# record module title (name, variants and tags)
11061108
registerModuleDesignation $msgrecid $modname [getVariantList\
1107-
$modname 1]
1109+
$modname 1] [getExportTagList $modname]
11081110

11091111
# Load phase of dependent module reloading. These modules can adapt
11101112
# now that mod is seen loaded. Except if switch action ongoing (DepRe
@@ -1198,10 +1200,11 @@ proc cmdModuleUnload {context match auto force onlyureq onlyndep args} {
11981200
# set a unique id to record messages related to this evaluation.
11991201
set msgrecid unload-$modnamevr-[depthState modulename]
12001202

1201-
# record module title (with the variant specified on unload call) prior
1202-
# module evaluation to get this title ready in case of eval error
1203+
# record module title (with the variant specified on unload call, and no
1204+
# tag list) prior module evaluation to get this title ready in case of
1205+
# eval error
12031206
registerModuleDesignation $msgrecid $modname [getVariantList $modnamevr\
1204-
1 0 1]
1207+
1 0 1] {}
12051208

12061209
# if a switch action is ongoing...
12071210
if {[info exists swprocessing]} {
@@ -1255,8 +1258,9 @@ proc cmdModuleUnload {context match auto force onlyureq onlyndep args} {
12551258
registerModuleEvalAttempt $context $modnamevr
12561259
registerModuleEvalAttempt $context $modfile
12571260

1258-
# record module title (name and variant)
1259-
registerModuleDesignation $msgrecid $modname [getVariantList $modname 1]
1261+
# record module title (name, variants and tags)
1262+
registerModuleDesignation $msgrecid $modname [getVariantList $modname\
1263+
1] [getExportTagList $modname]
12601264

12611265
pushSettings
12621266
if {[set errCode [catch {
@@ -2318,6 +2322,7 @@ proc cmdModuleRefresh {} {
23182322
set lmvr $lm
23192323
}
23202324
set lmfile [getModulefileFromLoadedModule $lm]
2325+
set taglist [getExportTagList $lm]
23212326

23222327
# refreshing module is visible by default
23232328
set hidden 0
@@ -2329,9 +2334,9 @@ proc cmdModuleRefresh {} {
23292334
# register record message unique id (now we know mod will be evaluated)
23302335
pushMsgRecordId $msgrecid
23312336

2332-
# record module title (with the variant specified on load call) prior
2333-
# module evaluation to get this title ready in case of eval error
2334-
registerModuleDesignation $msgrecid $lm $vrlist
2337+
# record module title (with the variants and tags of loaded module)
2338+
# prior module evaluation to get this title ready in case of eval error
2339+
registerModuleDesignation $msgrecid $lm $vrlist $taglist
23352340

23362341
# run modulefile, restore settings prior evaluation if error and
23372342
# continue to evaluate the remaining loaded modules

0 commit comments

Comments
 (0)