Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8989b1de9947f1fbee7006afd475c8d0b65a070afe0a0fe6b334ca98442feb4f
Ticket: e8664672cde1a03f7e40f179042236e9e75012e8
tcllib packages in deeper subfolders won't load in safe interp
User & Date: juliannoble2 on 2024-06-05 18:17:56
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    The default auto_path for a safe interp created with safe::interpCreate doesn't load tcllib packages that have their sources in deeper subdirectories.
    e.g
    
        % safe::interpCreate x
        x
        % x eval {package require page::parse::peg}
        0.1
        % x eval {package ifneeded page::parse::peg 0.1}
        source {$p(:42:)/tcllib1.21/page/parse_peg.tcl}
        % x eval {package require page::writer::peg}
        permission denied
        % x eval {package ifneeded page::writer::peg 0.1}
        source {$p(:42:)/tcllib1.21/page/plugins/writer_peg.tcl}
    
    The same situation occurs with various tcllib term subpackages such as: term::ansi::code
    
    It can be worked around with something like:
       %safe::interpAddToAccessPath x c:/tcl87/lib/tcllib1.21/page/plugins
    
    But from what I can see in the safe base documentation - these should load by default. I have only encountered it so far with some tcllib packages - but I assume the folder depth issue may affect custom packages structured in this way too.
    
  5. is_private changed to: "0"
  6. login: "juliannoble2"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "957fdfcd8744611e3fe1f4896c7538b1d9bf47b2"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "juliannoble2"
  13. subsystem changed to: "33. Safe Base"
  14. title changed to:
    tcllib packages in deeper subfolders won't load in safe interp
    
  15. type changed to: "Bug"