-
Notifications
You must be signed in to change notification settings - Fork 119
Description
module switch command is sometimes used in modulefile to ensure a specific version of a module requirement will be loaded, whatever the current environment state.
In this case a module switch foo foo/1.2 command is set in a bar/1 module means that foo/1.2 is required by bar/1 and this foo/1.2 version should replace any version of foo currently loaded version.
Consistency mechanism introduced in version 4.2 of Modules currently breaks this use case:
$ cat /path/to/modulefiles/bar/1
#%Module
module switch foo foo/1.2
$ module load bar/1
Loading foo/1.2
ERROR: Conflicting 'bar/1' is loading
Loading bar/1
WARNING: Load of switched-on foo/1.2 failed
ERROR: Load of requirement 'foo/1.2' failedAny version of foo is declared conflicting with bar/1 which breaks the load of swapped-on module foo/1.2.
Consistency mechanism should be adapted to allow such use case. For instance if the specification of the module to swap-off matches the specification of the module to swap-on, do not define a conflict against swapped-off module.