It all started out innocently enough with me trying to conditionalize an <echo> 
message depending on whether the size of a certain file was greater or less than a 
certain limit.  Things when down hill from there.  Below is a simplified NAnt script 
and the output it produced.

To my understanding the third message should have printed as "expr2=True" similar to 
how the second message printed.

Merrill
======================================================

<?xml version="1.0" ?>
<project name="Test" default="run" >
        <target name="run" >
                <property name="count" value="100" />
                <echo message="count=${count}" />
                <echo message="expr1=${50 &lt; 100}" />
                <echo message="expr2=${50 &lt; count}" />
        </target>
</project>
=====================================================

NAnt 0.85 (Build 0.85.1687.0; net-1.0.win32; nightly; 8/14/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///C:/Temp/test.build
Target(s) specified: run 


run:

     [echo] count=100
     [echo] expr1=True

BUILD FAILED

INTERNAL ERROR

System.ArgumentException: Object must be of type Int32.
   at System.Int32.CompareTo(Object value)
   at NAnt.Core.ExpressionEvalBase.ParseRelationalExpression() in C:\Documents and 
Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\ExpressionEvalBase.cs:line 176
   at NAnt.Core.ExpressionEvalBase.ParseBooleanAnd() in C:\Documents and 
Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\ExpressionEvalBase.cs:line 115
   at NAnt.Core.ExpressionEvalBase.ParseBooleanOr() in C:\Documents and 
Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\ExpressionEvalBase.cs:line 81
   at NAnt.Core.ExpressionEvalBase.ParseExpression() in C:\Documents and 
Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\ExpressionEvalBase.cs:line 76
   at NAnt.Core.ExpressionEvalBase.Evaluate(ExpressionTokenizer tokenizer) in 
C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\ExpressionEvalBase.cs:line 43
   at NAnt.Core.PropertyDictionary.EvaluateEmbeddedExpressions(String input, Location 
location, Hashtable state, Stack visiting) in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\PropertyDictionary.cs:line 327
   at NAnt.Core.PropertyDictionary.ExpandProperties(String input, Location location, 
Hashtable state, Stack visiting) in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\PropertyDictionary.cs:line 285
   at NAnt.Core.PropertyDictionary.ExpandProperties(String input, Location location) 
in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\PropertyDictionary.cs:line 253
   at NAnt.Core.AttributeConfigurator.InitializeAttribute(PropertyInfo propertyInfo) 
in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Element.cs:line 696
   at NAnt.Core.AttributeConfigurator.Initialize() in C:\Documents and 
Settings\drieseng\Local Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Element.cs:line 573
   at NAnt.Core.Element.InitializeXml(XmlNode elementNode, PropertyDictionary 
properties, FrameworkInfo framework) in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Element.cs:line 310
   at NAnt.Core.Element.Initialize(XmlNode elementNode, PropertyDictionary properties, 
FrameworkInfo framework) in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Element.cs:line 292
   at NAnt.Core.Element.Initialize(XmlNode elementNode) in C:\Documents and 
Settings\drieseng\Local Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Element.cs:line 215
   at NAnt.Core.Project.CreateTask(XmlNode taskNode, Target target) in C:\Documents 
and Settings\drieseng\Local Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Project.cs:line 
1002
   at NAnt.Core.Target.Execute() in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Target.cs:line 247
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in 
C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Project.cs:line 876
   at NAnt.Core.Project.Execute() in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Project.cs:line 833
   at NAnt.Core.Project.Run() in C:\Documents and Settings\drieseng\Local 
Settings\Temp\tmp50FE.tmp\src\NAnt.Core\Project.cs:line 902

Please send bug report to [EMAIL PROTECTED]

Total time: 0 seconds.
======================================



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to