Community Builds Broken - looks to be a kotlin compiler bug?

已回答

Hey all,

Is anyone able to build Community using the latest JDK8?  I'm seeing kotlin code generation errors:

 

[java] MAXSTACK = 7
[java] MAXLOCALS = 13
[java]
[java] Cause: Error at instruction 111: Incompatible stack heights
[java] File being compiled and position: (41,32) in /Users/amrk/IdeaProjects/upstream/jetbrains/idea/platform/platform-impl/src/com/intellij/ide/passwordSafe/FilePasswordSafeProvider.kt
[java] PsiElement: @JvmOverloads constructor(keyToValue: Map<String, String>? = null, baseDirectory: Path = Paths.get(PathManager.getConfigPath()), var memoryOnly: Boolean = false)
[java] The root cause was thrown at: MethodAnalyzer.kt:113
[java] at org.jetbrains.kotlin.codegen.FunctionCodegen.endVisit(FunctionCodegen.java:530)
[java] at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:229)
[java] at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generatePrimaryConstructor(ImplementationBodyCodegen.java:935)
[java] at org.jetbrains.kotlin.codegen.ImplementationBodyCodegen.generateConstructors(ImplementationBodyCodegen.java:399)
[java] at org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateBody(ClassBodyCodegen.java:79)
[java] at org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:118)
[java] at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:232)
[java] at org.jetbrains.kotlin.codegen.PackageCodegen.generateClassOrObject(PackageCodegen.java:145)
[java] at org.jetbrains.kotlin.codegen.PackageCodegen.generateFile(PackageCodegen.java:98)
[java] at org.jetbrains.kotlin.codegen.PackageCodegen.generate(PackageCodegen.java:61)
[java] at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.generatePackage(KotlinCodegenFacade.java:99)
[java] at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:77)
[java] at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:44)
[java] at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:415)
[java] at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:143)

 

0

Yes, it's indeed a bug in Kotlin 1.0.2. Follow the instructions from the issue to update to Kotlin 1.0.3 where it's fixed.

0

(The mentioned instruction applies if you're building the Community Edition via Ant. If you're building the project from IDEA, just update the Kotlin plugin to 1.0.3 in Settings | Plugins.)

0

W00t - that sorted it.  Cheers!

0

请先登录再写评论。