Return-Path: X-Original-To: apmail-ant-dev-archive@www.apache.org Delivered-To: apmail-ant-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 194979E37 for ; Tue, 14 Feb 2012 12:39:39 +0000 (UTC) Received: (qmail 87794 invoked by uid 500); 14 Feb 2012 12:39:38 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 87704 invoked by uid 500); 14 Feb 2012 12:39:38 -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 87681 invoked by uid 99); 14 Feb 2012 12:39:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 12:39:37 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [88.84.128.168] (HELO samaflost.de) (88.84.128.168) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 12:39:31 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id E8C56289800B for ; Tue, 14 Feb 2012 13:39:09 +0100 (CET) Received: from samaflost.de ([127.0.0.1]) by localhost (v35516.1blu.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dJ5oYL+yz3gh for ; Tue, 14 Feb 2012 13:39:09 +0100 (CET) Received: by samaflost.de (Postfix, from userid 1000) id 9ED7F2898012; Tue, 14 Feb 2012 13:39:09 +0100 (CET) From: Stefan Bodewig To: dev@ant.apache.org Subject: Re: Property expansion in macrodef attributes References: <87aa4oqs0d.fsf@v35516.1blu.de> Date: Tue, 14 Feb 2012 13:39:09 +0100 In-Reply-To: (Jesse Glick's message of "Sun, 12 Feb 2012 14:13:04 -0500") Message-ID: <87vcn9zj0y.fsf@v35516.1blu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2012-02-12, Jesse Glick wrote: > On 02/12/2012 05:13 AM, Stefan Bodewig wrote: >> I'm not sure whether the macrodef writer will always know whether she >> wants double-expansion or not. > I would say that if you come across a problem like that mentioned in > #42046 then you know you do not want double expansion and should > explicitly turn it off. Most likely you don't want double expansion in most cases. > In most cases the script calling the macro will be the same as the > script defining it, or at least located in the same project, so I > doubt documentation of the macrodef is an issue; The biggest problem I see is AntUnit. Here the macro is defined in a different place and we'd need a new release that requires Ant 1.8.3 to fix it. Right now I'm inclined to revert to the behavior of Ant 1.8.2 for the 1.8.x branch, add the attribute to trunk but make trunk's behavior default to not expand ${} twice (flagging it as breaking BWC). > though discoverability of the flag in the macrodef task may be poor > even with a FAQ entry. Agreed. > If this problem had been noticed when macrodef was first introduced, > then single expansion would be the more intuitive behavior, especially > if #29347 were fixed properly so that ${thing.${choice}} works the way > people expect it to, but it is too late to change the default behavior > of macrodef. I'm with Matt in that property helpers already provide the foundation for a solution and the props Antlib (anybody wants to cut a release?) implements it. I also understand Ant users don't like to add more dependencies, something to keep in mind if we ever want to redesign Ant. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org