Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c44f17480170e2f657a35a31f3c90c700c45055a
Ticket: ba79c2f0ce408c09c8967eb037503251c4b525ac
Use of Itcl with auto load and namespace import result in command errors
User & Date: dgp on 2017-02-21 19:53:39
Changes

  1. assignee changed to: "dgp"
  2. closedate changed to: "2457806.32892377"
  3. closer changed to: "dgp"
  4. icomment:
    
    I looked. I tried. I will not fix this.
    
    Itcl breaks Tcl's built-in hackery to try
    to make the snapshot-oriented command
    [namespace import] "Do What You Mean" in
    combination with the "delay until the last
    minute" scheme of the built-in
    auto-loader.  Choose one or the other,
    magical imports of autoloaded commands or
    use of the Itcl package, but you cannot have both.
    
    Accommodating this was a dumb idea to
    begin with.  [namespace import] has
    snapshot semantics.  That's documented.
    So create commands before you attempt
    to [namespace import] them.  You cannot
    make water that is not wet.  You cannot
    take a snapshot of something that hasn't
    yet been brought into existence.
    
    Beyond that, give serious contemplation
    to ditching all use of Tcl's built-in
    auto-load system completely.  It's ancient,
    not well-maintained, and the case for it
    is very hard to make anymore.  If you can
    make the case, you can make your own
    stub-powered auto-loading scheme that works
    better in every way than this relic.
    
    As a workaround to the trouble reported in
    the ticket, you could remove the
    definition of [::auto_import] found in
    the itcl.tcl file installed as part of
    your Itcl installation.  That will avoid
    the bug associated with this ticket, but
    I have no idea what impact that may have
    on the internal expectations of Itcl.
    Test suite doesn't care, but only a fool
    thinks the Itcl test suite is comprehensive.
    
    That workaround is what I would adapt if
    I had confidence it would not upset 
    established Itcl uses.  At this point
    though, the only winning move is not to play.
    
  5. login: "dgp"
  6. mimetype: "text/plain"
  7. resolution changed to: "Wont Fix"
  8. status changed to: "Closed"
  9. subsystem changed to: "81. Bundled Packages"
  10. title changed to:
    Use of Itcl with auto load and namespace import result in command errors