Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ralf Fassel Newsgroups: comp.lang.tcl Subject: Re: BUG: wrong usage for package loading with multiple versions available Date: Fri, 02 May 2025 18:33:40 +0200 Lines: 57 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net caCdjkufKc5Zn4Ixtdou1ARSBZ+629Zor0Sa2YQSAWJ6V7SAE= Cancel-Lock: sha1:/6iXM70SaunJ7J88aURwJOCbWk0= sha1:OrIdGREJMlIkyWytC4jRTnXkd38= sha256:35Dv9/cplSDSgHkDgowk+DObNUiT2V9AEuoFQTJDh2E= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) * aotto1968 | 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 ---- [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'