You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by William Uther <wi...@cs.cmu.edu> on 2000/03/29 20:08:23 UTC

dependancies (was: Re: FW: 1 suggestion and 1 bug...)

Hi,
  I've also been thinking about this.  The current javac task doesn't 
handle dependancies between java files.  If you change an interface then 
you have to clean and remake to check all files that use that interface are 
consistant.

  The other part of this is that I don't want to have to specify the 
dependancies in all cases.  There should be a make-depend like system.

  Currently Ant is closer to a scripting language than a dependancy 
tracking system.  Adding dependancies seems to be a non-trivial change.  (I 
know some people disagree about Ant being a scripting language.  Please 
flame off list.)

later,

\x/ill         :-}

--On Wednesday, March 29, 2000 12:15 PM -0500 Matthew L Daniel 
<md...@scdi.com> wrote:

>> The Javac task does something like this. As far as I can remember it
>> first searches all .java files, than looks for the corresponding .class
>> files and removes every .java file from the compile list, if it is older.
>
>	 Yes, I know.  And the solution I want is similar to that, but scanning
> the entire subdirectory structure is still not what I want. There is (more
> than likely) a few "pivot-points" in any target that determine if the
> target is out-of-date.  I am perplexed as to why Ant deviates so far from
> the existing Makefile paradigm (ugh - I said paradigm).  Just because the
> file format was broken doesn't imply the concept was.  IMHO.
>
>> I am about to solve the same problem for JavaCC, which also translates
>> grammer
>> files into java files. Would be nice, if we could build a reusable
>> solution, maybe based on the work done in Javac.java.



Re: dependencies - more to ant than just javac/jikes

Posted by jon seymour <jo...@zeta.org.au>.

David Soergel wrote:

> >Hi,
> > I've also been thinking about this.  The current javac task doesn't
> >handle dependancies between java files.  If you change an interface
> >then you have to clean and remake to check all files that use that
> >interface are consistant.
> >
> > The other part of this is that I don't want to have to specify the
> >dependancies in all cases.  There should be a make-depend like
> >system.
>
> I'm not sure it makes sense to put a complicated dependency tracking
> thing in ant, with regard to .java files anyway, when "jikes +F"
> already does what you want.  The way I use it is to make a dummy
> class with references to all the classes in my app, e.g. public class
> JikesDeps { myClass a; myOtherClass b; }, and then jikes +f
> JikesDeps.java.  This way only things that have changed, and things
> that depend on things that have changed, get compiled.
>

But compiling Java is just one thing I want to do with ant. I want to run
XSLT over documents formed from multiple files, build package files etc.
etc.  I can't use ant for this because XSLT tasks take too long to run
and I want to do it if, and only if, I need to do it.

jon.


Re: dependancies (was: Re: FW: 1 suggestion and 1 bug...)

Posted by William Uther <wi...@cs.cmu.edu>.
> I'm not sure it makes sense to put a complicated dependency tracking
> thing in ant, with regard to .java files anyway, when "jikes +F" already
> does what you want.

This implies one already has jikes compiled for your system.

\x/ill       :-}


Re: dependancies (was: Re: FW: 1 suggestion and 1 bug...)

Posted by David Soergel <lo...@lorax.org>.
>Hi,
> I've also been thinking about this.  The current javac task doesn't 
>handle dependancies between java files.  If you change an interface 
>then you have to clean and remake to check all files that use that 
>interface are consistant.
>
> The other part of this is that I don't want to have to specify the 
>dependancies in all cases.  There should be a make-depend like 
>system.

I'm not sure it makes sense to put a complicated dependency tracking 
thing in ant, with regard to .java files anyway, when "jikes +F" 
already does what you want.  The way I use it is to make a dummy 
class with references to all the classes in my app, e.g. public class 
JikesDeps { myClass a; myOtherClass b; }, and then jikes +f 
JikesDeps.java.  This way only things that have changed, and things 
that depend on things that have changed, get compiled.

-ds


____________________________________________________________
David Soergel                                lorax@lorax.org
Department of Genetics                  http://www.lorax.org
Stanford University School of Medicine        (650) 303-5324
____________________________________________________________

Re: dependancies (was: Re: FW: 1 suggestion and 1 bug...)

Posted by James Duncan Davidson <ja...@eng.sun.com>.
>   I've also been thinking about this.  The current javac task doesn't
> handle dependancies between java files.  If you change an interface then
> you have to clean and remake to check all files that use that interface
are
> consistant.

One thing that I had wanted to do with Ant is to have the Javac task, once
it had performed a clean compile, go back and scan the generated class files
and build some sort of dependancy graph that it could use in future
incremental compiles.

.duncan


Re: dependancies (was: Re: FW: 1 suggestion and 1 bug...)

Posted by James Duncan Davidson <ja...@eng.sun.com>.
> Ahhh, so desu nee.  I think if we could update the documentation to
> reflect that it would make people's lives easier.  I am a firm believer
that
> expectations are generated from documentation - ergo, say that it is a
"Make
> augmentation tool" {side steps that ugly flame-bait} rather than a "Make
> replacement," which it clearly is not [yet].

Well, to be quite honest, it wasn't really a prime time tool when first
released. It was just a quick tool that was used to build Tomcat. Nothing
more. I didn't expect it to get any attention. Of course, now that it is
obvious that it would, I regret not doing more in the way of 1) engineering
it well, and 2) documenting it well.

.duncan


Re: dependancies (was: Re: FW: 1 suggestion and 1 bug...)

Posted by Matthew L Daniel <md...@scdi.com>.
>   The other part of this is that I don't want to have to specify the 
> dependancies in all cases.  There should be a make-depend like system.

	That would be cool.  Since Ant already speaks XML, while maybe not
easy, this should be straightforward. 

>   Currently Ant is closer to a scripting language than a dependancy 
> tracking system.  Adding dependancies seems to be a non-trivial change.  (I 

	Ahhh, so desu nee.  I think if we could update the documentation to
reflect that it would make people's lives easier.  I am a firm believer that
expectations are generated from documentation - ergo, say that it is a "Make
augmentation tool" {side steps that ugly flame-bait} rather than a "Make
replacement," which it clearly is not [yet].

> \x/ill         :-}

  Very nice! :-)
  -- /v\atthew
-- 
Matthew L Daniel                I amuse myself by installing multiple
Internet Developer,             software packages on my computer and
Still Current Development, Inc. then watch them try to kill each other. 
mdaniel@scdi.com.mil               -- David Fiedler