Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Alan Grunwald Newsgroups: comp.lang.tcl Subject: tcllib1.21 and tcl9.0b3 Date: Sat, 14 Sep 2024 00:13:13 +0100 Organization: A noiseless patient Spider Lines: 49 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 14 Sep 2024 01:14:05 +0200 (CEST) Injection-Info: dont-email.me; posting-host="7428e04cfcb459dd44d282ad9aaa2244"; logging-data="1145030"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18E2bodLIGQfDAgLVyhpQJ9mRC+r5MBcXY=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:rqwGUWGZyKjNusCN/ss9iB1VdFk= Content-Language: en-US Bytes: 2346 How compatible is tcllib 1.21 with tcl9.0b3? I've built tcl-9.0b3 and want to see how it plays with my scripts. (OK, more properly that should be "how my scripts play with tcl 9.0b3.) I'm testing with a script that includes [package require uri]. This fails, saying it can't find the package. I've dug around a bit and I see that the pkgIndex.tcl in tcllib-1.21 starts with a fast return if [package vsatisfies [package provide Tcl] 8] returns 0. I've changed that to [package vsatisfies [package provide Tcl] 8 9] and it now gets a couple of lines further down the script where it encounters if {(0 == [catch { package vcompare [info patchlevel] [info patchlevel] }]) && ( [package vcompare [info patchlevel] 8.3.1] >= 0 )} {return} and returns. I don't understand this line well enough to change it. As far as I can make out, package vcompare [info patchlevel] [info patchlevel] will always return 0 and won't throw an exception, so this should always result in a premature return, before all the package ifneeded commands for the packages withing tcllib are executed. However, that argument applies equally to tcl8.6.14, but the same pkgIndex.tcl works just fine on my home-built copy of that. It's getting late and I'll have another look tomorrow and see if I can work out what's happening. In the mean time, I'd very much appreciate any help you can provide.