Commit Graph

2361 Commits

Author SHA1 Message Date
Xavier Delaruelle
b22d34f485 ts: additionnal adv_vers_spec in 70/272 and install ts 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
da49026fdb cirrus: install openmp to satisfy R needs 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
234a7da8ef ts: vers range spec compat check mod ctx tests 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
7fb9a7121e ts: vers range spec select one mod ctx tests 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
5e24c8961b Serialize version range specifier in MODULES_{LMPREREQ,LMCONFLICT}
When saving current loaded prereq and conflict through MODULES_LMPREREQ
and MODULES_LMCONFLICT environment variable, translate version range
specifier `:` into `<` character to distinguish it from path separator
character.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
bb9a6760a9 ts: vers range spec basic and search-specific ctx tests 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
1d5e6d22cc Introduce range of version in mod version spec
A range of version may be specified after '@' with the help of ':'
character to express *greater or equal* (ex: `1.2:`), *lower or equal*
(ex: `:1.2`) or *between or equal* (ex: `1.1:1.2`) conditions.

Adapt procedures that parse module version specifier or compare module
version. Error is raised if version specified for range are not versions
or higher version is lower than lower version.

Non 'xdigit' character in higher part of version number is considered as
a non version number. It avoids symbols like `default`, `new` and so on
to get in the version range way.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
da807a5592 ts: skip icase tests if underlying fs is case-insensitive 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
030f8e7485 One conflict statement may match multiple loaded mod
Conflict defined with a generic module name or an advanced version
specifier may match multiple loaded modules (generally in case multiple
loaded modules share same root name). Loaded environment analysis has
been fixed to bound conflict to all loaded modules matching it. As a
result the dependent reload mechanism is not triggered when one
loaded module matching conflict is removed if another loaded module
still match the conflict.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
769f529235 ts: vers list spec compat check mod ctx tests 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
f5af22f200 Record mod vers spec with setModuleVersSpec proc 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
846aa3b149 doc: desc avail/load corner case for icase design 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
f872fa8c9d doc: refine advanced_version_spec design 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
aebc81feec ts: vers list spec select one mod ctx tests 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
30605a8669 ts: vers list spec basic and search-specific ctx tests 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
7c55f9c798 Handle complex mod vers spec in isModuleEvaluated
Rework whole isModuleEvaluated procedure to check all names of loaded or
loadind module attempt against module version specifiers passed as
argument.

Add the 'exclmod' argument to the procedure to exclude from tested list
the currently evaluated module: avoid this way detecting self on
reflexive conflict definition.

As a result just loaded or currently loading conflicting modules are
better detected when conflict is expressed against an alias name or a
module generic name.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
d9b488d615 Rename arrayKeyMatch into getEqArrayKey
As procedure returns key string, not a boolean value.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
5b0b93ed0d Rename arrayKeyEq into getArrayKey
And remove call to module version specifier translation: procedure only
receive regular module/version specification.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
e0692a3261 Improve extdfl check in modVersCmp 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
d5e00dab61 Adapt mod ext dfl check in modEq if contains *?
When query's module contains globbing wildcard characters (? or *)
adapt extended default match test to use an escaped version of module
designation when modEq is called for an equal test.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
4c169797e1 Makes arrayKeyMatch rely on modEq
Call modEq to check mod name passed matches array elements, so
arrayKeyMatch procedure does not need to be specialized to match icase
and extended_default setup, which is now deleguated to modEq.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
63a96fc088 Makes modMatchAtDepth rely on modEq
Call modEq to check mod name passed in modMatchAtDepth, so this
procedure  does not need to handle the icase check which is deleguated
to modEq.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
537297ba27 Fix modEq for empty mod name
Test empty module name against simple module name/vers test branch.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
a9bb3dba19 Add support for contains test in modEq
By setting test argument of modEq procedure to 'matchin', perform
contains-style match test.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
d313a33abf Adapt modname check in modEq if contains *?
When query's module name contains globbing wildcard characters (? or *)
adapt test to check module names match and then extract module version
in modEq.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
2c1ac80a84 ts: test wildcard chars in mod name on 70/{260,270} 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
72263ab3dd Handle version list spec on modEq
Adapt modEq procedure to handle version list specifier (ex: @1,2).
Introduce modVersCmp procedure to handle version comparison.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
124f8f71b2 Introduce list of version in mod version spec
A list of version may be specified after '@' by joining the multiple
versions to set with the ',' character (ex: @1.2,1.3).

Parse this syntax and store version specification information in
parseModuleVersionSpecifier procedure and adapt procedures that handle
the version specification information like getOneModuleFromVersSpec and
getAllModuleFromVersSpec.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
6b85caf0e5 Rework storage of mod version specifier
Change internal storage structure to hold module version specifier with
4 fields: complete module name version, module name, version comparison
set, and module version.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
32db1d3706 Rework getModuleVersSpec into getModuleFromVersSpec
Change getModuleVersSpec procedure into getModuleFromVersSpec to extract
just specified module (name and version) from module name and version
specifier.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
ed3eff8a46 Get one mod name from spec with getOneModuleFromVersSpec
Introduce getOneModuleFromVersSpec procedure to extract one module name
from module name version specification.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
29ac2bfa79 Test all mod mentionned in spec on isModuleSpecHidden
Add a getAllModulesFromVersSpec procedure that parses module name
version specification to return a list of all the module mentionned in
specification.

Use this new helper procedure in isModuleSpecHidden to check if one
module from returned list is an hidden module.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
28667bb41c Adapt modEq to include modMatch test
Refactor modEq procedure to include modMatch-kind test.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
bdf0c0378f Define mod cmp procs in getModules instead findModules
Define the module name and version comparison procedures at the
beginning of the getModules procedure so it is not needed to define the
modMatch procedure in findModules as findModules is only called by
getModules.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
8a765bad43 Adapt modEq to include modStartEq test
Add a 'test' argument to modEq procedure to only check if passed
module name matches pattern on pattern length when it equals to
'eqstart'. So modStartEq procedure is not needed anymore, calls are
replaced with [modEq $pattern $mod eqstart].
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
816ebf5ed1 Makes modStartNb rely on modStartEq
Call modStartEq to check full name passed in modStartNb, so modStartNb
does not need to handle the extended_default check which is then
deleguated to modStartEq.

Introduce getModuleNameFromVersSpec to extract module name from module
name version specification.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
1d81212172 Module version specifier cannot contain / char
No deep version specification to ease version comparison.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
34d75a351d Translate vers spec directly in arrayKeyEq
Pass the module version specification toward arrayKeyEq to translate
it there for module matching.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
8b2bb313f5 Translate vers spec directly in modStartNb
Pass the module version specification toward modStartNb to translate
it there for module matching.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
397997db91 Translate vers spec directly in modStartEq
Pass the module version specification toward modStartEq to translate
it there for module matching.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
292382d174 Translate vers spec directly in arrayKeyMatch
Pass the module version specification toward arrayKeyMatch to translate
it there for module matching.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
d25e569590 Get one module name from vers spec in getPathToModule
Translate module name version specification in getPathToModule to
extract one module version name from it. Use that to determine the
module name root to find.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
1ed47810c3 Get one module name from vers spec in listModules
Translate module name version specification in listModules to extract
one module version name from it. Use that to determine the no-indepth
search properties.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
8b94e83fff Get one module name from vers spec in getModules
Translate module name version specification in getModules to extract one
module version name from it. Use that to determine the module name root
to find and no-indepth search properties.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
2e1793df5c Translate vers spec directly in modMatch
Pass the module version specification toward modMatch procedure to
translate it there for module matching. modMatch procedure is adapted to
apply the translation only if a 'trspec' argument is set to 1.

A pattern suffix 'psuf' argument is also added to give the ability to
append a suffix string to translated module name version.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
8d704c5805 Add isModuleSpecHidden to translate vers spec
Introduce the isModuleSpecHidden procedure to pass it the module version
specification which is there translated to check if corresponding module
names are hidden or not.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
4238caafd9 Translate vers spec directly in modMatchAtDepth
Pass the module version specification toward modMatchAtDepth to
translate it there for module matching.

Also pass the 'contains' mode toward this procedure to adapt module name
version once translated.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
c0a87d48a0 Adapt modEq proc to icase and extended_default config 2019-11-14 20:22:45 +01:00
Xavier Delaruelle
b9e3dc36c5 No need to translate mod vers spec in conflict proc
Get error message reflecting way conflict is defined.
2019-11-14 20:22:45 +01:00
Xavier Delaruelle
fb574b3b0f Introduce a modEq proc for cmdModuleSearch/getModules
Check 2 module names are equal with a dedicated proc called 'modEq' that
translates one name argument against recorded module version specifiers.

Use this procedure in cmdModuleSearch, thus this procedure does not need
to translate module name it receives against recorded module version
specifiers.

Also use modEq for a comparison in getModules procedure.
2019-11-14 20:22:45 +01:00