Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 52481 invoked from network); 7 Dec 2000 06:46:23 -0000 Received: from cortex-gw.magna.com.au (HELO smtp.cortexebusiness.com.au) (203.174.140.214) by locus.apache.org with SMTP; 7 Dec 2000 06:46:23 -0000 Received: (from daemon@localhost) by smtp.cortexebusiness.com.au (8.10.0/8.10.0) id eB76kD912173 for ; Thu, 7 Dec 2000 17:46:13 +1100 (EST) Received: from UNKNOWN(192.168.1.8), claiming to be "monkey.prod.thespot.com.au" via SMTP by ripley, id smtpdAAA0PaGPx; Thu Dec 7 17:46:07 2000 Received: (from daemon@localhost) by monkey.prod.thespot.com.au (8.10.0/8.10.0) id eB76k7s03156 for ; Thu, 7 Dec 2000 17:46:07 +1100 (EST) Received: from UNKNOWN(192.168.1.9), claiming to be "chunky.devl.ebinteractive.com.au" via SMTP by monkey, id smtpdAAArwaOjg; Thu Dec 7 17:45:58 2000 Received: from snotty (snotty.devl.ebinteractive.com.au [192.168.1.32]) by chunky.devl.ebinteractive.com.au (8.10.0/8.10.0) with SMTP id eB76jvB25323 for ; Thu, 7 Dec 2000 17:45:58 +1100 (EST) From: "Conor MacNeill" To: Subject: RE: Expansion in includes Date: Thu, 7 Dec 2000 17:47:01 +1100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > From: James Duncan Davidson [mailto:duncan@x180.net] > > Typing in commands -- yes it give an error, but in a shell script (even > /bin/sh) if you say 'echo asdf${barf}asdf', you get 'asdfasdf' -- at least > on my shell here. :) > > > What you are suggesting is closer to MAKE's behavior, AHHHHHGGGGGGG :-P > > Properties are always just strings -- not of any other type. Well we have been debating whether that will continue to be true :-) > An > empty string > can be either "" or null. Since there are no other types here, and I can't > think of a case in using a property where you really care about the > difference between "" and null, using "" for the undefined just seems > natural. > Regardless of what the Unix shell may do, we need to preserve the current behaviour. Ant now allows properties to be read in from properties files. The order in which property strings are delivered from the Properties object used to read the file will, in general, be different from the order of the properties in the file itself. If these properties reference other properties, we can have, effectively, forward references. These forward references are left "intact" for later resolution - ie when the referred property value is delivered from the Properties object. In general, I don't think we should implicitly interpret undefined properties as empty strings. If you use a property, you should give it a value. If the property is not defined, the usage is probably a mistake. I prefer things to be explicit (TM). As I said, that would be my preference but the forward reference issue requires that undefined properties are passed through unchanged, at least for now. The best we can do is log a warning. Conor