[GRADLE-909] Dependency Cache Broken Created: 16/Apr/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Steve Appling Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


 Description   

The up-to-date checks using the cache are not currently reliable. In particular, a clean does not always trigger a rebuild.

Here is a sequence that can reproduce the problem with the java quickstart sample:

Go to the quickstart sample and run 'gradle build'. - this makes sure you have the output classes

Then delete the .gradle cache directory. (This simulates changing to a new version of gradle where a new subdirectory is used underneath the .gradle dir).

Now do 'gradle build' - this will create the caches (and seems to cache that the output files are there).

Now do 'gradle clean build' - the build will fail because it thinks compileJava is UP-TO-DATE.

It is now stuck in a state where it always thinks it is up to date.

Deleting the cache manually (or using -C rebuild option) can get around the problem for that run, but you can run into similar issues later. Currently it seems you have to do -C rebuild every time to consistently avoid this.



 Comments   
Comment by Steve Appling [ 16/Apr/10 ]

In a private email, Adam said he would look into this. Assigning to him.

Comment by Adam Murdoch [ 17/Apr/10 ]

To unstick the cache, use gradle -C rebuild clean. It should be fine after that. It is important to use both -C rebuild and clean at the same time.

Generated at Wed Jun 30 11:42:03 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.