Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-2244

Cleaning should be more robust on Windows

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1-rc-1

Description

I'm seeing this on windows when the indexer is on.

It manifests as java.io.IOException: Unable to delete file/directory, and then a subsequent clean will succeed.

We could cater for this by noting that a particular operation failed, and then retrying it again at the end or after some time.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
Hide
Permalink
Szczepan Faber added a comment - 23/Apr/12 12:16 AM

If we develop this feature they will probably have to remember all undeletable dirs. So I'd vote to also improve the error message to include the list of all dirs that the build could not delete at clean. This would be very useful in windows.

Show
Szczepan Faber added a comment - 23/Apr/12 12:16 AM If we develop this feature they will probably have to remember all undeletable dirs. So I'd vote to also improve the error message to include the list of all dirs that the build could not delete at clean. This would be very useful in windows.
Hide
Permalink
Luke Daley added a comment - 21/Jul/12 5:17 AM

Szczepan,

I'm inclined not to include this. The reason is that it actually makes the logic non trivially more complex, and would only really help in the situation where someone has asked to delete multiple roots which is rare. Typically the delete is just operating on the “build dir”.

Show
Luke Daley added a comment - 21/Jul/12 5:17 AM Szczepan, I'm inclined not to include this. The reason is that it actually makes the logic non trivially more complex, and would only really help in the situation where someone has asked to delete multiple roots which is rare. Typically the delete is just operating on the “build dir”.
Hide
Permalink
Luke Daley added a comment - 23/Jul/12 5:18 PM

After some research, it appears that this may be due to a bug in the Windows JDKs (incl IBM). Ant uses a strategy of forcing a GC after a failed delete and then waiting a small amount of time. Given that this appears to be a successful strategy for Ant, we have adopted it.

Show
Luke Daley added a comment - 23/Jul/12 5:18 PM After some research, it appears that this may be due to a bug in the Windows JDKs (incl IBM). Ant uses a strategy of forcing a GC after a failed delete and then waiting a small amount of time. Given that this appears to be a successful strategy for Ant, we have adopted it.

People

  • Assignee:
    Luke Daley
    Reporter:
    Luke Daley
Vote (0)
Watch (1)

Dates

  • Created:
    19/Apr/12 6:18 AM
    Updated:
    04/Jan/13 5:10 AM
    Resolved:
    23/Jul/12 5:16 PM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.