Bug 48650 - Ability to specify prune directories
Summary: Ability to specify prune directories
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 49756 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-12-12 12:36 EST by Andy Bryant CLA
Modified: 2005-04-06 09:21 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Bryant CLA 2003-12-12 12:36:06 EST
We use Bitkeeper for our source control at my company which creates SCCS
directories in our source. These directories confuse the ajc compiler and cause
errors. It would be very useful if we could specify directories to prune
(besides CVS).

As suggested by Wes Isberg, perhaps a syntax like:

ajc -sourceroots . -XomitSourceroots=SCCS,temp
Comment 1 Wes Isberg CLA 2004-01-09 12:56:32 EST
*** Bug 49756 has been marked as a duplicate of this bug. ***
Comment 2 Ramnivas Laddad CLA 2004-02-15 13:03:47 EST
Just wanted to add that specifying the -sourceRoots option does
not exclude **/CVS/** either. The workaround is to use nested
<src> elements. As a result, sourceRootCopyFilter attribute to
iajc cannot be used to copy through non-class resources.

C:\work\aspectj\bugs\sourceroots-CVS>type Test.java
public class Test {
}

C:\work\aspectj\bugs\sourceroots-CVS>mkdir CVS\Base

# Simulating 'cvs edit Test.java'
C:\work\aspectj\bugs\sourceroots-CVS>copy Test.java CVS\Base
        1 file(s) copied.

C:\work\aspectj\bugs\sourceroots-CVS>ajc -sourceroots .
C:\work\aspectj\bugs\sourceroots-CVS\Test.java:1 The type Test is already defined
public class Test {
             ^^^^

1 error
Comment 3 Adrian Colyer CLA 2004-04-02 08:45:09 EST
reclassified as an enhancement request
Comment 4 Wes Isberg CLA 2005-01-26 23:31:15 EST
(somewhat regrettably) I checked in a hack workaround to omit sccs and cvs
directories when gathering sourceroots.  It can be disabled by specifying
  -Dorg.aspectj.util.FileUtil.PERMIT_CVS=true
on the java command line. Tests checked in as
org.aspectj.systemtest.ajc150.SCCSFixTests. Properly, the fix belongs in
BuildArgParser.collectSourceRootFiles(..) with support for a command-line option
and proper documentation.
Comment 5 Morten Christensen CLA 2005-03-26 12:37:18 EST
I was not aware that the the <iajc/> does not allow for traditional fileset
features like exclude (but I will soon stumble into this limitation too). This
is a VERY important feature if AspectJ is used in a normal business enviroment
with CVS/Subversion. I would like this missing feature to have high priority!
Comment 6 Wes Isberg CLA 2005-03-26 13:22:54 EST
Adrian, would you mark this bug FIXED?

(In reply to comment #5)
> I was not aware that the the <iajc/> does not allow for traditional fileset
> features like exclude (but I will soon stumble into this limitation too). This
> is a VERY important feature if AspectJ is used in a normal business enviroment
> with CVS/Subversion. I would like this missing feature to have high priority!

That's not the bug.  iajc (the Ant task) does allow you to specify sources using
filesets.  The bug is that when using the ajc (compiler) sourceroots option,
there is no way to prune directories.  But since January, both CVS and SCCS are
automatically pruned from sourceroots in ajc, so this bug is fixed for the
CVS/SCCS case.  I haven't seen a use case for other pruning that couldn't be
handled using iajc filesets or by specifying files, so I think this bug should
be closed.  Someone who has a use case for more general pruning when using
-sourceroots can reopen it for evaluation.  In any case, the workaround is to
specify the files directly, on the command line or using .lst files, so this
would always be a convenience feature, not a necessary one.
Comment 7 Adrian Colyer CLA 2005-04-06 09:21:22 EDT
resolved fixed as per wes' comment.