[Starkit] filleting tcllib
Andreas Kupries
andreask at ActiveState.com
Wed May 4 10:02:22 CEST 2005
> > A simple text file which contains all "A depends on B" dependencies
> > as a Tcl-readable text file, say as "A B\n" lines could go a long way.
> >
> > Could add a third item perhaps, for cases where dependencies are
> > platform-specific or depend on the presence of other packages. Easy
> > to ignore for simple-minded uses of this datafile.
> >
> > I'd vote for having such a text file included in the tcllib distro,
> > then anyone can come up with whatever automation scripts they like.
> > Let's make a start with dependency-awareness in the world of Tcl
> > packages, without it we'll never reach any sort of repository solution!
> >
>
> The trouble with text files is that they need maintaining, and an
> out-of-date text file just throws you back to manually working through
> the dependencies.
Exactly my argument.
> If you think about it, every script in tcllib that
> has dependencies has "package require" statements; there is already a
Exactly.
> top-level pkgIndex.tcl file which implicitly contains a list of
> packages and where they are located; each package has its own
> pkgIndex.tcl which details what to source.
Actually the toplevel pkgIndex.tcl more or less only extends the auto_path
so that the subdirectories are searched.
The module subdirectories have a single package index, this may be for a
single package, but most directories contain several which share an index.
I have very experimental code for TM conversion which is able to work
through the pkgIndex and sources and figure out which file belongs to what
package, however this is only semi-automatic because some packages are to
complex for the heuristics. This code could possibly also be used to split
modules containing many packages into separate directories containing only
one each.
> But there are some funnies. autoproxy lives under http - there may
> be good sense in that, and it's simple to discover, but some of the
> location/dependency combinations are more obscure. A good script
> taking advantage of the facilities of Tcl to walk recursively around
> collecting dependencies and putting them together would surely be
> prefereable to a manually-maintained text file?
Definitely.
--
Andreas Kupries <andreask at ActiveState.com>
Developer @ http://www.ActiveState.com, a division of Sophos
Tel: +1 604 484 6491
More information about the Starkit
mailing list