Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no error when omitting variant specification on a module display #406

Closed
xdelaruelle opened this issue Aug 17, 2021 · 0 comments
Closed
Milestone

Comments

@xdelaruelle
Copy link
Member

When a module defines variants, they should be specified for any module evaluation.

$ ml show foo  
-------------------------------------------------------------------
/path/to/modulefiles/foo/1.0:
 
variant         --boolean bar
ERROR: No value specified for variant 'bar'
  Allowed values are: 1 0 yes no true false on off
-------------------------------------------------------------------

In case of a display evaluation it is a bit harsh to ask for all variant without a default value defined to be specified. As module display may be invoked to understand what are the variants defined by the module.

It seems better to help users understand modulefile content to report variants without an error is no value is provided, then maybe end in error if the modulefile make use of the variant value later in the code, but at least user will obtain all the information on variants if they have been correctly defined at the start of the modulefile.

@xdelaruelle xdelaruelle added this to the 5.0 milestone Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant