Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8a3b61736c98d89dba1429c3ff68afcaa8f3f24d07d14271915a05a4e2c9686e
Ticket: 923bf7ac55191fd8c5f8c0c9fb22ebe2f1095e99
http/pkgIndex.tcl is missing some autoload entries
User & Date: anonymous on 2026-11-24 23:10:55
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    Some http commands will be unavailable when requiring the http package indirectly in a static Tcl build because the auto_load command list in pkgIndex.tcl appears to out-of-date.
    
    A workaround is to manually trigger the auto-loading via a command that is listed, e.g. 'auto_load ::http::config'.
    
    Here is an example of triggering the problem via an indirect require of http via another package in a static Tcl build:
    
    ### Files
    
    # test.tcl
    set scriptDir [file dirname [info script]]
    puts "Old auto_path: $auto_path"
    set auto_path [linsert $auto_path 0 [file join $scriptDir "testlib"]]
    puts "New auto_path: $auto_path"
    package require testpackage
    
    # testlib/testpackage.tcl
    puts "HTTP VERSION: [package require http]"
    puts "HTTP COMMANDS: [info commands ::http::*]"
    puts [::http::quoteString " "]
    puts "End of script"
    package provide testpackage 1.0.0
    
    # testlib/pkgIndex.tcl
    package ifneeded testpackage 1.0.0 [list source [file join $dir testpackage.tcl]]
    
    ### Script output
    
    $ /usr/pkg/tcl/9.0/bin/tclsh test.tcl
    Old auto_path: //zipfs:/lib/tcl/tcl_library //zipfs:/lib/tcl /usr/pkg/tcl/9.0/lib
    New auto_path: ./testlib //zipfs:/lib/tcl/tcl_library //zipfs:/lib/tcl /usr/pkg/tcl/9.0/lib
    HTTP VERSION: 2.10.2
    HTTP COMMANDS: 
    invalid command name "::http::quoteString"
        while executing
    "::http::quoteString " ""
        (file "./testlib/testpackage.tcl" line 3)
        invoked from within
    "source ./testlib/testpackage.tcl"
        ("package ifneeded testpackage 1.0.0" script)
        invoked from within
    "package require testpackage"
        (file "test.tcl" line 5)
    
  5. foundin changed to: "9.0"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "anonymous"
  13. subsystem changed to: "29. http Package"
  14. title changed to: "http/pkgIndex.tcl is missing some autoload entries"
  15. type changed to: "Bug"