[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: Efficiently find out if <file> is source or not
From: |
Tom Lord |
Subject: |
Re: [Gnu-arch-users] Re: Efficiently find out if <file> is source or not |
Date: |
Sun, 14 Mar 2004 19:39:17 -0800 (PST) |
> From: Stefan Monnier <address@hidden>
> > You would need to (a) parse {arch}=tagging-method; (b) make sure it
> > matches the source regexp and not the unrecognised one; (c) depending
> > on the tagging method, look for an arch-tag: in the file, or a
> > .arch-ids/$FILENAME.id, or whatever.
> That's pretty damn nasty since you have to be extra careful to match
> regexes in the same order as tla, and not to forget to check every
> .arch-inventory file on the way to the file you're checking, and you have
> to make sure you're using the same regex rules (in my case I'm writing
this
> in Emacs Lisp where the regexps are different), ...
Heh.
I don't disagree but arch wouldn't be here if I had stood my ground
about that.
Once upon a time, `inventory' was a hella-complicated `find'
invocation but not much more than that. Configurable a _little_ bit,
but not so much.
Two issues undid that.
1) `find' was pretty slow for this purpose. `inventory' was one of the
first places of `larch' (arch in sh) to be rewritten in C.
2) naming convention flexibility was, like, the #1 or #2 demand for
the first year or 18 months or so of arch. The simple `find'
model got left in the dust because the rock of arch's naming
conventions was softer than than the hard-place of naming
conventions in previously existing projects.
The closest thing to hope, for K.I.S.S. fans, is that `inventory'
eventually gets factored out and takes its place in some abstract
pantheon alongside `find' as a fundamental way to look at a big tree.
-t