Check module extensions support within Tcl modulefiles#4978
Merged
boegel merged 3 commits intoeasybuilders:developfrom Aug 19, 2025
Merged
Check module extensions support within Tcl modulefiles#4978boegel merged 3 commits intoeasybuilders:developfrom
boegel merged 3 commits intoeasybuilders:developfrom
Conversation
Use the centrally defined REQ_VERSION_EXTENSIONS variable of ModuleTool classes to build condition guard for module extensions in Lua modulefiles. Signed-off-by: Xavier Delaruelle <[email protected]>
Create a specific "check_version" method for ModuleGeneratorTcl class. Module tool version is checked with "LMOD_VERSION" environment variable for Lmod and "ModuleToolVersion" Tcl variable for Environment Modules. "ModuleToolVersion" is available since Environment Modules 4.7.0, so it is not possible to check a version below 4.7.0. Signed-off-by: Xavier Delaruelle <[email protected]>
d4461ee to
c193811
Compare
boegel
reviewed
Aug 13, 2025
Instead of making EasyBuild check if module extensions are supported by module tool to generate the proper Tcl modulefiles, move this check directly within modulefile code, like done with Lua modulefiles. It means module extensions code is always written in modulefile, but a condition guards it, to execute this code only if the version of the module tool evaluating the modulefile supports it. So instead of checking the version of the module tool used by EasyBuild, the check is made on the module tool that evaluates the generated modulefiles. Even with this new approach, the "supports_extensions" ModuleTool state is kept to cope with older ModuleTool, like EnvironmentModulesC. Signed-off-by: Xavier Delaruelle <[email protected]>
c193811 to
96be842
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of making EasyBuild check if module extensions are supported by module tool to generate the proper Tcl modulefiles, move this check directly within modulefile code, like done with Lua modulefiles.
It means module extensions code is always written in modulefile, but a condition guards it, to execute this code only if the version of the module tool evaluating the modulefile supports it.
So instead of checking the version of the module tool used by EasyBuild, the check is made on the module tool that evaluates the generated modulefiles.
With this new approach, the "supports_extensions" ModuleTool state is now useless thus it is removed.