Modules in directories and fixes for setup-env.csh #498
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.
This PR puts module files for the same program in the same directory named for the program. This will require the modules to be regenerated,
spack module refresh
So, binutils, for example, would be laid out as follows:
This is a common scheme for module files and opens up several features.
This is where there is an issue with spack generated modules as the dag_hash could wind up playing a role here.
I made DotKit have the same structure but I do not know much about DotKit so I do not know if that is appropriate. If not, that could be changed. This requires the spec.name to be available in the setup-env scripts. While I was testing this I took a stab at fixing the csh $SYS_TYPE handling. I tried to make it consistent with the '.sh' version but I may be missing something on that.
The main remaining issue is setting a default value. For the module heuristics the hash will lead to unpredictable settings if the modules can not be distinguished prior to the hash. For manual site specific settings, the hash is not human parsable so I think the naming scheme for module files may need to be tweaked down the road. Here is an example of what lmod sees for binutils on my system.