On 07/05/2010 7:52 AM, Stefan Bodewig wrote:
First of all I must admit that I like the idea of not overwriting
read-only files better than the old behavior.

Agreed. Although it breaks backward compatibility to change this, it so violates POLA[1] that I think it needs changing.

Independent of that we should make sure<copy>  behaves consistently, it
shouldn't matter whether there are filters or not.

I'm a big fan of a little consistency.

I see several options:

(2) Add a new attribute that controls whether read-only files should be
     overwritten (let's rely on File.canWrite).

     What should be its default value?  What would be its name?

This is the only sensible option IMO. I like your idea of "force". As for the default, I'd prefer it to be false since that is the sensible default but I can see that there have been several people bitten by this already, so for the sake of backward compatibility and ease of transition for our older users I could accept setting the default to true. OTOH, we have had two releases with the false behaviour, so we could be breaking people who set up builds on Ant 1.8.X systems.

Sorry, did you want a clear answer to your question? Let's just say I lean toward making the default on force be false.

[1] http://en.wikipedia.org/wiki/Principle_of_least_astonishment


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

Reply via email to