https://kotlinlang.org logo
#gradle
Title
# gradle
t

tjohnn

03/19/2024, 8:43 PM
Hi everyone 👋, Can someone please help or advice on this issue: I bumped kotlin to 1.9.22 and I started getting this error
Could not resolve all files for configuration ':some-kmm-module:detachedConfiguration4'
. I believe this is due to
kotlin.incremental.useClasspathSnapshot
which is enabled by default from kotlin 1.8.20 (i am upgrading from kotlin 1.8.10), setting
kotlin.incremental.useClasspathSnapshot
to false fixes the problem but I'd like to enable it. Here is the full error message:
Copy code
> Failed to transform kotlin-stdlib-1.9.22.jar to match attributes {artifactType=classpath-entry-snapshot, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for ClasspathEntrySnapshotTransform: /home/circleci/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.22/d6c44cd08d8f3f9bece8101216dbe6553365c6e3/kotlin-stdlib-1.9.22.jar.
         > java.lang.IllegalArgumentException (no error message)
   > Failed to transform annotations-13.0.jar to match attributes {artifactType=classpath-entry-snapshot, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for ClasspathEntrySnapshotTransform: /home/circleci/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar.
         > java.lang.IllegalArgumentException (no error message)
More stack trace:
Copy code
Caused by: java.lang.IllegalArgumentException
	at org.jetbrains.org.objectweb.asm.ClassVisitor.<init>(ClassVisitor.java:70)
	at org.jetbrains.org.objectweb.asm.ClassVisitor.<init>(ClassVisitor.java:57)
	at org.jetbrains.kotlin.incremental.classpathDiff.KotlinClassHeaderClassVisitor.<init>(BasicClassInfo.kt:98)
	at org.jetbrains.kotlin.incremental.classpathDiff.BasicClassInfo$Companion.compute(BasicClassInfo.kt:47)
	at org.jetbrains.kotlin.incremental.classpathDiff.ClassFileWithContents$classInfo$2.invoke(ClassFile.kt:46)
Caused by: java.lang.IllegalArgumentException

	at org.jetbrains.kotlin.incremental.classpathDiff.ClassFileWithContents$classInfo$2.invoke(ClassFile.kt:45)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at org.jetbrains.kotlin.incremental.classpathDiff.ClassFileWithContents.getClassInfo(ClassFile.kt:45)
	at org.jetbrains.kotlin.incremental.classpathDiff.ClassSnapshotter.snapshot$snapshotClass(ClasspathSnapshotter.kt:88)
	at org.jetbrains.kotlin.incremental.classpathDiff.ClassSnapshotter.snapshot(ClasspathSnapshotter.kt:109)
	at org.jetbrains.kotlin.incremental.classpathDiff.ClasspathEntrySnapshotter.snapshot(ClasspathSnapshotter.kt:57)
	at org.jetbrains.kotlin.gradle.internal.transforms.ClasspathEntrySnapshotTransform.doTransform(ClasspathEntrySnapshotTransform.kt:90)
	at org.jetbrains.kotlin.gradle.internal.transforms.ClasspathEntrySnapshotTransform.transform(ClasspathEntrySnapshotTransform.kt:53)
	at org.gradle.api.internal.artifacts.transform.DefaultTransform.transform(DefaultTransform.java:276)
	at org.gradle.api.internal.artifacts.transform.AbstractTransformExecution$2.call(AbstractTransformExecution.java:143)
	at org.gradle.api.internal.artifacts.transform.AbstractTransformExecution$2.call(AbstractTransformExecution.java:137)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at 
...
a

Alexander.Likhachev

03/21/2024, 4:55 AM
Hi, could you please file an issue with a reproducer project? http://kotl.in/issue
t

tjohnn

03/21/2024, 8:43 AM
Yes I can, but I can't get to reproduce on a smaller project yet. It only happens on a big private project.
t

tapchicoma

03/21/2024, 4:11 PM
on which JDK version build is running?
t

tjohnn

03/21/2024, 4:15 PM
JDK 17
t

tapchicoma

03/21/2024, 4:16 PM
is it possible to share a Gradle build scan with error?
t

tjohnn

03/21/2024, 4:35 PM
Yes I will try to get it today
thank you color 1
Hi @tapchicoma, sorry for the late response. Unfortunately I am not able to share the whole scan reports due to privacy. However I exported these pages that include all the stacktrace and dependencies, I hope they are useful?
👀 1
t

tapchicoma

03/26/2024, 10:20 AM
@tjohnn hi, build-dependencies are only shown for the
:build.gradle
. I am more interested in build dependencies of
:analytics
module (you could send them to me in private chat)
3 Views