Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 12c0616ef9da1a1aea1cf6719aca8fee632ecc9b
Ticket: 3562640fffffffffffffffffffffffffffffffff
problem loading Thread in 8.5, when compiled for 8.6
User & Date: nijtmans on 2012-09-03 03:53:37
Changes

  1. icomment:
    > do you agree that as a general
    > answer for most extensions, the conventional approach
    > represented by the patch on the bug-3562640 branch
    > is what we should advise extension authors to do?
    
    The part I don't agree with in the bug-3562640 branch
    is the usage of @TCL_VERSION@ in pkgIndex.tcl in
    and the usage of Tcl_InitStubs(interp, TCL_VERSION, 0).
    If an extension has a minumum required API, no
    matter if it's "8.1", "8.5" or "8.6". The pkgIndex.tcl file
    and the Tcl_InitStubs() call should say so. That should
    NOT depend on the Tcl version the extension is
    compiled against.
    
    Normally, when an API is added in Tcl 8.x, that means
    the extension has two possibilities. Either use it or
    not. If the new API is used, It means the extension
    must increase its minimum required API, and so
    it cannot be compiled against lower Tcl versions
    any more.
    
    TIP #336 is special in this respect: It does not add
    an API for new functionality, it provides a different
    API for functionality that already existed, but
    needed to be accessed in another way. It
    used to be a field in Tcl_Interp, now it is a
    new function. So now we are facing extensions
    which already used the functionality, but now
    are forced to use the new API, otherwise
    they are punished with a deprecation warning.
    
    There were more examples of such changes in
    the past, e.g. TIP's #98, #330, #73 and #139 (The
    latter two moved API's from private to public
    stub tables, so theoretically extensions were
    not allowed to used it, but still it created the
    same problem for extensions). None of
    those generated a deprecation warning
    when the old API was used while
    compiling against a newer Tcl.
    TIP #336 is the first TIP doing that,
    and that's the point here: There is
    no way for an extension to eliminate
    the deprecation warning and still
    compile and run with multiple
    Tcl versions.
    
    So, Thread 2.7 has two choices: Live
    with the deprecation warning, and
    function as it does now, or make
    the conversion and thereby
    lose support for Tcl 8.5. The
    latter would mean that teapot
    must supply two different thread
    versions, 2.6 and 2.7, as long
    as Tcl 8.5 is alive.
    
    As I said, there is no perfect solution.
    
    
  2. login: "nijtmans"
  3. mimetype: "text/plain"
  4. username: "nijtmans"