Skip to content

Commit 92cce2c

Browse files
committed
Add Tagging message block
When just tagging a module already loaded, report a *Tagging* message with module denomination. Like for *Loading* message, it is only seen during a restore/source sub-commands or in verbose mode.
1 parent 9bff25c commit 92cce2c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tcl/subcmd.tcl.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,6 +2412,14 @@ proc cmdModuleTag {unset_extra tag_list args} {
24122412
unset_list
24132413
if {[llength $diff_list] > 0 || ($unset_extra && [llength $unset_list]\
24142414
> 0)} {
2415+
# set a unique id to record messages related to this evaluation.
2416+
set msgrecid tag-$modnamevr-[depthState modulename]
2417+
pushMsgRecordId $msgrecid
2418+
# record module title (with the variant but no tag list) prior
2419+
# evaluation to get this title ready in case of error
2420+
registerModuleDesignation $msgrecid $modname [getVariantList\
2421+
$modnamevr 1] {}
2422+
24152423
lappendState mode unload
24162424
# first unset tags declared for this module on LM env var
24172425
if {[set modtag [getExportTagList $modname 1]] ne {}} {
@@ -2464,6 +2472,13 @@ proc cmdModuleTag {unset_extra tag_list args} {
24642472
append-path __MODULES_LMEXTRATAG $modtag
24652473
}
24662474
lpopState mode
2475+
2476+
# update module designation now the additional tags are set
2477+
registerModuleDesignation $msgrecid $modname [getVariantList\
2478+
$modname 1] [getExportTagList $modname]
2479+
# report tagging evaluation
2480+
reportMsgRecord "Tagging [getModuleDesignation $msgrecid {} 2]"
2481+
popMsgRecordId
24672482
}
24682483
}
24692484

0 commit comments

Comments
 (0)