Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b643c027a8883748326cdd1ff6ace724056b0378
Ticket: 218902ffffffffffffffffffffffffffffffffff
auto_mkindex reports error which is not existing
User & Date: nobody on 2000-10-26 01:07:25
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2611 Bug
    Version: 8.1
    SubmitDate: '1999-08-31'
    LastModified: '2000-01-28'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: ericm
    RelatedBugIDs: 2480
    OS: All
    FixedDate: '2000-01-28'
    FixedInVersion: 8.3
    ClosedDate: '2000-10-25'
    
    
    Name:
    Hermann Boeken
    
    ReproducibleScript:
    script dummy.tcl:
        
        --------------------------------------------------
        set dummy_string "{dummy} {return \$dummy}"
        
        proc dummy_proc {} {
        
        #empty
        
        }
        --------------------------------------------------
        
        
        Start a tclsh (8.1) and perform the command <auto_mkindex . *.tcl>,
        where the above script dummy.tcl is in the current directory.
    
    ObservedBehavior:
    The above command produces the following error message:
        
        can't read "dummy": no such variable
        
        Putting the command in a script <auto.tcl> and executing it with the
        tclsh gives some more
        information on this unexpected error message:
        can't read "dummy": no such variable
            while executing
        "set dummy_string "{dummy} {return \\$dummy}""               <---- 
            invoked from within
        "$parser eval $contents"
            (procedure "auto_mkindex_parser::mkindex" line 25)
            invoked from within
        "auto_mkindex_parser::mkindex $file"
            (procedure "auto_mkindex" line 25)
            invoked from within
        "auto_mkindex . *.tcl
        "
            (file "auto.tcl" line 1)
    
    DesiredBehavior:
    As with Tcl 8.0.5 I expect a tclIndex to be generated which contains the
        following contents:
        
        -------------------------------------------
        # Tcl autoload index file, version 2.0
        # This file is generated by the "auto_mkindex" command
        # and sourced to set up indexing information for one or
        # more commands.  Typically each line is a command that
        # sets an element in the auto_index array, where the
        # element name is the name of a command and the value is
        # a script that loads the command.
        
        set auto_index(dummy_proc) [list source [file join $dir dummy.tcl]]
        -------------------------------------------
    
    
    
    Verified in 8.2.1 
    -- 10/29/1999 hobbs
    
    This was caused by an over-aggressive attempt to protect from undefined variables in the source being indexed.  It was adding a backslash escape for every dollar sign it saw, even if the dollar was already escaped (as was the case here).  Of course, re-escaping an escaped dollar sign basically means that the dollar sign is not escaped at all, which lead to the error you saw.
    This is fixed in 8.3.
    
    - eric
    
    -- 01/28/2000 ericm
    
    
    
  4. foundin changed to: "obsolete: 8.1"
  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: "56. LibTomMath"
  10. title changed to: "auto_mkindex reports error which is not existing"
  11. type changed to: "Bug"