-
Notifications
You must be signed in to change notification settings - Fork 434
Script >64KB leads to Could not open cache directory: java.lang.IllegalArgumentException #1305
Comments
Could you please report an issue at https://kotl.in/issue and link back to it here? |
I created an issue at https://kotl.in/issue |
Kotlin compiler bug that is causing the problem: https://youtrack.jetbrains.com/issue/KT-13213 |
Thank you for the report @bhanutejags. The stacktraces are very similar but the issue reported here is with the Gradle Kotlin DSL, not the Kotlin compiler. Caused by: java.lang.IllegalArgumentException
at org.jetbrains.org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:213)
at org.jetbrains.org.objectweb.asm.ClassWriter.newUTF8(ClassWriter.java:1141)
at org.jetbrains.org.objectweb.asm.ClassWriter.newStringishItem(ClassWriter.java:1163)
at org.jetbrains.org.objectweb.asm.ClassWriter.newConstItem(ClassWriter.java:1091)
at org.jetbrains.org.objectweb.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1165)
at org.gradle.kotlin.dsl.support.bytecode.AsmExtensionsKt.LDC(AsmExtensions.kt:163)
at org.gradle.kotlin.dsl.execution.ResidualProgramCompiler.emitCompileSecondStageScript(ResidualProgramCompiler.kt:357) vs. Caused by: java.lang.IllegalArgumentException
at org.jetbrains.org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:213)
at org.jetbrains.org.objectweb.asm.ClassWriter.newUTF8(ClassWriter.java:1092)
at org.jetbrains.org.objectweb.asm.ClassWriter.newString(ClassWriter.java:1525)
at org.jetbrains.org.objectweb.asm.ClassWriter.newConstItem(ClassWriter.java:1042)
at org.jetbrains.org.objectweb.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1126)
at org.jetbrains.org.objectweb.asm.MethodVisitor.visitLdcInsn(MethodVisitor.java:595)
at org.jetbrains.org.objectweb.asm.tree.LdcInsnNode.accept(LdcInsnNode.java:71)
at org.jetbrains.org.objectweb.asm.tree.InsnList.accept(InsnList.java:162)
at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:817)
at org.jetbrains.kotlin.codegen.optimization.OptimizationMethodVisitor.visitEnd(OptimizationMethodVisitor.java:90) |
By storing large scripts as a resource instead of a script constant in the emitted bytecode. Resolves #1305
Closing as fixed in 1.1.2. |
still occurring:
|
@pun-ky this isn't related to this issue, the error message is very different. Please open new issues with the Gradle Kotlin DSL on https://github.com/gradle/gradle/issues |
sure |
Project Configuration fails when the build.gradle.kts is large.
Expected Behavior
Being able to write an arbitrarily large build script.
Current Behavior
When there are more than approximately 65K characters in my build.gradle.kts script, project configuration fails. This doesn't appear if I remove a couple of Gradle tasks to decrease the number of characters.
Context
Steps to Reproduce (for bugs)
gradlew.bat
, will give throwjava.lang.IllegalArgumentException
.Your Environment
gradle --version
About
menu you can copy version information)The text was updated successfully, but these errors were encountered: