Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 65118 invoked from network); 17 Dec 2009 13:07:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 13:07:31 -0000 Received: (qmail 54522 invoked by uid 500); 17 Dec 2009 13:07:31 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 54396 invoked by uid 500); 17 Dec 2009 13:07:30 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 54386 invoked by uid 99); 17 Dec 2009 13:07:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 13:07:30 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_HELO_PASS,SPF_SOFTFAIL,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of nicolas.lalevee@hibnet.org does not designate 216.86.168.183 as permitted sender) Received: from [216.86.168.183] (HELO mxout-08.mxes.net) (216.86.168.183) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 13:07:21 +0000 Received: from wm2.irbs.net (wm2.irbs.net [216.86.168.169]) by smtp.mxes.net (Postfix) with ESMTP id 548C5509DA for ; Thu, 17 Dec 2009 08:07:00 -0500 (EST) Received: from wmbeta.mxes.net (wm2.irbs.net [216.86.168.169]) by wm2.irbs.net (Postfix) with ESMTPA id 1342E85358 for ; Thu, 17 Dec 2009 08:06:59 -0500 (EST) MIME-Version: 1.0 Received: from AOrleans-158-1-48-217.w86-221.abo.wanadoo.fr [86.221.255.217] with HTTP/1.1 (POST); Thu, 17 Dec 2009 08:06:59 -0500 Date: Thu, 17 Dec 2009 08:06:59 -0500 From: =?UTF-8?Q?Nicolas_Lalev=C3=A9e?= To: Ant Developers List Subject: Re: [POLL] target-groups In-Reply-To: <874onqf0v0.fsf@v35516.1blu.de> References: <873a3dycgk.fsf@v35516.1blu.de> <4B283D95.2010900@callenish.com> <874onqf0v0.fsf@v35516.1blu.de> Message-ID: <4a0ac0aa0ffb2e57f69afd59d65d07c5@mail.mxes.net> X-Sender: nicolas.lalevee@hibnet.org User-Agent: RoundCube Webmail/0.3-stable Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, 17 Dec 2009 09:42:11 +0100, Stefan Bodewig wrote: > On 2009-12-16, Bruce Atherton wrote: > >> To me, only two of the options are seriously being discussed right now: > >> 1) the current target-group codebase >> 2) moving the behaviour of target-group into all targets through a >> marker attribute > > Nobody is more surprised by this then myself. Nicolas dug out the old > thread which lead to 2 but I had long forgotten about it. > >> On first glance, changing target-group to a target with a marker >> attribute looks like a NOP, but this is not necessarily true. As you >> pointed out before, Stefan, targets are used in quite a lot of >> contexts and in some of those contexts (like import) things might get >> a bit confusing if we just substitute a the target-group concept in >> for a target. > > This is what the current codebase does anyway (treating target-group > like targets in any context) - and its where EasyAnt differs, they apply > different rules to phases in imports. > > So from the viewpoint of the current codebase the two options you have > highlighted are really not very different. That doesn't mean it has to > be that way. > >> My question is whether we need to provide different behaviour under >> any circumstances between a target and what we now call a target-group >> (other than the obvious extension of dependencies). > > IIRC the difference in EasyAnt boils down to not prefix the names of > phases when they get , i.e. if you > > > > > > the target-group's name is "a.b" if you want to add your target to it > (from outside the included file). Using EasyAnt's phase it would be > "b". > > I think EasyAnt's motivation is something like > > > > > > > > > > > > group="I'd love to be part of ready-to-compile"> > ... > > > > With Ant's current code base the target-group's name is > standard-javac-stuff.ready-to-compile. How would the generate target > know that, considering the as-attribute on (not used here). > To make things worse, re-writes group and depends attributes > to prefix them, so there is no way for the target to join the target > group at all, even if it knows the name. > > To be properly self-contained generate-source.xml could have ed > standard-javac-stuff, but then the target-group it had joined would be > different from the target-group used by the top-level build file. > > Of course all the problems disappear if you use instead of > - and you get a different set of problems like overriding > targets by accident because they happen to share the same name. As I see them, target groups are expected to be "hooked" by other targets, then they should "shared" between several build files. IMHO they should be used composition more than aggregation, import more than include, so it is not an issue. Nicolas > >> If they can be treated as completely equivalent I'd favour what I've >> labelled as option 2 above. > > I agree. This meant there wouldn't be much use in the current > implementation. > >> If there are circumstances where, for example, you couldn't add a >> dependency to a suitably marked target because of namespace issues or >> import issues or whatever, then I would vote for option 1 above, so as >> to make it clear to the user that there are considerations that need >> to be made when using the target-group construct. > > Which meant changing the current codebase, which I'm totally fine with. > > All we need is to agree on the semantics before we modify the > implementation - and probably before we try to find suitable names. > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org