ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: [Bug 28444] - Import: Target Handling Bug
Date Fri, 13 May 2005 12:44:17 GMT
> From: Stefan Bodewig [mailto:bodewig@apache.org] 
> 
> On Fri, 13 May 2005, Jose Alberto Fernandez 
> <jalberto@cellectivity.com> wrote:
> 
> > Well, alternatively you could overide "setup":
> 
> Sure, we can certainly play fetch-me-a-rock here.  I just 
> need to come up with a more complex scenario and there will 
> be no solution for it in which I didn't have to duplicate 
> (partial) depends lists or introduce empty targets.
> 

In any case, I know what you mean. The difference that we have with
regular OO procedural languages is that we need to refer to the
dependencies
in the inheritance and we do not have a way to express that.
Although the notation bellow is wrong, what you would like is something
like:

<target name="compile" depends="${depends-of:imported.compile},
generate-java-from-idl, imported.compile"/>

I do not like ${depends-of:...} because it looks too much like something
evaluated dynamically,
which may be the case, but then people will want to be able to use
properties and that is a 
no-no for me.

We could generate something like:

<target name="imported.compile:depends" depends="..."/>

and then you are able to say:

<target name="compile" depends="imported.compile:depends,
generate-java-from-idl, imported.compile"/>

The target "imported.compile:depends" should be generated by <import/>.

This may duplicate the amount of targets, which may be not nice, but we
could have something
on <import/> to request this depends targets. Something like:

<import file="foo.xml" as="imported" expose-depends-for="compile,
build"/>

This will add the additional targets "imported.compile:depends" and
"imported.build:depends".

What do you think? Too complicated?

Jose Alberto


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message