This message was deleted.
# configuration-cache
s
This message was deleted.
r
In a way. Gradle is using reflection to read and serialize the fields of `SerializedLambda`when it could be using the exposed API.
m
I'm not sure how I can workaround this. I have added
serializableFunctionOf
,
serializableTransformerOf
etc around lambdas in my plugin 😕
I guess the issue is that one serialized lambda uses
collect(...)
and that collector cannot be serialized.
Ok I have found a workaround for this one by not passing the collector as an argument, on to the next error...
does that ring a bell?
Copy code
Caused by: java.lang.ClassCastException: class org.gradle.api.internal.file.DefaultFileCollectionFactory$ResolvingFileCollection cannot be cast to class org.gradle.api.artifacts.Configuration (org.gradle.api.internal.file.DefaultFileCollectionFactory$ResolvingFileCollection and org.gradle.api.artifacts.Configuration are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @4cdf35a9)
        at org.graalvm.buildtools.gradle.NativeImagePlugin.$renamedDeserializeLambda$(NativeImagePlugin.java:153)
        at org.graalvm.buildtools.gradle.NativeImagePlugin.$deserializeLambda$(NativeImagePlugin.java)
        ... 170 more
(sorry no scan because.... happens at configuration time!)
this seems to be caused by this call:
Set<ResolvedComponentResult> components = classpath.getIncoming().getResolutionResult().getAllComponents()
r
It looks related to how the configuration cache serialization turns
Configuration
objects into simpler `FileCollection`s
Any implicitly captured variable holding a
Configuration
instance must be explicitly typed as
FileCollection