Skip to content
Tcl Source Code History Of Ticket 2907095
Login

History Of Ticket 2907095

Artifacts Associated With Ticket 2907095

  1. Ticket change [9675cf8756] (rid 106333) by wjc on 2009-12-01 20:23:05:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Minor nit: library/init.tcl is checking for package with;
      
      if {[info commands package] == ""}
      
      instead of
      
      if {[info commands package] eq ""}
      
      This works, but we should probably follow the advice in expr.n in the library code for clarity.
      
      (only reason I noticed is because I am trying to execute this with a version of partcl that is (wrongly) treating == as always numeric.)
      
      inlined diff (against old version) below.
      ---
      diff --git a/library/init.tcl b/library/init.tcl
      index 6b92c58..1ba39a6 100644
      --- a/library/init.tcl
      +++ b/library/init.tcl
      @@ -14,7 +14,7 @@
       # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
       #
      
      -if {[info commands package] == ""} {
      +if {[info commands package] eq ""} {
           error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later
       }
       package require -exact Tcl 8.5.6
      
      
      
    4. foundin initialized to: "None"
    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: "wjc"
    10. subsystem initialized to: "None"
    11. title initialized to: "library/init.tcl using wrong string comparison"
    12. type initialized to: "Bug"
  2. Ticket change [9b719030db] (rid 111123) by andreas_kupries on 2009-12-02 03:25:28:

    1. icomment:
      [12:18]aku[info commands package] == "" -- Actually eq is not really right either. info command's result is a list, so we should use '![llength [info commands package]]'.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  3. Ticket change [5518fbeb06] (rid 94071) by andreas_kupries on 2009-12-02 05:30:40:

    1. assignee changed to: "dgp"
    2. icomment:
      Attached a patch fixing the nit, and similar ones in tcltest.tcl.
      Assigned to tcltest maintainer for review.
      
      
    3. login: "andreas_kupries"
    4. mimetype: "text/plain"
    5. subsystem changed to: "34. tcltest Package"
    6. username: "andreas_kupries"
  4. Ticket change [92e728e2d8] (rid 105724) by andreas_kupries on 2009-12-02 05:31:20:

    1. icomment:
      
      
      File Added - 353482: info-commands.patch
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  5. Add attachment "info-commands.patch" [8cbf5fb713] (rid 127791) by andreas_kupries on 2009-12-02 05:31:20.

  6. Ticket change [8b26ae8d75] (rid 127510) by dgp on 2009-12-02 09:38:34:

    1. closedate changed to: "2009-12-02T02:38:34"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      
      You have both missed the point.  Those lines
      of init.tcl are present to protect the rest of
      the script against getting [source]d by a Tcl
      interp of version 7.4 (!!) or earlier.  If you change
      it to anything that isn't in Tcl 7.4 you defeat
      whatever purpose it has.
      
      The proper way to update those lines to the
      expectations of modern Tcl is to simply
      delete them, on the theory that Tcl 7.4 no
      longer exists, and [package] is present
      everywhere Tcl is, just like [set].  I don't mind
      a commit that does exactly that.
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. subsystem changed to: "38. Init - Library - Autoload"
    9. username: "dgp"
  7. Ticket change [dc75f62021] (rid 114486) by andreas_kupries on 2009-12-02 23:06:32:

    1. icomment:
      Ok. I see your point Don.
      We need a command which has existed at least since 7.4, better if it existed earlier.
      Based on the above 'eq' is certainly unsuitable.
      The attached patch however used [llength], not the originally proposed 'eq', and this command should have the necessary characteristic, i.e. IIRC it was present in 7.3, likely even before.
      
      Of course, if deleting the block in init.tcl is ok, doing that should be trivial.
      Note that the patch also touches tcltest.tcl.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"