ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38451] New: - When using the html option the antlr task doesn't recognised whether the target is up-to-date and thus executes superfluous compilations.
Date Mon, 30 Jan 2006 16:27:31 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38451>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38451

           Summary: When using the html option the antlr task doesn't
                    recognised whether the target is up-to-date and thus
                    executes superfluous compilations.
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: f.zeyda@tees.ac.uk


When using the html option the antlr task doesn't recognised whether the target 
is up-to-date and thus executes superfluous compilations.

I have tracked down the bug to some extend in the source code, in essence the 
problem is that the method getGeneratedFile() in class 
org.apache.ant.taskdefs.optional.ANTLR (line 348) only deduces the output File 
correctly if the generated file is a ".java" file (which is not the case if the 
html option is specified). A fix to the particular problem is to replace line 
367:

return new File(outputDirectory, generatedFileName + ".java");
--------------------------------------------------------------

with

return new File(outputDirectory, generatedFileName + (html ? ".html" : ".java");
--------------------------------------------------------------------------------

in file ANTLR.java (directory src/main/org/apache/tools/ant/taskdefs/optional/)

Moreover it might be desirable to investigate more thoroughly what types of 
output files antlr can produce and under what conditions, and make sure their 
name is always guessed correctly in the getGeneratedFile() method.

Frank Zeyda

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message