Commit Graph

3803 Commits

Author SHA1 Message Date
Xavier Delaruelle
a015be2d26 doc: add variant info to module-info in modulefile(4) 2021-07-11 13:47:50 +02:00
Xavier Delaruelle
f77cde3eeb doc: desc. MODULES_VARIANT_SHORTCUT in module(1) 2021-07-11 13:47:50 +02:00
Xavier Delaruelle
54a510e373 doc: desc. MODULES_LMVARIANT in module(1) 2021-07-11 13:47:50 +02:00
Xavier Delaruelle
6d4ae54962 cirrus: start darwin test by updating homebrew
Fix inconsistent issue with deprecated homebrew setup.
2021-07-07 06:37:11 +02:00
Xavier Delaruelle
fe55bf40ae doc: desc. no implicit req if module not found by try-load 2021-07-06 07:51:41 +02:00
Xavier Delaruelle
592d1c7833 doc: desc. getenv on display eval mode in modulefile(4) 2021-07-06 07:51:41 +02:00
Xavier Delaruelle
d9c68cb126 doc: desc. ModuleVariant in modulefile(4) 2021-07-06 07:51:41 +02:00
Xavier Delaruelle
5f3e153fdb doc: mention getenv introduction release 2021-07-06 07:51:41 +02:00
Xavier Delaruelle
19d36b93df doc: desc. getvariant in modulefile(4) 2021-07-06 07:51:41 +02:00
Xavier Delaruelle
14eea3fc2a doc: desc. try-load addition in MIGRATING 2021-07-05 06:39:10 +02:00
Xavier Delaruelle
ad21ba326c doc: desc. try-load addition in NEWS 2021-07-04 21:44:19 +02:00
Xavier Delaruelle
e26a2d86cf init: update stderr redirection in fish init script
Use of '^' character to redirect stderr has been deprecated starting
Fish version 3.1. It now produces an error. Stderr should be redirected
with '2>' like on SH shells. Hopefully '2>' redirection is also
supported on old Fish versions (all version 2 support it).

This update was performed on modulecmd.tcl with 711c901 commit, but fish
initialization script was forgotten at that time.
2021-07-04 20:56:45 +02:00
Xavier Delaruelle
0114f34dd8 doc: use catch to get v3 module load behavior in modfile
Add description to the diff doc to get the behavior of Modules v3 back
when using `module load` command in modulefile. To pursue evaluation
even when the `module load` fails, enclose it within a `catch` Tcl
command.

Fixes #197.
2021-07-04 20:34:57 +02:00
Xavier Delaruelle
1a2de0570c doc: fix options on subcmd aliases in module(1) 2021-07-04 20:34:57 +02:00
Xavier Delaruelle
297cc4d04e doc: desc try-load in module(1) man 2021-07-04 20:34:57 +02:00
Xavier Delaruelle
1756b5a35c ts: test try-load in rc file 2021-07-04 20:34:57 +02:00
Xavier Delaruelle
3441b6eda5 ts: add specific tests for try-load subcmd in 50/490 2021-07-04 20:34:57 +02:00
Xavier Delaruelle
b35e306f0a ts: adapt existing tests for try-load subcmd 2021-07-04 20:34:57 +02:00
Xavier Delaruelle
836aa2b750 No requirement record when try-load fails
Do not record the prereq requirement on the try-loaded module, if this
load temptative fails.
2021-07-04 20:34:57 +02:00
Xavier Delaruelle
9df025f76a Add 'try-load' sub-command
Introduce the `try-load` sub-command that could also be aliased
`try-add`. try-load attempts to load modulefile(s) but does not raise
error (message or code) if module(s) cannot be found (does not exist or
forbidden).

Error is still raised if an evaluation error occurs.

The `try_modulefile` internal state is added to transmit the information
that the load (or unload when load is proccessed during an unload
evaluation) is performed in *try* mode or not.

Fixes #392
2021-07-04 20:33:43 +02:00
Xavier Delaruelle
aa04862eea doc: desc. try-load in diff doc 2021-06-30 21:55:57 +02:00
Xavier Delaruelle
e11acd3fcb init: add try-load sub-cmd to completion scripts 2021-06-30 21:54:06 +02:00
Xavier Delaruelle
09aec34876 init: add edit sub-cmd to completion scripts 2021-06-30 21:48:49 +02:00
Xavier Delaruelle
e50309534b Dead code cleanup in parseModuleSpecificationProcAdvVersSpec
Remove code branches in the parseModuleSpecificationProcAdvVersSpec
procedure that are never reached due to the code refactoring done for
boolean variant and variant shortcut.
2021-06-29 07:32:43 +02:00
Xavier Delaruelle
5e9ff69138 ts: unset MODULES_LMVARIANT on clear subcmd tests 2021-06-29 07:32:43 +02:00
Xavier Delaruelle
b3d9a4aec8 Unset MODULES_LMVARIANT env var on clear subcmd 2021-06-28 22:35:51 +02:00
Xavier Delaruelle
8c246fac60 doc: refine desc of variant_shortcut in design 2021-06-28 22:09:15 +02:00
Xavier Delaruelle
fe9223ecd9 ts: test specific mod desig. with variant_shortcut in 70/377 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
7c0a930d27 ts: test collection with variant_shortcut in 61 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
96380a0604 Ignore shortcut when reporting variant set for collection
When saving collection, do not use variant shortcut to produce the
module designation to save in collection files, as shortcuts are a
configuration that could evolve over time.

Add the '5' report mode in getVariantList procedure to avoid defined
shortcuts when producing module designation.
2021-06-28 20:44:24 +02:00
Xavier Delaruelle
8c495f6191 ts: test variant_shortcut use in modfile in 70/377 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
cce649332e ts: test module tag with variant_shortcut in 70/377 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
97c466d7ac ts: test unload subcmd with variant_shortcut in 70/377 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
81f2dcd4ef ts: test load subcmd with variant_shortcut in 70/377 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
a616f7e86f ts: test list subcmd with variant_shortcut in 70/377 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
4b8bd959ca ts: add variant to default MODULES_LIST_OUTPUT value 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
e8a45109b3 ts: variant_shortcut specific config tests in 70/377 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
ef9f08cb16 ts: update variant explanation in display key in 70/370 2021-06-28 20:44:24 +02:00
Xavier Delaruelle
e8098eb981 Explain each variant shortcut in display key
For each variant shortcut reported, add an entry in the display key to
expose the variant name associated with the shortcut.
2021-06-28 20:44:24 +02:00
Xavier Delaruelle
86e66ad419 Rework display key for variant
Use a single global array '::g_used_va' to track usage of the different
variant report form (var=val, +var, ...).

Use the {variant=value} syntax to explain enabled or disabled boolean
variant in display key: {+variant}={variant=on}.

As a consequence of last point, '{variant=value}' is added to display
key to explain the {variant=on} or {variant=off} part of boolean variant
key entry.
2021-06-28 20:44:23 +02:00
Xavier Delaruelle
176ab12838 Use defined shortcut to report variant
Like boolean variants are reported '+name' or '-name', variant with a
defined shortcut are reported using this shortcut, for instance
'%value'.
2021-06-28 20:44:23 +02:00
Xavier Delaruelle
5684aadc13 Parse variant shortcut in module specification
Adapt the parseModuleSpecification process to also resolve the variant
shortcut defined when analyzing module specifications.
2021-06-28 20:44:23 +02:00
Xavier Delaruelle
20a7015a41 init: add variant_shortcut config to completion script 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
10bd315154 ts: adapt existing config tests for variant_shortcut 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
178ddf5c9c ts: clean any variant_shortcut config 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
68d0cf2764 doc: desc --with-variant-shortcut in INSTALL 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
f4b69a2e9d install: add --with-variant-shortcut configure option 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
973bb791c9 Add 'variant_shortcut' config option 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
fa44c979c1 doc: update boolean variant specs 2021-06-22 06:17:58 +02:00
Xavier Delaruelle
1fee8ee930 ts: fix tests with -* arg and advverspec enabled in 00/071 2021-06-21 20:44:07 +02:00