-
Notifications
You must be signed in to change notification settings - Fork 216
refactor generation of required environment variables in module files + deprecate make_module_req_guess method in EasyBlock class
#4653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@boegel look all the beautiful green tests! Compared to what I showed on the meeting yesterday, I have undone all changes to This seems ready on my side. I tested it with several easyblocks that add custom stuff to |
…d_module_search_path
…nment variables for module files
…r modules on load
…ed library directories
…ding paths for environment of modules
…er explicit checks in the module step
…vironmentVariable
…file of subsequent installations
add test to verify that environment variables don't leak into module file of subsequent installations
|
@lexming Can you look into fixing the merge conflict, and get the test to pass? |
…module_req_guess is detected
… property based on new ModEnvVarType enum
…e to control requirements of paths to directories
…ular order of list entries
…link to something else than LibSymlink.UNKNOWN
…TOP_FILES rather than string values
minor changes w.r.t. ModuleLoadEnvironment and ModEnvVarType
This reverts commit 13f735c.
|
@boegel actually the tests is what saved us, they properly failed. That change in |
|
updated description to match state of code at merge time |
Goal is to lay groundwork to be able to fix #3331 and add new option to control which search path variables are added in modules by simplifying the code injecting environment variables to module files.
This PR should not alter the resulting module files to what is currently generated by EB. If it changes the list of environment variables it should have no effect (e.g. because those paths are empty).
Simplification of logic handling environment variables for module files:
make_module_reqonly populates modules with variables that contain search paths (i.e.ModuleEnvironmentVariablewith atypeofis_pathcategory)ModuleEnvironmentVariableis defined byModEnvVarTypewhich has 3 path-like types with different levels of requirements on the existence of those paths(fixes directories that don't contain any library files shouldn't be added to
$LD_LIBRARY_PATH#3504)ModuleEnvironmentVariableneed to be explicitly defined withModEnvVarType.PATH_WITH_TOP_FILESto require populated top dirsPATHandLD_LIBRARY_PATHlib64that generate duplicate paths and need explicit exceptions with:lib64are always ignored iflib64is a symlink toliblibare always ignored iflibis a symlink tolib64lib32from list of library search pathsChangelog:
ModuleEnvironmentVariablepseudo-dataclass toeasybuild.tools.modulesto hold definitions of environment variables for modulesModuleLoadEnvironmentclass toeasybuild.tools.modulesto hold environment definition for modules on loadEasyBlock.make_module_req_guessin favor ofModuleLoadEnvironmenteasybuild.framework.easyblockto define possible linkage states of lib directoriesinstall_lib_symlinkattribute to EasyBlcok to keep track of symlink status between lib dirseasybuild.tools.configthat define known directories for binaries, libraries and headerseasyblock.make_module_reqby working with absolute paths instead