Skip to content
Tcl Source Code History Of Ticket 1578344
Login

History Of Ticket 1578344

Artifacts Associated With Ticket 1578344

  1. Ticket change [7f26fa3c02] (rid 97530) by dgp on 2006-10-16 17:10:45:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      The TIP 268 implementation
      broke this:
      
      % package provide demo 1.2.3
      % package require -exact demo 1.2    
      1.2.3
      
      Contrast with Tcl 8.4:
      
      % package provide demo 1.2.3
      % package require -exact demo 1.2    
      version conflict for package "demo": have 1.2.3, need 1.2
      % info patch
      8.4.14
      
      And with what I recall being
      specified in TIP 268.
      
      
      
    4. foundin initialized to: "obsolete: 8.5a5"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dgp"
    10. subsystem initialized to: "39. Package Manager"
    11. title initialized to: "-exact version matching broken"
    12. type initialized to: "Bug"
  2. Ticket change [2bd912438a] (rid 118816) by hobbs on 2006-10-17 05:59:39:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      I talked with aku about making at least the 8.4 backport
      support -exact 1.2 allowing 1.2.x IFF 1.2.0 was not
      requested.  In other words, exactness should only be to the
      level of specificity of the request.  Did that make sense?
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. priority changed to: "8"
    6. username: "hobbs"
  3. Ticket change [0d69fb45c9] (rid 114356) by dgp on 2006-10-17 10:59:42:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      It might make sense for
      the backport/fork in the
      8.4.* series (the compatibility
      calculus differs there);  I'd
      have to think more carefully to be
      certain.
      
      I'm confident it doesn't
      make sense going forward,
      so at a minimum, this code
      doesn't belong in the
      HEAD branch.
      
      FWIW, though this is a bug,
      I don't think it's so critical
      to hold 8.5a5 for, so long as
      it is otherwise ready.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [5e43d9c566] (rid 115609) by hobbs on 2006-10-17 11:04:52:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      I'm not so sure that it is a bug for 8.5 either.  Perhaps it
      is that -exact is just not good enough when compared to what
      we have now for version handling.
      
      If a user asks for "1.2", are they asking for "1.2.0.0..."
      or are they asking for "1.2.x but not 1.3 or 1.1"?  I
      believe 98% are asking for the latter.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  5. Ticket change [bfa2c1a3bc] (rid 102279) by dgp on 2006-10-18 01:45:30:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I'm certain that making
      guesses about what users
      might mean is the wrong
      approach.  
      
      TIP 268 offers a well-specified
      langauge for expressing exactly
      what version requirements are
      desired.  Users of Tcl 8.5 should
      use that language to say what they
      mean.  We should avoid DWIMery guessing.
      
      For the 8.4 backport/fork, it's
      possible the right solution is
      for Tcl to continue [package provide]ing
      version 8.4 throughout all the 8.4.*
      series of releases, since that's what
      some collection of scripts is assuming.
      That was the right answer for Tk.
      Are you making use of Tcl patchlevel
      requirements in that backport?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [d2dafcffea] (rid 113602) by dgp on 2006-11-23 03:21:42:

    1. assignee changed to: "dgp"
  7. Ticket change [7ff102bb91] (rid 97648) by dgp on 2007-04-25 20:22:42:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Hey!  Documenting the brokenness
      doesn't count as fixing it!
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [45fb200f3f] (rid 99438) by dgp on 2007-04-25 21:08:11:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      ok, the docs and bug went in
      at the same time; I just didn't
      notice the doc before.
      
      Still needs fixing.  Who's
      got a round tuit?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [63d2d5512d] (rid 92646) by dgp on 2007-05-19 03:12:21:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Ok, I see (at least some of) the
      motivation for this now.  It comes
      down to a deficiency in the Tcl_InitStubs()
      interface.
      
      Consider Tk 8.4 as an example of a stubs
      enabled extension.  It calls
      
        Tcl_InitStubs(interp, TCL_VERSION, 1)
      
      The Tk header file forces TCL_VERSION
      to be "8.4", so this call is looking to
      initialize "exactly" version 8.4 of
      the Tcl stub table.
      
      Trouble is that the stub table itself
      does not include any version field.
      Instead the "version" of a stub table
      is implicitly taken to be the same
      as the version of the "Tcl" package
      in the same interp, via a call in
      Tcl_InitStubs:
      
        Tcl_PkgRequireEx(interp, "Tcl",
            version, exact, &pkgData);
      
      where version and exact have the
      values TCL_VERSION and 1 passed into
      Tcl_InitStubs originally.
      
      Since the history has been that
      Tcl only [package provide]d a
      Tcl version to M.m resolution, the
      implicit rule is that the Tcl stub
      table was version 8.4 throughout
      the entire 8.4* series of releases.
      
      This has a few implications.  First
      a value of 1 in the "exact" argument
      to Tcl_InitStubs() has always meant
      that any stub table from any 8.4*
      release of Tcl is acceptable, but
      that any table from 8.3* or 8.5*
      releases is not.  For extensions like
      Tk that may be accessing volatile internals,
      this is a good kind of requirement to be
      able to express.
      
      Note that the history of having a single
      version identifier for all the stub tables
      of all Tcl releases matching 8.4.*
      indicates that the stub table is meant
      to be unchanging through the whole
      8.4* series of releases.  Except for the
      backport of TIP 218, we've even honored
      that (in the default build anyway).
      
      After TIP 268, [package provide Tcl]
      now returns the full patchlevel version
      number.  Since the workings of
      Tcl_InitStubs() were not modified by
      that TIP, we now effectively have
      a new version of the stub table with
      every release of Tcl.  This means
      that Tcl_InitStubs() calls with exact=1
      can only match a single release of Tcl,
      which is not desirable.  Furthermore
      passing both TCL_VERSION and exact=1
      can only match the stub table to be
      found in Tcl 8.5.0 which does not yet
      exist.  This means without source code
      changes, Tk 8.5a6 could not [load] into
      any existing Tcl interp.
      
      Tk 8.5a6 has addressed this in part
      by changing its Tcl_InitStubs call to:
      
        Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 1)
      
      With the traditional meaning of -exact
      matching, this would permit a Tk 8.5a6
      built against Tcl 8.5a6 header file to [load] into
      a Tcl 8.5a6 interp, but no other release at all.
      This level of lockstep forced even on the
      stubs interface is undesirable.
      
      The old ability of Tcl_InitStubs to
      approve the stub table of all Tcl
      releases match 8.5* was restored by
      the incomptible interpretation of
      -exact matching noted in the original
      bug report here.  It's an example
      of restoring one kind of compatibility
      by destroying another kind.
      
      I think for the 8.5 series of releases,
      this issue can successfully be solved
      by making appropriate changes to
      Tcl_InitStubs.  I'll be looking into that.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [386fb99fe9] (rid 112211) by dgp on 2007-05-23 01:26:47:

    1. icomment:
      
      
      File Added - 230146: 1578344.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      The attached patch corrects everything
      except the docs.
      
      It corrects the bug reported here, but
      also restores the compatibility of
      Tcl_InitStubs() that was lost with the
      original TIP 268 implementation, which
      prompted the DWIM redefine for -exact
      matching.  I think this solution ought
      to satisfy everyone.
      
      A backport of this solution to the
      TCL_TIP268 sections on the core-8-4-branch
      might be a good idea as well, but it's best
      I leave that conclustion to the actual users
      of that fork.  I'll help with producing such
      a patch if it's desired.
      
      File Added: 1578344.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Add attachment "1578344.patch" [2c578e8413] (rid 118888) by dgp on 2007-05-23 01:26:47.

  12. Ticket change [77ebe047a0] (rid 89859) by dgp on 2007-05-23 22:44:20:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      jenglish points out that
      the changes to Tcl_InitStubs()
      in that patch won't work in 
      all the cases they need to work.
      
      If this patch went into Tcl 8.5,
      and then an extension was compiled
      against 8.5 headers, and linked to
      libtclstub8.5a, that extension's
      shared library file would contain
      the modified Tcl_InitStubs() routine.
      
      If that shared library file were
      [load]ed into a Tcl 8.3 interp
      (and the prefixMatching argument
      were true), then an attempt to call
      Tcl_PkgRequirePrefixMatching through
      the stubs table would be attempted,
      and since no such routine is in
      an 8.3 stubs table the program would
      crash.
      
      back to that drawing board...
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Add attachment "1578344-2.patch" [66ad5e3a7d] (rid 102758) by dgp on 2007-05-24 01:00:34.

  14. Ticket change [8e1fd854ee] (rid 120059) by dgp on 2007-05-24 01:00:34:

    1. assignee changed to: "jenglish"
    2. icomment:
      
      
      File Added - 230284: 1578344-2.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      attached patch is a small tweak
      on the first one that I think
      corrects the failure mode.
      
      jenglish, care to have another look?
      
      
      File Added: 1578344-2.patch
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  15. Ticket change [cbb28d1f2e] (rid 95564) by jenglish on 2007-05-24 03:08:14:

    1. icomment:
      Logged In: YES 
      user_id=68433
      Originator: NO
      
      I don't think this is the right way to fix the problem.
      
      Instead of changing the semantics of Tcl_InitStubs() to be what Tk wants it to mean, Tk 8.5 should instead say exactly what it means (possibly by calling Tcl_InitStubs(interp, TCL_VERSION, 0); to initialize the stubs table, followed by further calls to Tcl_PkgRequirePrefixMatch to express the exact requirement).
      
      Extensions other than Tk might very well want Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 1); to mean "the exact version that I was compiled against, no prefix matches".  In particular, extensions that reference private headers might want this behaviour.
      
      (That's been a problem with the 8.4 series -- there was no way to say "I need Tcl 8.4.N or later, because I'm using a routine that was added to the internal stubs table in that version", and there was no way to say "I want Tcl 8.4.N exactly, because ditto and furthermore there's no guarantee that it will still be in Tcl 8.4.N+1").
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  16. Add attachment "1578344-3.patch" [5e586c24cd] (rid 115622) by dgp on 2007-05-29 20:34:14.

  17. Ticket change [f041177724] (rid 109156) by dgp on 2007-05-29 20:34:17:

    1. icomment:
      
      
      File Added - 230929: 1578344-3.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Updated patch takes care of a few more
      details.
      File Added: 1578344-3.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  18. Ticket change [8f96a0a5b5] (rid 120303) by dgp on 2007-05-29 22:56:02:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      I think these patches do the right thing.
      
      They provide compatible support for
      the sensible historic ways to call
      Tcl_InitStubs():
      
        Tcl_InitStubs(i, TCL_VERSION, 1)
      
      This would be called to get a Tcl stubs
      table from the same TCL_VERSION series
      as was used to compile the extension.
      With this patch, that same meaning is
      maintained, without the need to damage
      the compatibility of what 
      [package require -exact] has always meant.
      
        Tcl_InitStubs(i, TCL_VERSION, 0)
      
      would get a stub table from the same
      TCL_VERSION series as was used to
      compile the extension, or from any
      compatible later version.  Again this
      patch does the same thing when
      called in the same way.
      
      In addition, this patch permits some
      other cases identified by jenglish to
      be addressed for the first time.
      
        Tcl_InitStubs(i, TCL_PATCH_LEVEL, 0)
      
      can be used to set a more discriminating
      floor on the set of acceptable stub tables,
      so that, say, stub tables from only Tcl 8.5.2
      and later would be accepted, and attempts to
      call in a Tcl 8.5.0 interp would fail.
      
        Tcl_InitStubs(i, TCL_PATCH_LEVEL, 1)
      
      could be used to demand lockstep requirement
      for a stub table from a single release of Tcl.
      I tend to dismiss this a lot, since it counters
      the multiple version capabilities provided by
      stubs.  But there can be other reasons to use stubs
      (getting an architecture suitable for starkit inclusion,
      for instance), and from a strict perspective of
      "support only what I test", this can be a useful
      tool for some developers and some needs.
      
      There are some other more complex requirement
      needs that cannot be expressed with a single
      Tcl_InitStubs() call even with this
      patch in place, but I really cannot imagine
      completely addressing those without an entirely
      new interface routine.
      
      There more complex requirements *can* be resolved
      with this patch, if one uses Tcl_InitStubs() to
      first get an 8.5a7 stubs table, and then make
      a call to Tcl_PkgRequireProc() to make a requirements
      test with the full power and generality of the
      TIP 268 enhanced [package require] command. 
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  19. Ticket change [6864347076] (rid 103058) by andreas_kupries on 2007-05-31 03:34:24:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Reading over your changes to AddRequirementsToResult, do I understand correctly that you are translating the form 'V-V' back into the old-style form, i.e. '-exact V' ? If yes, is the 'exactly' not a typo ?
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  20. Ticket change [03ca2314ea] (rid 119884) by andreas_kupries on 2007-05-31 03:39:20:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      I retract the question ... Checking the uses of the function I am reminded that this generates an error message, and for that the 'exactly' is exactly right (sic!). Reads nicer too, good.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  21. Ticket change [b047b1bfc3] (rid 97952) by dgp on 2007-09-11 02:36:53:

    1. icomment:
      
      
      File Added - 245031: 1578344-4.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      File Added: 1578344-4.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  22. Add attachment "1578344-4.patch" [8fcd2e7535] (rid 120336) by dgp on 2007-09-11 02:36:53.

  23. Ticket change [097df59cb0] (rid 113665) by dgp on 2007-09-11 03:12:40:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Some discussion on the chat
      concludes this solution is
      heading in the wrong direction.
      It's replacing one DWIM with
      another DWIM.
      
      We're just gonna have to expect
      that extensions will update to
      the new realities of what Tcl
      and Tk version numbers are available
      in 8.5.  The tools are there for
      them to Say What They Mean.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  24. Add attachment "1578344-5.patch" [def2848d89] (rid 114933) by dgp on 2007-09-11 23:11:34.

  25. Ticket change [89bff775d9] (rid 127278) by dgp on 2007-09-11 23:11:34:

    1. icomment:
      
      
      File Added - 245171: 1578344-5.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      New patch limited to removing
      DWIMmery in [package] without
      adding any new DWIMmery elsewhere.
      
      Requires an accompanying patch
      for Tk 8.5 to convert it to Say What
      It Means in its Tcl_InitStubs() and
      [package require Tcl] calls.
      
      File Added: 1578344-5.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  26. Ticket change [887aa3321e] (rid 131874) by dgp on 2007-09-11 23:14:18:

    1. icomment:
      
      
      File Added - 245172: 1578344-tk.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Here is that Tk patch.
       
      File Added: 1578344-tk.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  27. Ticket change [d479619131] (rid 123446) by dgp on 2007-09-11 23:25:51:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      something still flawed
      in that patch:
      
      % package require foo 1.2-1.2
      expected version number but got "1.2-1.2"
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  28. Ticket change [554302f791] (rid 94103) by dgp on 2007-09-11 23:27:33:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      d'oh!  tripped up by
      the `make shell` failure
      again! (1788551)
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  29. Add attachment "1578344-tk.patch" [a84f3fef89] (rid 98959) by dgp on 2007-09-12 00:08:59.

  30. Ticket change [4e954b9d22] (rid 125667) by dgp on 2007-09-12 00:08:59:

    1. icomment:
      
      
      File Deleted - 245172: 
      
      
      
      File Added - 245178: 1578344-tk.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Updated Tk patch adds improvemed
      pkgIndex.tcl file.
      
             
      File Added: 1578344-tk.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  31. Add attachment "1578344-6.patch" [cec421db0a] (rid 96105) by dgp on 2007-09-12 00:26:29.

  32. Ticket change [19e87fa32b] (rid 122880) by dgp on 2007-09-12 00:26:30:

    1. icomment:
      
      
      File Added - 245181: 1578344-6.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Updated patch removes some
      lingering remnants of the
      misguided Tcl_PkgRequirePrefixMatch
      routine and support.
      
      
      File Added: 1578344-6.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  33. Ticket change [33e9cbdaf9] (rid 106673) by dgp on 2007-09-12 01:32:55:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2007-09-11T18:32:55"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      fixed for Tcl/Tk 8.5b1
      
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dgp"
  34. Add attachment "initstubs.patch" [b2d0be662b] (rid 98406) by dgp on 2007-09-12 20:49:03.

  35. Ticket change [ed5bffdb4b] (rid 103861) by dgp on 2007-09-12 20:49:05:

    1. icomment:
      
      
      File Added - 245332: initstubs.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Re-opened while we chase down
      a few consequences...
      
      1) Need to consider what backport
         might be appropriate for the
         TCL_TIP268-enabled portions
         on the core-8-4-branch.
      
      2) It's been pointed out that this
         change dashes the expectations of
         those extensions that have a history
         of calling
      
            Tcl_InitStubs(interp, TCL_VERSION, 1);
      
         Compiled against the HEAD tcl.h, that
         call will currently produce a library
         that cannot be [load]ed into HEAD Tcl.
         At least surprising, if not alarming.
      
         Attached is a patch that makes followup
         revisions to Tcl_InitStubs() (and associated
         macros and support) itself to restore the
         expectations of such callers.
      
         I've tested this patch against Tk with
         its own Tcl_InitStubs() calls edited to
         be as above.  It appears to be effective.
      
      
      File Added: initstubs.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dgp"
  36. Ticket change [8af6616891] (rid 127480) by dgp on 2007-09-17 22:59:39:

    1. closedate changed to: "2007-09-17T15:59:39"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      followup patch for Tcl
      and similar for Tk committed
      for 8.5b1
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "dgp"