Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c6c16a37ca2f8a6a8b44d600a35d9e3c717d226ec8a231c8bbfcfab49f775ac2
Ticket: 8b9854c3d8ba8d64a7d3a9b20dfec552c8ee5f54
[info level 0] returns incompatible result in exported command since Tcl 8.6.9
User & Date: pooryorick on 2019-02-07 15:55:16
Changes

  1. icomment:
    <code>info level 0</code> simply returns all the words in the command
    associated with a level.  It was not intended as a mechanism for resolving the
    command to a fully-qualified name, and it generally does not:
    
    <code><verbatim>
    namespace eval n1 {} {
    	proc p args {
    		puts [info level 0]
    	}
    
    	namespace export *
    	namespace ensemble create
    	p n1
    }
    
    namespace eval n2 {} {
    	namespace path ::n1
    	p n2
    }
    </verbatim></code>
    
    
    The fact that the namespace ensemble command resolution routines ever rewrote
    the command name was incidental, and not intended to be part of the public
    interface.  In order to fix [16fe1b5807] the ensemble subcommand lookup
    routines no longer make this artifact visible to <code>info level</code>.  This
    is not a bug.  Furthermore, <code>info level 0</code> is now more consistent.
    It no longer rewrites the command provided by the caller.
    
  2. login: "pooryorick"
  3. mimetype: "text/x-fossil-wiki"
  4. resolution changed to: "Invalid"
  5. status changed to: "Pending"