You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/01/30 17:27:31 UTC

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.

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


DO NOT REPLY [Bug 38451] - When using the html option the antlr task doesn't recognised whether the target is up-to-date and thus executes superfluous compilations.

Posted by bu...@apache.org.
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





------- Additional Comments From gudnabrsam@yahoo.com  2006-01-30 18:58 -------
This patch sounds reasonable... re investigation of the task's overall
correctness, my personal opinion is that the task is overall very "loose" i.e. I
can't show you particular holes but it feels like they're everywhere.  Know that
there is some talk of a rewritten task to be hosted at antlr.org.  But since
Terence is an XML opponent he's never had much personal investment in Ant.  :)

-- 
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


DO NOT REPLY [Bug 38451] - When using the html option the antlr task doesn't recognised whether the target is up-to-date and thus executes superfluous compilations.

Posted by bu...@apache.org.
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


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From peterreilly@apache.org  2006-09-11 21:06 -------
Fixed in SVN, Thanks for the report.

-- 
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


DO NOT REPLY [Bug 38451] - When using the html option the antlr task doesn't recognised whether the target is up-to-date and thus executes superfluous compilations.

Posted by bu...@apache.org.
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


f.zeyda@tees.ac.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|PatchAvailable              |




------- Additional Comments From f.zeyda@tees.ac.uk  2006-01-30 17:30 -------
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 under what conditions, and make sure their name 
is always guessed correctly in the getGeneratedFile() method.

-- 
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