Commit Graph

2981 Commits

Author SHA1 Message Date
Xavier Delaruelle
b612bf5eae ts: adapt existing tests for new trace verbosity 2020-09-06 15:31:04 +02:00
Xavier Delaruelle
e325ce434e install: add support for MinGW platform
Look for `make` rather `gmake` on MinGW and build library with a `.dll`
extension on this platform.
2020-09-06 15:31:04 +02:00
Xavier Delaruelle
67292eae25 doc: finalize module-hide desc. in MIGRATING 2020-09-06 15:31:04 +02:00
Xavier Delaruelle
06d68bfd69 Rework trace verbosity level
Report module resolution/search/selection/evaluation to trace big steps
of modulecmd.tcl activity.
2020-09-06 09:34:06 +02:00
Xavier Delaruelle
ff357907ec ts: test debug2 verbosity in 70/{220,230} 2020-09-05 21:39:27 +02:00
Xavier Delaruelle
830e2ca5a7 doc: desc. debug2 verbosity mode in diff/man/NEWS/INSTALL 2020-09-05 21:39:27 +02:00
Xavier Delaruelle
aa0c357260 Rework current trace verbose mode into debug2 mode
Report procedure call in addition to other debug messages through the
`debug2` verbosity level rather the `trace` level (that is preserved for
another task).

When -D/--debug option is set multiple times, `debug2` mode is set.
2020-09-05 15:35:44 +02:00
Xavier Delaruelle
460bf7c84a Add caller argument to reportDebug proc
Introduce the `caller` argument to the reportDebug procedure to get the
ability to define the calling procedure name to report. This argument is
especially used by the initial reportDebug procedure set prior report
initialization, to send toward final reportDebug procedure the actual
caller name.
2020-09-05 15:35:44 +02:00
Xavier Delaruelle
e039eb9fac script: add avail3/whatis3 tests to mb
Bench new hide/forbid features mixed with advanced version specifiers
syntax. These new tests only apply to newer versions.
2020-09-02 06:09:17 +02:00
Xavier Delaruelle
cdb338b4fe doc: merge release of version 4.5.3 2020-08-31 21:43:14 +02:00
Xavier Delaruelle
db364fc8b3 Make --before matches if strictly below
Instead of matching past or current time, make value of `--before`
option only match if specified time is over.
2020-08-31 13:19:19 +02:00
Xavier Delaruelle
143ced92f1 ts: help old dejagnu version to load msgcat cmd 2020-08-31 07:03:03 +02:00
Xavier Delaruelle
d10d25d565 ts: test when nealy-forbidden tag applies 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
89386f8916 doc: desc. nearly-forbidden feature and opts in design notes 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
0a0516db98 doc: desc. nearly-forbidden feature and opts in NEWS 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
9f0e64badd doc: desc. --nearly-message option in modulefile(4) man 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
55370d8541 Add --nearly-message option to module-forbid command
Add the --nearly-message option on module-forbid command to enable set
of specific additionnal error message when an attempt to evaluate a
*nearly forbidden* module is made.

When defined, record message as a property of the nearly-forbidden tag.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
e8d656d0dd Warn when evaluate a nearly-forbidden module
Produce a warning message when a module with *nearly-forbidden* is
evaluated. Message produced indicate the date time starting when module
will effectively be forbidden.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
a87706dcfd Set nearly-forbidden tag if in range
Update parseApplicationCriteriaArgs procedure to get a *near range in
seconds* as first argument, then determine in this procedure if the
*after* criteria is near. Add this information and the *after* criteria
value to the list of returned values.

With these new informations, the *nearly-forbidden* tag is set in
module-forbid for module specification that are close to reach the
*after* limit defined.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
487dc17c10 ts: adapt tests for nearly_forbidden_days config 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
733aedd0eb doc: desc. nearly_forbidden_days config in man/diff docs 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
fb8b8a2f0b init: add nearly_forbidden_days config in completion scripts 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
4efcf2bb2a Add nearly_forbidden_days configuration
Introduce the `nearly_forbidden_days` configuration to determine the
number of days a module should be considered *nearly forbidden* prior
reaching its expiry date set by `module-forbid` modulefile command.

Default value for this option is obtained from
--with-nearly-forbidden-days configure option, which is set to 14 days
by default.

Configuration value can be superseded by use of
MODULES_NEARLY_FORBIDDEN_DAYS environment variable.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
fd06ddfc4c Validate config value against class
Add the ability to validate a configuration value against a value class
(integer, string, ...) rather a list of accepted values. See list of
accepted class names on Tcl `string is` command.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
178b9ef6df install: add --with-nearly-forbidden-days configure opt
Introduce the --with-nearly-forbidden-days ./configure script option to
define the number of days a module is considered nearly forbidden prior
reaching its expiry date limit set by module-forbid command.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
47b0b347ec travis: increase mt run timeout for macos coverage build 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
148a1c90e6 doc: desc. --message in module-forbid design notes 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
06c18f55a5 ts: test --message option in 20/115 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
67e1540542 Add --message option to module-forbid command
Add the --message option on module-forbid command to enable set of
specific additionnal error message when an attempt to evaluate a
forbidden module is made.

When defined, record message as a property of the forbidden tag.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
0fd462feb0 Record properties along tag
Adapt setModspecTag/getModuleTag/isModuleTagged procedure to give the
ability to set a list of properties for a tag. Add getModuleTagProp
procedure to retrieve the properties associated to recorded tag.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
fb703b5b82 doc: desc --message module-forbid option in NEWS/modulefile(4) 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
ae9570137f Define forbidden err msg from getForbiddenMsg proc
Add getForbiddenMsg procedure to generate error message obtained when
trying to evaluate a forbidden module.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
d7b9d1ecee ts: add module-forbid tests
Tests over different kind of elements and coupled with different kind of
module-hide commands
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
c6a6439312 ts: reduce/adapt number of module-forbid tests
To avoid duplication with module-hide --hard tests
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
588cb0a594 doc: update desc. of module-forbid in design notes 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
a69de50d34 Disallow evaluation of forbidden modules
When a module has been tagged forbidden, disallow its evaluation by
transforming modulefile path location result in an `accesserror` entry.
As evaluation is concerned, it only has an impact on modulefile or
virtual modules. Directories, alias or symbolic version are not impacted
thus still used to resolve path to modulefile and virtual module even if
tagged forbidden.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
5b7bf39c58 doc: update desc. of module-forbid in man pages. 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
d2af1b4182 doc: update desc. of module-forbid in NEWS 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
833239d6e3 ts: transform 20/115 tests in module-hide --hard + module-forbid 2020-08-28 07:18:25 +02:00
Xavier Delaruelle
a13372c5cd Uncouple module hiding from module-forbid command
Do not imply hiding specified module on `module-forbid` command. Just
record module specification is said *forbidden* which will be checked to
disallow module load.

Doing so, hiding module is now only done through `module-hide` command
and the previous behavior of `module-forbid` command can now be achieved
with `module-hide --hard` + `module-forbid`.

This change also enables to forbid use of modules that are visible.

Hard-hiding level is lowered to *2*, as this spot was left empty through
this change.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
275f7a3723 Add internal helper procs to define tags over modules
Add the setModspecTag procedure to record defined tag over a module
specification.

getModuleTag procedure enables to retrieve all the tags applying to a
module passed as argument.

isModuleTagged procedure returns whether or not given module has given
tag set on it.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
bfb56a1276 Reword doesModuleHaveTag proc in doesModuleHaveSym
To avoid confusion with upcoming tag feature.
2020-08-18 16:49:57 +02:00
Xavier Delaruelle
9bd661d6af doc: desc. --hard in hide-or-forbid design doc 2020-08-18 15:41:50 +02:00
Xavier Delaruelle
5cc0b7d4a5 doc: desc. module-hide --hard in MIGRATING 2020-08-18 14:27:09 +02:00
Xavier Delaruelle
90335c80bc ts: add cascading tests for --hard in 20/119 2020-08-18 14:06:51 +02:00
Xavier Delaruelle
65da551e61 doc: desc auto sym hidden properties in modulefile(4) 2020-08-18 13:46:28 +02:00
Xavier Delaruelle
17978b389b ts: fix 20/11* tests as auto-syms cannot be set hidden 2020-08-18 11:59:57 +02:00
Xavier Delaruelle
3412ac1186 Get default version from sym target in getModules
Rework getModules procedure to get the defined default version from the
fetched symbolic version target available in found_list structure rather
querying g_resolvedPath global structure. Doing so, hidden default are
automatically dropped.
2020-08-18 11:59:57 +02:00
Xavier Delaruelle
114618ab59 Auto-symbols cannot be set hidden
Hidden statements can only target declared symbolic versions and not
those automatically defined (@default and @latest). Thus when a declared
`default` or `latest` symbol is set hidden, an auto-symbol is
automatically defnied instead (targeting highest module version
available).
2020-08-18 11:59:57 +02:00
Xavier Delaruelle
ab85429a42 doc: desc --hard option in NEWS/MIGRATING/man 2020-08-18 11:59:57 +02:00