Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 604dd8e0bb34186bb5d4ba39f4d35ce0a7586b7b665b891fd9fd5a82576cf4e7
Ticket: 6b3618ed9363e6038df3efc113093eef9a86323c
can't find package opt 0.1
User & Date: sebres on 2018-08-03 14:46:28
Changes

  1. icomment:
    So it works by direct loading of package index...
    The question is: why does not work on demand.
    
    It looks like some module tries to load package opt (possibly on demand within pkgIndex/tclIndex) BEFORE auto_path is properly set, or just some similar issue.
    
    1. Simple try (as already said in my first comment):
    <p style="margin-left:10pt; border-left:1px solid gray; padding-left:3pt">
    Also to find the possible evil-doers search inside tcl-library for "opt 0.1" (maybe even with "-exact" prefixed).
    </p>
    2. More complex try:<br/>
    Insert following code into begin of init.tcl and try again to start or do package require opt...
    <code><pre style="padding-left:10pt">
    ## ----------------------------------------------------------------------------
    ## inject to trace all-sources:
    if {[namespace which -command ::_org_source] eq ""} {
      rename ::source ::_org_source
      proc ::source {args} {
        ::puts "** DBG:[string repeat "  " [info level]]** [linsert $args 0 ::source] **"
        if {[catch {
          uplevel 1 [linsert $args 0 [set args ::_org_source]]
        } err opt]} {
          ::puts "** ERR: $::errorInfo"
          return {*}$opt $err
        }
        ::puts "** DBG:[string repeat "  " [info level]]** \[OK\] **"
      }
    }
    ## /inject
    ## ----------------------------------------------------------------------------
    </pre></code>
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"