Skip to content

Commit 41d9bf0

Browse files
committed
Clear auto-loaded/keep-loaded tags when unloading
Remove from the in-memory knowledge the auto-loaded and keep-loaded tags set on unloading modules. These tags are then forgotten and will not be reapplied if module is currently reloading.
1 parent 262e5f3 commit 41d9bf0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tcl/subcmd.tcl.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,13 @@ proc cmdModuleUnload {context match auto force onlyureq onlyndep args} {
14211421
# unset tags declared for this module
14221422
if {[set modtag [getExportTagList $modname 1]] ne {}} {
14231423
remove-path __MODULES_LMTAG $modtag
1424+
# also remove the auto-loaded and keep-loaded tags from
1425+
# in-memory knowledge not to re-apply them if module is reloaded
1426+
# in other conditions
1427+
unsetModuleTag $modname auto-loaded keep-loaded
1428+
if {$modnamevr ne {} && $modname ne $modnamevr} {
1429+
unsetModuleTag $modnamevr auto-loaded keep-loaded
1430+
}
14241431
}
14251432
if {[set modtag [getExtraTagList $modname 1]] ne {}} {
14261433
remove-path __MODULES_LMEXTRATAG $modtag

0 commit comments

Comments
 (0)