Skip to content
Tcl Source Code History Of Ticket 695441ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 695441ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 695441ffffffffffffffffffffffffffffffffff

  1. Ticket change [04a01a49c7] (rid 120035) by jenglish on 2003-03-01 04:09:33:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The tcl_findLibrary procedure does not check the
      directories listed in $::auto_path when looking for the
      specified initialization script.
      
      This means that a combined script/binary package which
      calls tcl_findLibrary in its _Init() routine might not
      be able to find its own library, even though Tcl's
      package mechanism was able to find the binary library.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "jenglish"
    9. subsystem initialized to: "None"
    10. title initialized to: "tcl_findLibrary does not look in $::auto_path"
    11. type initialized to: "RFE"
  2. Ticket change [3cbf7db297] (rid 120961) by jenglish on 2003-03-01 11:20:57:

    1. icomment:
      Logged In: YES 
      user_id=68433
      
      An example is probably in order:
      
      Suppose Foo 1.0 contains libFoo.so, fooInit.tcl, and
      pkgIndex.tcl, where pkgIndex.tcl says:
      
      package ifneeded Foo 1.0 [list load [file join $dir
      libFoo[info sharedlibextension]]]
      
      and Foo_Init() Tcl_Eval()s a startup script containing
      
      tcl_findLibrary Foo 1.0 1.0 fooInit.tcl FOO_LIBRARY 
      Foo_Library
      
      If Foo1.0 is installed in one of the standard places
      (according to tcl_findLibrary), this will work.  If it's
      stored in a nondefault location, [tclPkgUnknown] can find
      out about the package if $::auto_path is extended, but the
      package will still fail to load since tcl_findLibrary
      doesn't look in the same place(s) as [tclPkgUnknown].
      
      Or is this an improper use of tcl_findLibrary?
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. subsystem changed to: "38. Init - Library - Autoload"
    5. username: "jenglish"
  3. Ticket change [418e70add1] (rid 116211) by dgp on 2003-03-02 06:58:02:

    1. assignee changed to: "dgp"
  4. Ticket change [7edb53d31a] (rid 97480) by dgp on 2003-03-03 09:01:01:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      my strong preference is that no new package 
      uses [tcl_findLibrary], and packages that
      currently use [tcl_findLibrary] should try to
      move away from it.
      
      [tcl_findLibrary] exists to solve a problem that
      packages are much better off just not
      creating for themselves in the first place.
      
      For your example, just be sure to install 
      all files of Foo 1.0 [*] -- libFoo.so, fooInit.tcl,
      and pkgIndex.tcl  -- all in the same installation
      directory.  Then, pkgIndex.tcl should contain:
      
      package ifneeded Foo 1.0 [list source [file join $dir
      fooInit.tcl]]
      
      And fooInit.tcl should contain:
      
      load [file join [file dirname [info script]] libFoo[info
      sharedlibextension]] Foo
      
      Since your package includes binary files, it should
      be installed only on an appropriate platform, either
      under TCL_EXEC_PREFIX, or somewhere else
      that will be placed on auto_path only on appropriate
      platforms.
      
      I believe this approach is what TEA2 recommends.
      
      The older style of installing binary parts under
      TCL_EXEC_PREFIX and cross-platform parts
      under TCL_PREFIX is what led to the need
      for [tcl_findLibrary] to allow the package to find
      its missing half.  The only benefit of that scheme
      was to save disk space on file servers serving
      multi-platform clients, and that's largely an
      optimization of a bygone era.  Much better for
      runtime sanity and for uninstall capability to
      put all parts of an installed package in just
      one place.  
      
      [*] FWIW, I'd rather you named the package
      "foo" rather than "Foo".
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [efc877cf33] (rid 109059) by jenglish on 2003-03-04 06:56:48:

    1. icomment:
      Logged In: YES 
      user_id=68433
      
      Calling tcl_findLibrary from the package _Init() routine is
      useful since it works for statically loaded as well as
      dynamically loaded packages.  Plus, it provides useful hooks
      for overriding the library path from the environment (for
      e.g., debugging) and from the application (for e.g.,
      tclkits).
      
      BTW, I agree that the script and binary parts should always
      be installed in the same place.  However, for
      statically-linked, statically-loaded packages there might
      not be a separate binary part (or even a pkgIndex.tcl).
      
      Basically: if the binary part loads the script part, the
      package can work as a Tcl_StaticPackage() or be dynamically
      loaded with no code changes.  The other way around, it
      can't.
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  6. Ticket change [246fc4f6b5] (rid 131107) by dgp on 2003-04-17 04:03:07:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      FWIW...
      
      I notice that on Max OS X only, the ::tcl_pkgPath
      is also searched.  This seems like a half-fulfillment
      of this feature request on a single platform.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [afc1e72066] (rid 97865) by dgp on 2003-07-04 05:55:18:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      see also Tk Bug 765642
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [a13dd2f921] (rid 109685) by andreas_kupries on 2003-07-04 06:02:02:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      IMHO. From my POV the script part of a package FOO should 
      simply be another package, maybe named 'FOO-tcl' or some 
      such. Then the binary part can simply 'package require' the 
      thing and it does not matter there the script part is located. 
      The package search mechanism will be enough and obviates 
      the need for 'another' search algorithm to locate stuff. 
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  9. Ticket change [ed3bae20ce] (rid 103842) by dgp on 2003-07-04 06:21:28:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Economy of search algorithms is
      attractive, I agree.
      
      I don't think the two package answer
      really works though, because we really
      don't have two packages.  Presumably
      package FOO (in this case, Tk) needs
      package FOO-tcl to work correctly, while
      at the same time FOO-tcl makes use of
      commands provided by FOO.
      
      Circular dependency is immediate evidence
      that there's really only one package here
      (one unit of loading).
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [9e67d17d3a] (rid 96468) by dgp on 2003-07-16 19:59:33:

    1. priority changed to: "8"
  11. Ticket change [7befd1319d] (rid 96991) by dgp on 2003-10-07 00:14:07:

    1. priority changed to: "5 Medium"
  12. Ticket change [2e932da10d] (rid 119244) by dgp on 2004-08-19 03:37:16:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Attached patch changes the
      search path to include directories
      in the $::auto_path and the
      scriptdir,runtime in the package's
      configuration, if any.
      
      Some obsolete directories that
      should be included in auto_path
      when relevant were also dropped.
      
      Testing invited.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [67ca6394d6] (rid 102951) by dgp on 2004-08-19 03:37:17:

    1. icomment:
      
      
      File Added - 98323: 695441.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [44ff8ddc22] (rid 116805) by dgp on 2004-08-19 23:18:55:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Patch is incompatible with
      Safe Base, which apparently
      does not allow [file normalize]
      in a safe interp.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  15. Ticket change [c4dbe017f8] (rid 111906) by dgp on 2004-08-19 23:56:54:

    1. icomment:
      
      
      File Deleted - 98323: 
      
      
      
      File Added - 98426: 695441.patch
      
      Logged In: YES 
      user_id=80530
      
      updated patch should
      correct the safe interp glitch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Add attachment "695441.patch" [8ed5049932] (rid 120182) by dgp on 2004-08-19 23:56:54.

  17. Ticket change [5870aef99b] (rid 117802) by dgp on 2004-08-24 00:40:08:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      patch committed to HEAD.
      
      Assigning to tclguy to judge
      whether an 8.4 backport is
      also appropriate.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  18. Ticket change [00618f9e5a] (rid 119312) by dgp on 2004-10-27 00:02:52:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      what portion of this, if any,
      should be backported, should
      be sorted out before 8.4.8 release.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "dgp"
  19. Ticket change [a0e49490b9] (rid 96888) by dgp on 2004-11-16 06:00:14:

    1. assignee changed to: "dgp"
  20. Ticket change [822d293036] (rid 117186) by dgp on 2004-11-17 00:19:58:

    1. status changed to: "Closed"
  21. Ticket change [363b76aa9e] (rid 107077) by dgp on 2004-11-17 00:19:59:

    1. closedate changed to: "2004-11-16T17:19:59"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      modified version backported for
      Tcl 8.4.8.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Accepted"
    7. username: "dgp"