Skip to content
Tcl Source Code History Of Ticket 495660ffffffffff
Login

History Of Ticket 495660ffffffffff

Artifacts Associated With Ticket 495660ffffffffff

  1. Ticket change [e89b38472d] (rid 104675) by dgp on 2001-12-20 23:14:32:

    1. assignee initialized to: "melissachawla"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      [saveState] records only the list of procedure
      names and variable names in use, but not their
      definitions, so there's really no "restore"
      capability in [restore].
      
      Also, [restoreState] only examines [info procs]
      rather than [info commands], so new commands
      are not cleaned up if they are not [proc]s.
      
      Also, the history kept by [saveState] is only
      one level deep, so a second call to [saveState]
      destroys the saved information from the first call.
      The saved state is actually stored in a Tcl list that
      could easily manage a stack.
      
      So, the whole deal looks pretty useless to me.
      
      The actual bugs:
      
      1) The documentation for [saveState] and [restoreState]
         suggests they are useful if a test file
         "creates or deletes global variables or procs".
         However, as noted above, there is no real restore
         capability, so these commands can do nothing to help
         out when procs or global variables are deleted.
         Well, [restoreState] could raise an error, but it
         doesn't.
      
      2) The documentation refers to "global variables", but
         these routines operate in the frame of their
         callers, so they operate on global variables only
         if called from level #0.  They should use
         [info globals] instead of [info vars], to operate
         as documented.
      
      With the features of tcltest 2.x, it seems to me
      that each test should be managing its own setup and
      cleanup with the -setup and -cleanup options anyway.
      I'd suggest deprecating [{save|restore}state].
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "34. tcltest Package"
    10. title initialized to: "[{save|restore}State] useless/buggy"
    11. type initialized to: "Bug"
  2. Ticket change [123c8bb749] (rid 95276) by hobbs on 2002-03-23 06:06:31:

    1. assignee changed to: "dgp"
  3. Ticket change [05a5afcbe7] (rid 89101) by dgp on 2002-04-16 07:48:51:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Note that {save|restore}State only pretend to
      operate on procs and variables.  These are
      also the things stored in namespaces.
      
      It is simpler and more reliable for a test suite
      to create and destroy a namespace for the commands
      and variables it uses, than to attempt to call on
      saveState and restoreState.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [6c47aa2175] (rid 128477) by dgp on 2002-04-17 06:22:54:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      This patch removes documentation of [saveState] and
      [restoreState] from tcltest 2.  The commands themselves
      can stick around for the sake of compatibility support
      for tcltest 1, but removing them from the documentation
      effectively deprecates them so that new test suites will
      not be encouraged to use these useless and buggy commands.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [f93f6d85c8] (rid 91675) by dgp on 2002-04-17 06:22:55:

    1. icomment:
      
      
      File Added - 21328: ttstate.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Add attachment "ttstate.patch" [ef9b65c310] (rid 109024) by dgp on 2002-04-17 06:22:55.

  7. Ticket change [e6ded7cfee] (rid 104364) by dgp on 2002-04-18 07:00:22:

    1. closedate changed to: "2002-04-18T00:00:22"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      committed to HEAD (8.4a5)
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"