Tcl Library Source Code

View Ticket
Login
Ticket UUID: 148eb6d849bb9d503fc19f475b0d99cfd0a4b00c
Title: Add a "package require tcllib" type "metapackage"
Type: RFE Version:
Submitter: anonymous Created on: 2019-06-26 22:06:59
Subsystem: None Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2019-06-26 22:06:59
Resolution: None Closed By: nobody
    Closed on:
Description:
Suggestion: Add a "package require tcllib" "metapackage", which would serve the following purposes (in no particular order):

-- Simplify checking if there is an installed tcllib base package,
-- Allow loading specific versions, or failing if the version is not available,
-- Have the package require commend return the found version,
-- Set up a few commands to query the installed base tcllib, such as the list of individual packages included; Possibly even how the hierarchy is structured (i.e., for "pkgfoo", with a child/sub package "pkgfoo::bar", indicate whether or not "pkgfoo" automatically loads the child or not).
-- Possibly other uses..

While I already wrote my code to scan the library paths and gather most of this information on my own, I really did not want to 1) reinvent the wheel, and 2) if the tcllib package structure or included packages changes, I would have to find and update my own code everywhere I use it. Even if I make my own package and just update that, I'd still have to keep it in sync with all other older code, older tcllib installations, etc. It would be better if the tcllib package provided it's own code for these things--after all, the package knows itself better than I do!

As to my "why".. I'm playing with starkits, and trying to find out what packages are available/built-in to the various "tclkit" binaries I have found. But one of the most frustrating results of probing the package system is when I end up with long list of the individual packages in tcllib, when I'd rather just end up with "tcllib 1.18 is available". (Again, I've written code to do this, but it's "fragile" and will likely break if the internal structure of tcllib changes..)