Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bfa13115b760c03e65c35ec22fc0bdf4fc25ce2f
Ticket: a4494e28edfaa3a5d064dd1d91cfbd6163b6fb20
alias trace did not find command in real command list of import references
User & Date: pooryorick on 2014-02-05 03:11:33
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    In Tcl 8.6.1, the code below produces the following message, and the interpreter aborts:
    
    DeleteImportedCmd: did not find cmd in real cmd's list of import references
    
    
    ### begin code ###
    #! /bin/env tclsh
    
    proc alias {alias target} {
        set fulltarget [uplevel [list namespace which $target]]
        namespace eval [namespace qualifiers $fulltarget] \
            [list namespace export [namespace tail $fulltarget]]
        set newcmd [namespace eval [info cmdcount] [string map [
            list @{alias} [list $alias] @{fulltarget} [list $fulltarget] ] {
            namespace import @{fulltarget}
            rename [namespace tail @{fulltarget}]  @{alias}
            ::namespace export @{alias}
            ::namespace which @{alias}
        }]]
        uplevel [list namespace import $newcmd]
        uplevel [list trace add command $fulltarget delete [list apply [list {stash args} {
            namespace delete [namespace qualifiers $stash]
        }] $newcmd]]
    }
    
    proc proc1 args {}
    alias newproc proc1
    proc proc1 {} {}
    
  5. foundin changed to: "8.6.1"
  6. is_private changed to: "0"
  7. login: "pooryorick"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "8254af92ef5a06fe918df67f141b815e71ed987e"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "pooryorick"
  14. subsystem changed to: "21. [namespace]"
  15. title changed to:
    alias trace did not find command in real command list of import references
    
  16. type changed to: "Bug"