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 2004/08/23 07:21:03 UTC

DO NOT REPLY [Bug 30795] New: - Delete task needs a 'verify' safety attribute

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=30795>.
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=30795

Delete task needs a 'verify' safety attribute

           Summary: Delete task needs a 'verify' safety attribute
           Product: Ant
           Version: 1.6.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: thomasw@powermapjdo.com


Hi --

Delete Task needs a 'safety' so its correct targetting can be verified, before
the actual deletion is run. This is a loaded gun, folks, and I've seen it once
already go off in a (substantially) unexpected location with (further)
unexpected results.

I wouldn't do a bulk delete manually without double-checking what I was about to
delete, and filesets etc make this much less visible in the Ant tool. So people
need a way to see & confirm before the delete executes.

I was concerned about the lack of an obvious 'confirm', 'verify', 'displayonly'
or 'safety' feature on the delete task. I spent 40 minutes looking for a way to
confirm this -- or to print the actual targets of a fileset -- none of which
basic troubleshooting/ reliability features seemed to be available. Finally I
decided that Ant must be moderately reliable and just to run the sucker.

This stinks. Because when it ran, the delete targetted the top folder of my
major development project. Spuriously -- I'd quadruple checked the targetting
before, checked after, and still have no idea why the bomb went off there.
Luckily there was no recursion into src folders. Also luckily, but unreliably as
far as the tool goes, some files were erased but not others.

Summary: I'm really disappointed at the lack of basic safety, ability to print
what a fileset targets, and the bizarre and not particularly explainable way
things went wrong. 

My conclusion: never to use the Delete task under any circumstances; but to use
the Move task to some 'trashcan' deleted folder instead.

Suggested enhancements:
1) 'verify' or 'displayonly' attributes for Delete task
2) task to print actual resolved targets of filesets etc

This would allow the buildfile to be tested safely, before turning the 'safety'
attribute for production usage.

Hopefully these would be helpful to developers working on their makefiles. I
absolutely shudder to think of a mis-targetted 'delete bomb' going off in
people's root or major work directory. This could make the term 'major fuckup'
seem a polite understatement :-)

It scared the f**k out of me!

Luckily it should be easy and clean and nice to fix.


Cheers,
Thomas

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