Hello Eric,
Le ven. 28 mars 2025 à 01:02, Miller, Eric via Modules-interest
<mod...@li...> a écrit :
> Does modulecmd.tcl support pre-releases and build metadata in versions?
>
> If so, how are they handled during module load with a range specification?
modulecmd.tcl sorts available versions with dictionary-style method of Tcl:
https://www.tcl-lang.org/man/tcl8.5/TclCmd/lsort.htm#M6
During a load, it takes the available versions (all available or
limited to those included in specified range) and selects among them
the default version (if any defined) or the latest version.
Latest is highest version based on dictionary sort.
There is no specific knowledge of pre-release or build metadata. To
use that in version name, specific care should be put to have higher
rank with final version rather pre-release.
> How are version dependencies handled during searching?
>
> Does modulecmd.tcl gather all the module dependencies and resolve the best fit if possible?
> Or is it first-one-wins?
dependencies are resolved at the time they are defined: when
modulefile evaluation encounters a "prereq foo" statement, it resolves
this module to take default (if set) or latest version, then this
modulefile is evaluated, then it comes back to main module evaluation.
if default (or latest) foo version cannot load (due to conflict for
instance) the whole evaluation aborts. You may suggest alternative
version to try by adding more argument to prereq command (prereq foo
bar...).
Regards,
Xavier
|