Add customization of env modules short description#1114
Add customization of env modules short description#1114mwilliammyers wants to merge 1 commit intospack:developfrom mwilliammyers:module-short-description
Conversation
|
@alalazo: any comments? |
|
As it is right now this isn't super useful, but it might be more useful for Also note that currently this PR defaults to a package provided short description over this scheme. Does everyone agree with that default? |
|
@tgamblin @mwilliammyers I have no objection in general on the scheme, but I was wondering if it could make sense to have something like: modules:
enable:
- tcl
- dotkit
tcl:
naming_scheme: '{name}/{version}_{compiler.name}-{compiler.version}'
all:
short_description: '{name}@{version} {compiler.name}@{compiler.version}'
<other constraint>:
short_description: <more-specialized-rule>The rationale is that the naming scheme is something that must be consistent over all the modules to make sense, while a short description can be customized for different set of packages. For the defaults : I would prefer a rule in |
|
@alalazo Yeah I agree with you on all accounts. I hadn't thought of that. Should we prompt the user to make a decision interactively or just warn the user that we are overriding it with |
|
Personally I like warnings better than prompts, as warnings don't prevent non-interactive use. I forget when exactly I approved the ever-present warning in I agree with @alalazo on @alalazo: I was looking at |
@mwilliammyers I would go for a
@tgamblin Do you mean the ever present prompt in spack uninstall ? I added that one to avoid deleting packages accidentally... but as I like non-interactive use too I added the
👍 for this |
Yep, oops -- I mean the prompt. I like it to be non-interactive by default, though I think a preference to make it interactive (like |
I can implement the default short description behavior in #3183. Regarding customization you can already override the context dictionary both from package and |
|
@mwilliammyers I was wondering if you agree closing this PR. I am reworking module file generation in #3183 to introduce template engines and |
|
Closing as #3183 as got this:
implemented. For instance a lua module file for metis contains: -- -*- lua -*-
-- Module file created by spack (https://github.com/LLNL/spack) on 2017-09-20 09:26:51.800473
--
-- [email protected]%[email protected]~debug~gdb~int64~real64+shared arch=linux-ubuntu14.04-x86_64 /mknqhcy
--
whatis([[Name : metis]])
whatis([[Version : 5.1.0]])
whatis([[Short description : METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.]])
help([[METIS is a set of serial programs for partitioning graphs, partitioning
finite element meshes, and producing fill reducing orderings for sparse
matrices. The algorithms implemented in METIS are based on the
multilevel recursive-bisection, multilevel k-way, and multi-constraint
partitioning schemes.]])
... |
Allows for the customization of the short description created by environment modules. It is customized in the same manner as
naming_scheme: