Skip to content

Preserve sticky module requirements during purge - #693

Open
adrien-cotte wants to merge 1 commit into
envmodules:mainfrom
adrien-cotte:fix/sticky_prereq_purge
Open

Preserve sticky module requirements during purge#693
adrien-cotte wants to merge 1 commit into
envmodules:mainfrom
adrien-cotte:fix/sticky_prereq_purge

Conversation

@adrien-cotte

Copy link
Copy Markdown
Contributor

Purge skips sticky and super-sticky modules but still attempts to unload their non-sticky requirements. This reports an unrelated dependency error without explaining why the requirement remains loaded.

Preserve requirements needed by retained sticky modules and apply the sticky_purge reporting mode to their skipped unload.

Fixes #582

Assisted-by: Codex:gpt-5.6-sol

Purge skips sticky and super-sticky modules but still attempts to unload
their non-sticky requirements. This reports an unrelated dependency error
without explaining why the requirement remains loaded.

Preserve requirements needed by retained sticky modules and apply the
sticky_purge reporting mode to their skipped unload.

Fixes envmodules#582

Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Adrien Cotte <adrien.cotte@asplus.fr>
@xdelaruelle
xdelaruelle force-pushed the fix/sticky_prereq_purge branch from a005bf0 to 2f4a98e Compare September 1, 2026 05:04
Comment thread tcl/report.tcl.in
}

proc getStickyReqUnloadMsg {{tag sticky}} {
return "Unload skipped because module is required by a $tag module"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a shorter message structure: Unload of $tag module requirement skipped

@xdelaruelle xdelaruelle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testsuite should be fixed as CI jobs are failing.

Documentation should be adapted to mention this behavior change, especially in module.rst, changes.rst, the sticky/module-tags design docs and the sticky-modules cookbook.

Also good to check if this has an impact on other stuff mentioning sticky modules like stash-environment, initial-environment, conflict_unload, evaluation-errors. Check these design doc and adapt them if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Silent purge fails when super-sticky module prerequisite isn't super-sticky

2 participants