Re: BUG: wrong usage for package loading with multiple versions available

Liste des GroupesRevenir à cl tcl 
Sujet : Re: BUG: wrong usage for package loading with multiple versions available
De : aotto1968 (at) *nospam* t-online.de (aotto1968)
Groupes : comp.lang.tcl
Date : 30. Apr 2025, 18:43:12
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vutnfh$nmir$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 30.04.25 18:15, Alan Grunwald wrote:
On 30/04/2025 11:06, aotto1968 wrote:
hi,
>
The "-exact" option does NOT include the PARTIAL version number. To use the
tcltest-2.3.8 package the EXACT version have to be "known".
>
The CORE problem is that tcltest-2.3 and tcltest-2-5 have partly DIFFERENT
syntax. The command "package require tcltest 2.3" should load the LATEST
patch level from "tcltest-2.3.X"
>
>
package require Tcl 8.5
 > 8.5.19
package versions tcltest
 > 2.3.8 2.5.3
info library
 > /path/to/lib/tcl8.5
catch {package require -exact tcltest 2.3} msg
 > 1
set msg
 > can't find package tcltest exactly 2.3
package require tcltest 2.3
 > 2.5.3
>
>
package require Tcl 8.5
 > 8.6.12
package versions tcltest
 > 2.3.8 2.5.3
info library
 > /path/to/lib/tcl8.6
catch {package require -exact tcltest 2.3} msg
 > 1
set msg
 > can't find package tcltest exactly 2.3
package require tcltest 2.3
 > 2.5.3
OK. I'll bite.
  From the manpage,
 "package require -exact package version
"    This form of the command is used when only the given version of package is acceptable to the caller."
 Since 2.5.3 isn't exactly 2.5, [package require -exact tcltest 2.5] fails is only version 2.5.3 is available.
 The second line of the manpage quote above goes on to state.
 "This command is equivalent to package require package version-version."
 I haven't checked, because I am, frankly, not interested, but
 package require tcltest 2.3-2.3.9 might do what you want.
ok, lets check
# BUG "2.3.8" is NOT part of the solution
package require Tcl 8.5
 > 8.6.12
package versions tcltest
 > 2.3.8 2.5.3
# BUG: 2.3 have to pic-up latest patch of the 2.3
package require tcltest 2.3
 > 2.5.3
# BUG: upper limit does NOT works at all
package require tcltest -2.3.9
 > error: in itpEvalDirect
expected version number but got ""
     while executing
"package require tcltest -2.3.9"
     invoked from within
"interp eval $itp $cmd"
# BUG: 2.3.8 is NOT of the solution
package require tcltest 2.3-2.3.8
 > error: in itpEvalDirect
version conflict for package "tcltest": have 2.5.3, need 2.3-2.3.8
     while executing
"package require tcltest 2.3-2.3.8"
     invoked from within
"interp eval $itp $cmd"
# ONLY case that works
package require tcltest 2.3-2.3.9
 > 2.3.8

Date Sujet#  Auteur
30 Apr 25 * BUG: wrong usage for package loading with multiple versions available8aotto1968
30 Apr 25 +- Re: BUG: wrong usage for package loading with multiple versions available1Emiliano
30 Apr 25 `* Re: BUG: wrong usage for package loading with multiple versions available6Alan Grunwald
30 Apr 25  `* Re: BUG: wrong usage for package loading with multiple versions available5aotto1968
30 Apr 25   `* Re: BUG: wrong usage for package loading with multiple versions available4aotto1968
2 May 25    `* Re: BUG: wrong usage for package loading with multiple versions available3Ralf Fassel
3 May 25     `* Re: BUG: wrong usage for package loading with multiple versions available2aotto1968
5 May 25      `- Re: BUG: wrong usage for package loading with multiple versions available1Ralf Fassel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal