ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [Bug 28444] - Import: Target Handling Bug
Date Thu, 12 May 2005 19:34:44 GMT
On Thu, 12 May 2005, Peter Reilly <> wrote:

> The target gets renamed if there another target of the same name,
> but not otherwise - how can one write a proper reusable import file
> using the rename feature in this case?

I'm strongly +1 for at least providing renamed aliases for all
targets, independent on how we achieve that.

> The fix will have a small overhead - the target object needs to be
> cloned and given a a new name, whereas the current code just renames
> the target object.

Do we really need to create a complete clone?  Can't we achieve the
same with a more lazy approach?

Turning Matt's idea around:

(1) Target "foo" is in project "bar".
(2a) There already is a target "foo" from the file that imported
     "bar", use the current code, we are ready, "" is there.
(2b) There is no other target "foo" yet.  Create an empty placeholder
     target "" that depends on "foo".

     If then later a target "foo" is found in the importing buildfile,
     replace the placeholder "" with the initial "foo" target.

Wouldn't that work, stay backwards compatible and hide "bar." whenever


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message