Re: version conflict for package "Tcl": TCL_VERSION vs TCL_PATCH_LEVEL



Olaf Dietrich wrote:
Ralf Fassel <ralfixx@xxxxxx>:
* odt@xxxxxxx (Olaf Dietrich)
| Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1)

Don't use TCL_VERSION here -- work out what your actual minimum requirement is and then use that, e.g.:

Tcl_PkgRequire(interp, "Tcl", "8.4", 0);


Check the meaning of the '1' in this call:

http://www.tcl.tk/man/tcl8.5/TclLib/PkgRequire.htm

| int exact (in)
| Non-zero means that only the particular version
| specified by version is acceptable. Zero means that newer
| versions than version are also acceptable as long as they
| have the same major version number as version.

I want to accept all versions with the same _minor_ version
number (e.g. 8.5.0, 8.5.1, 8.5.2, ... 8.5.23), but _not_ newer
versions with a different minor version number, i.e. not 8.6.0
etc. since these might be incompatible.

They shouldn't be. Minor versions should be compatible -- only major version changes can break compatibility (at least, that's how it's supposed to work).


And then consider using 0 instead.

So I cannot use 0. And it seems that under tcl 8.4 I get exactly
the desired behavior with the call above - but not longer under
tcl 8.5.

8.5 got stricter about version numbers: specifying "8.5" exactly means "8.5.0" exactly.

-- Neil
.



Relevant Pages