[ 
https://issues.apache.org/jira/browse/AVRO-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876721#action_12876721
 ] 

Doug Cutting commented on AVRO-150:
-----------------------------------

> couldn't we write what we have into disk, since we have already spent the 
> computation power to parse the protocol and schema?

That would trigger further re-compilation, which we are trying to avoid.  We 
might, when the file is present but with a newer date, check its size.  If it's 
not the same size, then we should re-write it anyway, as the schema has 
probably changed even though the date is wrong.  We could even compare the 
content before re-writing, and only re-write if the content is different, but 
that's more expensive and probably overkill.  If a workspace becomes confused 
and folks are seeing unexpected problems, 'ant clean' should always repair 
things.  So I'd suggest checking the size as a double-check, but wouldn't 
bother checking the content.

> we are not sure if we should really prevent the javac and jar from running

You shouldn't have to do anything explicit to stop these.  The javac task will 
only compile things if .java files are newer than corresponding .class files.  
For jar, if we pass update="true" then it will incrementally update changed 
files in the jar rather than re-writing the entire jar.

> Ant tasks re-generate code even if it's up-to-date
> --------------------------------------------------
>
>                 Key: AVRO-150
>                 URL: https://issues.apache.org/jira/browse/AVRO-150
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.2.0
>            Reporter: Doug Cutting
>         Attachments: AVRO-150.patch
>
>
> The Ant tasks for Java's protocol and schema should skip generation when the 
> generated files are newer than their source.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to