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 : nospam.nurdglaw (at) *nospam* gmail.com (Alan Grunwald)
Groupes : comp.lang.tcl
Date : 30. Apr 2025, 17:15:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vutid0$l1j2$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
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.

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