ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46135] New: Regression: scriptcondition fails on 1.7.1
Date Fri, 31 Oct 2008 14:38:31 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46135

           Summary: Regression: scriptcondition fails on 1.7.1
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: ext-simon.steiner@nokia.com


Hi,

I am getting this with error with 1.7.1 and not with 1.7.0. Calling just
self.xxx doesn't cause problems. There was a similar issue, I've included
below.

SyntaxError: ('invalid syntax', ('<string>', 2, 13, "errorsTotal =
project.getPr
operty('build.errors.total')"))

        <condition property="compile.result">
            <scriptcondition language="jython"> errorsTotal =
project.getProperty('build.errors.total')
self.setValue(True)
            </scriptcondition>
        </condition>

Also:

        <if>
            <scriptcondition language="jep" value="false">
errorsTotal = project.getProperty("build.errors.total")
errorsLimit = project.getProperty("build.errors.limit")
if int(errorsLimit) > -1:
    if int(errorsTotal) > int(errorsLimit):
        self.setValue(1)
            </scriptcondition>
            <then>
                <property name="compile.result" value="1"/>
            </then>
            <else>
                <property name="compile.result" value="0"/>
            </else>
        </if>

Thanks

List:       ant-dev
Subject:    <scriptcondition> is broken with Jython in the recent trunk builds
From:       "Alexey N. Solofnenko" <A.Solofnenko () mdl ! com>
Date:       2007-07-30 23:08:30
Message-ID: 46AE6F6E.3000700 () mdl ! com [Download message RAW]

Recent trunk ANT fails in my builds because <scriptcondition> does something
with the script that Jython cannot digest (new lines?).  
<script> with the same code works fine. This is a test script:

<project>
  <script language="jython"><![CDATA[ # test
self.log("test")
]]>
  </script>
  <condition property="test">
    <scriptcondition language="jython"><![CDATA[ # test
self.log("test")
]]>
    </scriptcondition>
  </condition>
</project>

and the output is:

Buildfile: test.xml
   [script] test

BUILD FAILED
C:\tmp\test.xml:6: Traceback (innermost last):
  (no code object) at line 0
SyntaxError: ('invalid syntax', ('<string>', 1, 8, ' # test'))


Total time: 0 seconds

- Alexey.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message