Why do I get this error message when the task itse...
# community-support
p
Why do I get this error message when the task itself is UP-TO-DATE?
Copy code
Calculating task graph as configuration cache cannot be reused because an input to task ':build-logic:jar' has changed.
> Task :build-logic:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :build-logic:compileKotlin UP-TO-DATE
> Task :build-logic:compileJava NO-SOURCE
> Task :build-logic:pluginDescriptors UP-TO-DATE
> Task :build-logic:processResources UP-TO-DATE
> Task :build-logic:classes UP-TO-DATE
> Task :build-logic:jar UP-TO-DATE
v
Can you reproduce this? If so, does
--info
bear more information? Or maybe a
--scan
if you can? I've never seen such a message, only which concrete CC input did change, but not that the inputs for a task have changed. Which Gradle version is it?
Well, at least the message can come at least since 6.7.0. For 6.7.0-RC1 a test was added that asserts on that message: github.com/gradle/gradle/commit/1c92b5eb4664…
Ah, I got the exact message reproduced. Maybe you can draw some conclusions from it. I did in the
build-logic
build script
Copy code
tasks.jar {
    from("foo")
}
and created the file
foo
accordingly. If I now execute, then change the contents of the file, then reexecute, then I get the message in the start but the task is also re-executed. If I then add to the
build-logic
build script
Copy code
file("foo").writeText("FOO")
so that on configuration badly the file contents get overwritten, then on "execute, filechange, reexecute" I still get that message in the beginning with the task being up-to-date.
p
You are too fast for me. I got this error when running IDEA sync after switching a branch. I do use 9.8.1, but it is still strange to see UP-TO-DATE but no CC hit. Thanks for the issue!
v
Yes, up-to-date though no CC hit is strange. Can you find the cause with the information I provided? As I said, I can only reproduce it if one of the input files for the task changed, but then during configuration phase is changed back so that the task is actually up-to-date. Besides that, CC is not used during IDE sync anyway, unless you have IP enabled that is.
p
I use IP :)
Not really, but I think it is caused by the IntelliJ injected plugin that often cause some CC misses.
v
Then you should probably report that to JetBrains YouTrack