Skip to content
Tcl Source Code History Of Ticket b2964460b617adb8
Login

History Of Ticket b2964460b617adb8

Artifacts Associated With Ticket b2964460b617adb8

  1. Ticket change [04e5bdc579] (rid 168188) by pooryorick on 2019-01-09 00:18:54:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      The following script,
      
      <code><verbatim>
      	namespace eval n1 {
      		namespace export *
      		proc hello {} {
      			puts hello
      			rename hello {}
      			proc hello {} {
      				puts goodbye
      			}
      		}
      	}
      
      	namespace eval n2 {
      		namespace import [namespace parent]::n1::hello
      		hello
      		hello
      	}
      </verbatim></code>
      
      produces the error <code> invalid command name "hello"</code>.
      
      However, if <code>rename hello {}</code> is removed, there is no error.
      
    5. is_private initialized to: "0"
    6. login: "pooryorick"
    7. priority initialized to: "5 Medium"
    8. resolution initialized to: "None"
    9. severity initialized to: "Minor"
    10. status initialized to: "Open"
    11. submitter initialized to: "pooryorick"
    12. subsystem initialized to: "21. [namespace]"
    13. title initialized to:
      namespace import: routine resolution when target routine is deleted and recreated
      
    14. type initialized to: "Bug"
  2. Ticket change [7f5537c852] (rid 168189) by sebres on 2019-01-09 09:49:50:

    1. icomment:
      I'm pretty sure we'd close this ticket (as incorrect), because this work as expected:<br/>
      If you execute `rename hello {}` in-between this REMOVES also all imported links in all referenced namespaces (otherwise we'll get leaks).<br/>
      Without this removal the linked command could still remain, because it is simply replaced.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Invalid"
  3. Ticket change [f77ae4f773] (rid 168198) by sebres on 2019-01-09 11:01:38:

    1. icomment:
      As discussed in tcl-chat, it looks rather like a RFE: need a way to provide a persistent import of all commands exported from other namespace.
      
      This would affect namespace command resolver similar way like an alias (thus persistent) but only for the exported commands (therefore `namespace path`, `interp alias` etc are not an option for this purposes).
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "None"
    5. title changed to:
      persistent namespace import: routine resolution when target routine is deleted and recreated
      
    6. type changed to: "RFE"