I am setting up Environment Modules for a server and have two modules: test1 and test2.
Test1 needs java 1.7.0 and test2 needs java 1.8.0. If I use prereqs/conflicts, as seems to be standard practice, then I must load java 1.7.0 before loading test1 but if I load test2 afterwards and module switch java to 1.8.0, test1 remains loaded and may still be functional in a warped manner.
The user, of course, has to do the module switch themselves but is there any way to avoid this scenario so that test1 is unloaded if its prereq is. It may be fairly easy to keep track of in the above scenario but if there are lots of tools each with multiple dependencies I expect problems to arise. Is there some functionality of environment modules I'm not aware of or misunderstanding?