Skip to content
Tcl Source Code History Of Ticket 1230597
Login

History Of Ticket 1230597

Artifacts Associated With Ticket 1230597

  1. Ticket change [b2e6c236a4] (rid 98420) by dgp on 2005-06-30 21:05:29:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Consider the Tcl script:
      
      namespace eval ::foo {
          proc foo {} {}
          namespace export foo
      }
      namespace eval ::bar {
          namespace import ::foo::foo
      }
      
      This script can only be eval'd
      one time.  (If it's in a file, that
      file can only be [source]d one
      time).
      
      The second attempt will
      throw an error from the
      [namespace import] attempt.
      The error is meant to warn us
      that the [namespace import]
      is overwriting an existing command.
      
      In examples like this one, though,
      that warning is wrong-headed.
      We're "overwriting" an import with
      itself, something perfectly safe.
      
      Worse, the import implementation code
      has all the info it needs to check and
      verify that this is perfectly safe, yet fails
      to do so.
      
      Much, much worse, the existing "fix"
      for this problem is to add "-force" to
      the [namespace import] which loses
      all safety, even that which would be
      useful.
      
      Here's a patch to make [namespace import]
      stop raising errors on "overwrites" of an
      import over itself.  This is obviously a good
      idea.  Less obvious whether a TIP is required.
      
      This patch is all that's needed to fix
      Tk Bug 1230576.
      
    4. foundin initialized to: "None"
    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: "21. [namespace]"
    10. title initialized to: "allow [namespace import] of same command"
    11. type initialized to: "RFE"
  2. Add attachment "import.patch" [7c1616e0e6] (rid 97020) by dgp on 2005-07-01 04:05:30.

  3. Ticket change [37c45a2556] (rid 112087) by dgp on 2005-07-01 04:05:30:

    1. icomment:
      
      
      File Added - 140416: import.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [376d4ca70c] (rid 107274) by msofer on 2005-07-01 04:26:19:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Patch looks good at first sight. I do not think a TIP is
      needed, this seems consistent with the following quote from
      namespace.n:
      "This command normally returns an error if an imported
      command conflicts with an existing command."
      
      This patch only changes the behaviour in case that there is
      NO conflict. It could even be argued that it fixes a bug ;)
      
      I see that one test was specifically looking for this
      behaviour. Does itcl test for this too?
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  5. Ticket change [cf6b3447d6] (rid 112973) by dkf on 2005-07-01 04:53:03:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      I agree with Miguel; fixing this is entirely reasonable.
      (And who *cares* if this busts itcl?)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Add attachment "1230597.patch" [feec236ebd] (rid 108670) by dgp on 2005-07-01 21:30:43.

  7. Ticket change [b505ecf7a9] (rid 125163) by dgp on 2005-07-01 21:30:43:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Here's the corresponding patch
      for core-8-4-branch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [2ea9898bfb] (rid 92929) by dgp on 2005-07-01 21:30:44:

    1. icomment:
      
      
      File Added - 140516: 1230597.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [02189db693] (rid 119588) by dgp on 2005-07-06 00:27:32:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2005-07-05T17:27:32"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      committed to both branches.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Accepted"
    8. status changed to: "Closed"
    9. username: "dgp"