Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 46737 invoked from network); 3 Sep 2005 19:16:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Sep 2005 19:16:56 -0000 Received: (qmail 94749 invoked by uid 500); 3 Sep 2005 19:16:55 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 94674 invoked by uid 500); 3 Sep 2005 19:16:55 -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 94661 invoked by uid 99); 3 Sep 2005 19:16:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2005 12:16:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2005 12:17:09 -0700 Received: from localhost (localhost [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id 433113706B for ; Sat, 3 Sep 2005 20:16:52 +0100 (BST) Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 20024) with LMTP id 29752-03-9 for ; Sat, 3 Sep 2005 20:16:49 +0100 (BST) Received: from timmay.hpl.hp.com (timmay-hb.hpl.hp.com [15.144.59.39]) by tobor.hpl.hp.com (Postfix) with ESMTP id 5B7163705F for ; Sat, 3 Sep 2005 20:16:49 +0100 (BST) Received: from [16.27.160.87] ([16.27.160.87]) by timmay.hpl.hp.com (8.13.2/8.13.2) with SMTP id j83JGjkO012351 for ; Sat, 3 Sep 2005 20:16:46 +0100 (BST) Message-ID: <4319F6D0.6030904@apache.org> Date: Sat, 03 Sep 2005 20:17:36 +0100 From: Steve Loughran User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: typedef onerror default References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPLB-IMAP-MailScanner-Information: Please contact the Helpdesk for more information X-HPLB-IMAP-MailScanner: Found to be clean X-HPLB-IMAP-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jose Alberto Fernandez wrote: >>Steve Loughran wrote: >> >> >>>Why is the onerror default of typedef "fail" and not "failall"? >>> >>>The effect is that a typedef like this >>> >> uri="antlib:com.puppycrawl.checkstyle" >>> /> >>> >>>will warn but not fail if the property file is missing. Surely a >>>missing declaration file is important enough that the >> >>default should >> >>>be "fail the build right now". >>> >>>proposal >>> -we change the "new for ant1.7" default to failall >>> -we allow for a failuremessage attr that lets you say "add >> >>checkstyle >> >>>to your build via -lib" or whatever. >>> > > > This is not necessarily an error. As in some of my buildfiles, the same > build may create a library with utility tasks which are typedef'd > and use those tasks to do other things. > > In such an environment, you do not want the code to fail on the typedef > but only when you try to use something that is not defined. > > So a warning is appropriate, and I do not see any reason to change it. I see that, and I see the BC issue. But I also see that when you use antlib URIs, you are declaring tasks with onerror=ignore everywhere, so only need to taskdef very late. Maybe if people say antlib="something" as peter suggested, then the default is failall. we could even add a test message for failures (nested?) that can contain text or URLs for explaining what to do on failure( e.g. download from ant-contrib.sf.net) -steve --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org