From ant-dev-return-35528-qmlist-jakarta-archive-ant-dev=jakarta.apache.org@jakarta.apache.org Thu Jul 11 15:01:21 2002 Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 87400 invoked from network); 11 Jul 2002 15:01:21 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 11 Jul 2002 15:01:21 -0000 Received: (qmail 14307 invoked by uid 97); 11 Jul 2002 15:01:30 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 14277 invoked by uid 97); 11 Jul 2002 15:01:29 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 14212 invoked by uid 98); 11 Jul 2002 15:01:26 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <20020711150101.87015.qmail@web10807.mail.yahoo.com> Date: Thu, 11 Jul 2002 16:01:01 +0100 (BST) From: =?iso-8859-1?q?Jose=20Alberto=20Fernandez?= Subject: Re: enhancement, it's done, but do you like how it works? To: Ant Developers List , nicolaken@apache.org In-Reply-To: <3D2D9567.1060506@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --- Nicola Ken Barozzi wrote: > > Jose Alberto Fernandez wrote: > > --- Nicola Ken Barozzi > wrote: >> With respect to the syntax of "super" what I would >> probably do instead of denoting it just as the string >> "super.XXXX" I would use some different notation, >> for example: >> >> > depends="${ant::super(mytarget)}"> >> >> >For Java writers super. is more easy to see, and >less intimidating than >:: ... > >Hey, but it's a property... hmmm... > By being a property it means that its value will be computed somehow (you can think of their values to be defined within the context of each file). Although in reality it is a computed value. >> now, I doubt anybody has a property called like >that. >> So I think the backward compatibility issue is >> negligeable. The advantage I see with this >notation is >> that it allows ProjectHelper to do more powerfull >> rewriting. In the following situation, for example: >> >> File: ${basedir}/includes/A.xml >> >> >> >> >> File: ${basedir}/build.xml >> >> > depends="${ant::super(mytarget)}"> >> >> >> >> The rewriting done by ProjectHelper will look like: >> >> > depends="a,b,c"> >> >> >> >> > depends="include/A.xml::mytarget"> >> >> >> >> Notice that all the rewriting can be computed >> statically, so there is no issue here. >> >> This particular mangling rule for the overriden >> targets has the advantage that when we see the >> execution of the build we will be able to identify >> which version of the target is under execution at >any >> time. Notice that everthing stays syntactic with no >> changes on any of the tasks, in principle. >> >> And as with my comments above, if after rewriting >> something clash, then the files are not upward >> compatible, which is OK. > >> comments, > >Well, it's basically what the patch does (or should >do ;-), but IMHO >what the patch does is simpler. > >I don't understand what using a property versus >super.taskname brings >you, could you explain? > The fact that it is NOT a string. If you use a string you will have to parse the data. What does it happen if you have something like: How do you know "parent" needs to be rewritten? On the other hand, you will always rewrite the following: which it is much more powerful and you are not guessing. By the way, the exact syntax of the property is not the point. The important points are: 1) Make dificult to clash with current buildfiles: "ant::" 2) Be able to call any overloaded target: "super(targetname)" Then put it all toguether. Jose Alberto __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: