easybuild-framework
easybuild-framework copied to clipboard
Avoid using a priority in prepend_module_path (Lmod) to avoid costly module calls
This PR avoids using a priority in prepend_module_path
(Lmod) which means that $MODULEPATH can be directly modified by this and all subsequent calls to either prepend_module_path
or use
which is a lot faster than calling Lmod.
The test has been changed so it now expects that prepend_module_path
actually does prepend even when no priority is passed and another priority is in effect.
For compatibility I kept the constant 10000
as HIGH_PRIORITY
so user sites that really want other module paths to take preference can use any higher priority.
As discussed in Slack this change is unlikely to effectively change any behavior and will very likely continue to work, see https://github.com/TACC/Lmod/issues/509#issuecomment-814502541
Fixes #3631
@Flamefire Let's close #3634 and continue the discussion here. When this PR (#3636) gets merged, #3634 will also be merged automatically (since the commits included in here are also included in there), but context w.r.t. the discussion will be missing...
@Flamefire Conflict resolution needed
Rebased and conflicts resolved. That was quite a lot... Please double-check the changes
This now looks good to me, but since it's large i'll wait for @boegel to review before merging.
This one has a conflict
@boegel A final review by you needed.