Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cb79131b75ae38280f3e08ed7de27cf18f336685
Ticket: 2964719fffffffffffffffffffffffffffffffff
Improve handling of ::auto_path in Safe Base interpreters
User & Date: kjnash on 2010-03-06 20:45:07
Changes

  1. icomment:
    Sorry for the fixed-width post - here's the same text but hopefully more readable this time.
    
    THE STATUS QUO:
    
    The Safe Base makes the slave's ::auto_path identical to its access path.  This arrangement pre-dates both modules and the "safe" glob command.  In a safe interpreter glob would raise an error (which was then caught) when tclPkgUnknown used it to access subdirectories of the ::auto_path; in a safe interpreter the auto_path was made identical to the access path so that all packages could be accessed.
    
    Now that "safe" glob is available, it has a kludge to prevent tclPkgUnknown from looking for packages in the grandchildren of the "intended" ::auto_path directories.
    
    With the introduction of Tcl modules, the access path now also includes the module path and its subdirectories (to unlimited depth): these are in the safe interpreter's ::auto_path but do not belong there.
    
    FEATURE REQUEST:
    
    The ::auto_path should be managed separately from the access_path, and should not include the module path.  At a future revision of Tcl (8.6?), the tclPkgUnknown kludge should be removed from AliasGlob, and the safe interpreter ::auto_path should be defined in the same way as unsafe interpreters (so that its subdirectories are searched for packages).
    
    Changes to the Safe Base public API will be needed, either in the commands and their options, or in their effects: for example the Safe Base might refrain from setting a slave's ::auto_path, and require the master interpreter to do so explicitly.
    
    
    
  2. login: "kjnash"
  3. mimetype: "text/plain"
  4. username: "kjnash"