Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 51:08:01 |
Calls: | 422 |
Files: | 1,025 |
Messages: | 90,550 |
8.5.19package versions tcltest
2.3.8 2.5.3info library
/path/to/lib/tcl8.5catch {package require -exact tcltest 2.3} msg
1set msg
can't find package tcltest exactly 2.3package require tcltest 2.3
2.5.3
8.6.12package versions tcltest
2.3.8 2.5.3info library
/path/to/lib/tcl8.6catch {package require -exact tcltest 2.3} msg
1set msg
can't find package tcltest exactly 2.3package require tcltest 2.3
2.5.3
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".
On 30.04.25 18:15, Alan Grunwald wrote:
On 30/04/2025 11:06, aotto1968 wrote:
hi,OK. I'll bite.
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.19package versions tcltest
2.3.8 2.5.3info library
/path/to/lib/tcl8.5catch {package require -exact tcltest 2.3} msg
1set msg
can't find package tcltest exactly 2.3package require tcltest 2.3
2.5.3
package require Tcl 8.5
8.6.12package versions tcltest
2.3.8 2.5.3info library
/path/to/lib/tcl8.6catch {package require -exact tcltest 2.3} msg
1set msg
can't find package tcltest exactly 2.3package require tcltest 2.3
2.5.3
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.
8.6.12package versions tcltest
2.3.8 2.5.3
2.5.3
error: in itpEvalDirectexpected version number but got ""
error: in itpEvalDirectcan't find package tcltest 2.3-2.3.8
2.3.8
On 30/04/2025 11:06, aotto1968 wrote:
hi,OK. I'll bite.
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.19package versions tcltest
2.3.8 2.5.3info library
/path/to/lib/tcl8.5catch {package require -exact tcltest 2.3} msg
1set msg
can't find package tcltest exactly 2.3package require tcltest 2.3
2.5.3
package require Tcl 8.5
8.6.12package versions tcltest
2.3.8 2.5.3info library
/path/to/lib/tcl8.6catch {package require -exact tcltest 2.3} msg
1set msg
can't find package tcltest exactly 2.3package require tcltest 2.3
2.5.3
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.
8.6.12package versions tcltest
2.3.8 2.5.3
2.5.3
error: in itpEvalDirectexpected version number but got ""
error: in itpEvalDirectversion conflict for package "tcltest": have 2.5.3, need 2.3-2.3.8
2.3.8
* aotto1968 <aotto1968@t-online.de>
| ok, lets check
I would suggest to read *and understand* the 'package' manpage.
| 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
Why? manpage says otherwise:
A suitable version of the package is any version which satisfies
at least one of the requirements, per the rules of package vsat-
isfies. If multiple versions are suitable the implementation
with the highest version is chosen.
Note the last sentence.
| # Bug: upper limit does NOT works at all
| package require tcltest -2.3.9
Why should that work at all?
Each requirement is allowed to have any of the forms:
min This form is called “min-bounded”.
min- This form is called “min-unbound”.
min-max
This form is called “bounded”.
There is no '-max' mode.
| # BUG: 2.3.8 is NOT of the solution
| package require tcltest 2.3-2.3.8
As stated in the manpage:
[2] A version satisfies a “bounded” requirement when
--<snip-snip>--
[b] Otherwise if, and only if the version is greater
than or equal to the min, and less than the max,
where both min and max have been padded internally
with “a0”. Note that while the comparison to min
is inclusive, the comparison to max is exclusive.
Note the last sentence.
| # OK - only case that works
| package require tcltest 2.3-2.3.9
As stated in the manpage, same as last point.
HTH
R'