Hello Eric,
Having a more powerful dependency resolver (like a SAT resolver) is
something I have in mind but there is no plan to work on that on the
coming months.
Best regards,
Xavier
Le ven. 28 mars 2025 à 20:13, Miller, Eric via Modules-interest
<mod...@li...> a écrit :
>
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> Understood and verified:
>
> ./foo/1.0:
> #%Module 1.0
> conflict foo
> setenv FOO_VER 1.0
>
> ./foo/1.1:
> #%Module 1.0
> conflict foo
> setenv FOO_VER 1.1
>
> ./foo/1.2:
> #%Module 1.0
> conflict foo
> setenv FOO_VER 1.2
>
> ./pkgA/1.0:
> #%Module 1.0
> module load "foo@1.0:1.1"
>
> ./pkgB/1.0:
> #%Module 1.0
> module load "foo@1.0:"
> module load pkgA/1.0
>
>
> $ module load pkgB
> Loading foo/1.1
> ERROR: Conflicting foo/1.2 is loaded
>
> Loading pkgA/1.0
> ERROR: Load of requirement foo@1.0:1.1 failed
>
> Loading pkgB/1.0
> ERROR: Load of requirement pkgA/1.0 failed
>
> Theoretically foo/1.1 could have solved both range requirements, but that would require a backtracking resolver.
> I'm guessing that's probably out of the scope of what modulecmd.tcl is trying to accomplish.
>
> Eric
>
> -----Original Message-----
> From: Xavier Delaruelle <xav...@gm...>
> Sent: Friday, March 28, 2025 12:13 AM
> To: Environment Modules usage and discussion. <mod...@li...>
> Subject: Re: [Modules] Semantic versions
>
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> 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
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
|