Slackbot
06/23/2022, 11:50 PMVampire
06/24/2022, 1:01 AMRodrigo Oliveira
06/24/2022, 12:05 PMRodrigo Oliveira
06/24/2022, 12:06 PMJavi
06/24/2022, 12:10 PMwarn
is not possibleVampire
06/24/2022, 4:13 PMDavid Chang
06/24/2022, 4:30 PM2022-06-24 07:27:50 PDT > Configuration cache state could not be cached: field 'constructorConstructor' from type 'com.google.gson.Gson': error writing value of type 'com.google.gson.internal.ConstructorConstructor'
2022-06-24 07:27:50 PDT > Configuration cache state could not be cached: field 'accessor' from type 'com.google.gson.internal.ConstructorConstructor': error writing value of type 'com.google.gson.internal.reflect.UnsafeReflectionAccessor'
2022-06-24 07:27:50 PDT > Configuration cache state could not be cached: field 'overrideField' from type 'com.google.gson.internal.reflect.UnsafeReflectionAccessor': error writing value of type 'java.lang.reflect.Field'
2022-06-24 07:27:50 PDT > Configuration cache state could not be cached: field 'root' from type 'java.lang.reflect.Field': error writing value of type 'java.lang.reflect.Field'
2022-06-24 07:27:50 PDT > Configuration cache state could not be cached: field 'overrideFieldAccessor' from type 'java.lang.reflect.Field': error writing value of type 'jdk.internal.reflect.UnsafeBooleanFieldAccessorImpl'
2022-06-24 07:27:50 PDT > Unable to make field protected final java.lang.reflect.Field jdk.internal.reflect.UnsafeFieldAccessorImpl.field accessible: module java.base does not "opens jdk.internal.reflect" to unnamed module @24b175f
Vampire
06/24/2022, 5:14 PMDavid Chang
06/24/2022, 6:10 PMDavid Chang
06/24/2022, 6:10 PMDavid Chang
06/24/2022, 6:20 PMVampire
06/24/2022, 6:30 PMcom.foo.plugins.gradle.scan.data.SkippedCompilationTask
your task?David Chang
06/24/2022, 6:30 PMVampire
06/24/2022, 6:31 PM__buildScanExtension__
where you store the com.gradle.enterprise.gradleplugin.internal.extension.DelegatingBuildScanExtension
instance which is not properly serializable and thus the tasks state cannot be cached.David Chang
06/24/2022, 6:32 PMFooTaskContext
David Chang
06/24/2022, 6:32 PMDavid Chang
06/24/2022, 6:32 PMprivate val taskContext: FooTaskContext by lazy { FooTaskContext(project) }
at the top level in those pluginsDavid Chang
06/24/2022, 6:33 PM@get:Internal
David Chang
06/24/2022, 6:33 PM@get:Internal
abstract val buildScanExtension: Property<BuildScanExtension>
Vampire
06/24/2022, 6:35 PMat the top level in those pluginsHaving that in the plugin is probably not the problem. But I guess you inject that into your tasks and if the cache tries to serialize the state of the tasks to the cache, that fails.
i did mark that asThat's for whether it is considered as input or output for up-to-date checks and build output cache key calculation. It is meaningless for configuration cache. The configuration cache needs to serialize the complete state of the object, (unless there was some transient setting I don't remember right now), so that it can restore the tasks state from the cache. This even affects private fields. How else should the task work when it is restored from cache and no code to set those fields is executed?@get:Internal
David Chang
06/24/2022, 6:53 PMproject
for the other area.. i'll take another look.. it doesn't feel too good guard CI codeDavid Chang
06/24/2022, 7:17 PM__buildScanExtension__
code path, so it makes me think that it's more due to the other part inside FooTaskContext
Vampire
06/24/2022, 9:53 PMI should access it directly fromAt execution time? That would not be configuration cache safe either.project