Skip to content
Tcl Source Code History Of Ticket 209fd9adce08b582
Login

History Of Ticket 209fd9adce08b582

Artifacts Associated With Ticket 209fd9adce08b582

  1. Ticket change [936aba9125] (rid 233899) by juliannoble2 on 2024-09-29 07:32:06:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      The documentation for 'package files <package>' states:
      
      "Lists all files forming part of package. Auto-loaded files are not included in this list, only files which were directly sourced during package initialization. The list order corresponds with the order in which the files were sourced."
      
      What exactly is meant by Auto-loaded files? Just those put in ::auto_index related to the package - or also those when Tcl has to scan module/library paths?
      
      On a system with no accelerators such as critcl,cryptkit or trf - and also with additional entries in ::auto_path
      
          #llength [package require md5;package files md5]
          1181
      
      (md5 package attempts to load the non-present accelerators - resulting in scanning the library paths)
      
      It is returning all the pkgIndex.tcl paths from unrelated packages
      
      I found this behaviour somewhat useful to determine when such scans are happening (as the performance impacts can be heavy) but I'd like to know if this is intentional or not - as the files are technically sourced - but the documentation could be read to infer it shouldn't return these.
      
      People testing on one system where 'package files <pkg>' returns a small set of relevant results may be surprised to get huge listings on another system, so if the behaviour as is, is correct - I think the issue should be highlighted in the docs.
      
    5. foundin initialized to: "tcl9"
    6. is_private initialized to: "0"
    7. login: "juliannoble2"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "957fdfcd8744611e3fe1f4896c7538b1d9bf47b2"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "juliannoble2"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to: "package files documented behaviour"
    16. type initialized to: "Bug"
  2. Ticket change [85881aa862] (rid 233900) by juliannoble2 on 2024-09-29 07:34:02:

    1. icomment:
      I'd also note that when this happens, the documentation statement: "Lists all files forming part of a package" becomes an inaccurate description.
      
    2. login: "juliannoble2"
    3. mimetype: "text/plain"
  3. Ticket change [47107f97dd] (rid 233916) by jan.nijtmans on 2024-09-30 09:20:34:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      Thanks for the report!
      
      This is - indeed - not intentional. I'll think of a way how to prevent that.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  4. Ticket change [61a9f1b6c8] (rid 233918) by jan.nijtmans on 2024-09-30 11:59:13:

    1. icomment:
      Idea how to solve this: Currently, all "pkgIndex.tcl" files are added to the list at the moment they are sourced. Whenever a "package ifneeded" is executed, we store the name of the file being executed (which is the pkgIndex.tcl file) in the "package ifneeded" data.
      
      Then, when the "package require" command ends and the package is actually sourced, we known the version number, so we can search for the correct pkgIndex.tcl file in the "package ifneeded" data, and add it to the list.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"