Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7855c1844c01670f1f495abd997c0e3cec491b61
Ticket: 218583ffffffffffffffffffffffffffffffffff
Error with pkg_mkindex
User & Date: nobody on 2000-10-26 01:02:44
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1327 Bug
    Version: 8.1b1
    SubmitDate: '1999-03-02'
    LastModified: '1999-04-01'
    Severity: MED
    Status: Released
    Submitter: pat
    ChangedBy: welch
    OS: Windows NT
    OSVersion: 4.0sp3
    Machine: X86
    FixedDate: '1999-04-01'
    ClosedDate: '2000-10-25'
    
    
    Name:
    Charles W. Hooks
    
    Extensions:
    none
    
    CustomShell:
    none
    
    ReproducibleScript:
          The follow code, supplied in a Tcl library file causes pkg_mkindex to
        die.
        The function provided in the namespace for the package is imported into
        the
        global scope for easy use.  The reason is was not declared in the global
        scope is that it uses many functions in that namespace as well as
        variables.
        It would be nice if pkg_mkindex would handle to namespace import line
        with
        out aborting/erroring out.  If it ignored the line, things would be
        fine.
        I would get an index for all of my commands and I would have to hand
        edit
        the namespace from foo and things would work, though it pkg_mkindex
        would
        perform this as well, things would be great!
        
          Save code in a file called test.tcl
        
        pkg_mkIndex . test.tcl
        
        This will create an empty pkgIndex.tcl file, even if you have other
        commands
        entered after the problem line.
        
        #####broken code#####
        
        package provide fubar 1.0
        
        namespace eval ::fubar:: {
            #
            # export only public functions.
            #
            namespace export {[a-z]*}
        }
        
        proc ::fubar::foo {bar} {
            puts "$bar"
            return true
        }
        
        namespace import ::fubar::foo
        
    
    
    
    ObservedBehavior:
        empty pkgIndex.tcl file.
        
    
    
    
    DesiredBehavior:
        package indexes for the functions in the file.  In the case of the
        namespace
        imported command, we should see that command indexed in the global scope
        as
        well as teh namespace scope.
        
    
    
    
    
    I simply added "-force" to the import done by pkg_mkIndex so it
    doesn't care if the script that was sourced already did an import.
    
  4. foundin changed to: "obsolete: 8.1b1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Error with pkg_mkindex"
  11. type changed to: "Bug"