Charles Rich
Fri, 05 Jan 2001 06:17:50 -0800
Paul, I am in fact using a single-pass version of jtags for a source directory with about 190 java files without any problems. Perhaps xargs has been improved since 1997 (I am currently running cygwin-b20). Perhaps you could try a single-pass version of jtags on the big source directory that broke it in 1997 and see if it still breaks? -CR > Date: Thu, 04 Jan 2001 13:03:17 -0500 > From: Paul Kinnucan <[EMAIL PROTECTED]> > > At 12:24 PM 1/4/01 -0500, Charles Rich wrote: > >Paul, > > > > The revision you made to jtags below, in which the tagging process > >is broken into three passes, has an undesirable side-effect when the > >resulting TAGS file is used for tags-search or tags-query-replace. > > > > The problem is that each file in the source directory appears _three_ > >times in the TAGS file, which means that each file will be visited three times > >by tags-search, etc. (I tested this). This is very inconvenient if you want > >for example, to review all uses of a particular identifier or replace > >only some occurrences of a pattern. > > > > I am not very familiar with xargs, but I wonder if there is some other way > >around the buffer problem you cite below. > > > > It has been a long time since I made this change, but I think it was a > response to a problem that arose when I first tried to tag the JDK source > files several years ago. The JDK source hierarchy is huge and attempting to > tag it recursively in a single pass, using find and xargs, failed, at least > on Windows, because of some limitation on Cygwin xargs buffer capacity. I > was then and still am not very versed in either xargs or tags usage. > However, I've noticed that here at the Mathworks we use a hierarchical > tagging scheme for tagging large source hierarchies, i.e., a hierarchy of > tag files that mirrors the source hierarchy rather than one huge tags file > that contains tags for the entire hierarchy. So it seems to me that if one > used this approach it should be possible to tag each directory in a single > pass instead of multiple passes. > > So some possible solutions to the problem are: > > 1) If it is possible to set xargs buffer capacity, up the capacity and > restore jtags to a single pass approach. > > 2) Disregarding the issue of xarg capacity, write a single-pass version of > jtags for use by people who have small hierarchies or who use a tag file > hierarchy to tag large source hierearchies where each tag file is small. > > 3) Create a Java program (or beanshell program) that does the same thing as > jtags, i.e.. recurse through a source hierarchy to build a single tags > file. This would avoid the find/xarg memory capacity issue. > > - Paul > > > > > > Regards, and thanks for a _great_ JDE! > > > >-CR > > > ># Revision 1.5 1997/12/03 03:31:29 kinnucan > ># Divided tagging process into three passes > ># through the source hierarchy to avoid overflowing > ># the xargs buffer. > > > >-- > > Charles Rich | Mitsubishi Electric Research Laboratories > > 617-621-7507 phone | 201 Broadway > > 617-621-7550 fax | Cambridge, MA 02139 > > [EMAIL PROTECTED] | http://www.merl.com -- Charles Rich | Mitsubishi Electric Research Laboratories 617-621-7507 phone | 201 Broadway 617-621-7550 fax | Cambridge, MA 02139 [EMAIL PROTECTED] | http://www.merl.com