This message was deleted.
# caching
s
This message was deleted.
v
That's a pretty bad idea actually. You are now saying that the outputs are up to date, no matter what they contain, they just need to exist. So if you for example manually change the output files, the task will no longer be out-of-date.
If the output files are not present, the task should indeed be out-of-date of course. Sometimes I have seen that up-to-dateness state got corrupted and tasks were considered up-to-date when they shouldn't. I didn't yet investigate too deep, but when it happened needed to get it going fast. So I deleted
<rootproject>/.gradle
and everything in
<GRADLE_USER_HOME>
(by default
~/.gradle
) that I did not put there manually like
gradle.properties
or
init.d
. This fixed the corrupted state for me, but I don't know what to delete more narrowly to fix it, or how to reproduce it.
m
Thanks Vampire! So you believe it’s a corruption problem, rather than the task being misconfigured? Trying to understand whether I should report a bug to the task owners or not. I think for example one could define a task with an output, but then don’t write to it in some conditions, also forget to add these conditions to the task inputs. In this case the UP-TO-DATE evaluation would be correct?
v
I'm afraid I didn't understand your last sentence fully. Iirc, a task that does not have output files can never be up-to-date. Unless manually configured so with
outputs.upToDateWhen { ... }
. To determine whether you should report a bug to the task author, you should clean out those directories and then try to reproduce the problem. If it still happens you maybe found a bug.