Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABI incompatibility with kotlin-compiler-embeddable in 2.0.0-Beta4 #1733

Closed
ZacSweers opened this issue Feb 14, 2024 · 6 comments
Closed

ABI incompatibility with kotlin-compiler-embeddable in 2.0.0-Beta4 #1733

ZacSweers opened this issue Feb 14, 2024 · 6 comments
Assignees
Labels
bug Something isn't working P1 major features or blocking bugs
Milestone

Comments

@ZacSweers
Copy link
Contributor

When testing ksp with github.com/zacsweers/kotlin-compile-testing and the 2.0.0-Beta4 artifacts of kotlin and KSP, I've encountered the following issue when targeting language version 1.9. It looks like there was a breaking ABI change to IncrementalCompilationContext's constructors.

e: java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.incremental.IncrementalCompilationContext.<init>(org.jetbrains.kotlin.incremental.storage.FileToPathConverter, org.jetbrains.kotlin.incremental.storage.FileToPathConverter, boolean, org.jetbrains.kotlin.incremental.CompilationTransaction, org.jetbrains.kotlin.build.report.ICReporter, boolean, org.jetbrains.kotlin.incremental.IncrementalCompilationFeatures, org.jetbrains.kotlin.incremental.FragmentContext, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)'
	at com.google.devtools.ksp.IncrementalContext.<init>(IncrementalContext.kt:76)
	at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$2.invoke(KotlinSymbolProcessingExtension.kt:189)
	at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$2.invoke(KotlinSymbolProcessingExtension.kt:186)
	at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.handleException(KotlinSymbolProcessingExtension.kt:410)
	at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.doAnalysis(KotlinSymbolProcessingExtension.kt:186)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:112)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:75)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:383)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:374)
	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:374)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.runFrontendAndGenerateIrUsingClassicFrontend(KotlinToJVMBytecodeCompiler.kt:205)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:116)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:58)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:176)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:50)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)

@neetopia
Copy link
Collaborator

Is this only happening after 2.0.0-Beta4? When I tested with my KSP playground everything seems to be working fine.

@ZacSweers
Copy link
Contributor Author

Yes seems to just be beta4. Beta3 was fine

@ting-yuan ting-yuan self-assigned this Feb 17, 2024
@ting-yuan ting-yuan added bug Something isn't working P1 major features or blocking bugs labels Feb 17, 2024
@ting-yuan ting-yuan added this to the 2.0 milestone Feb 17, 2024
@ting-yuan
Copy link
Collaborator

Looks like there are more and more people hitting this. Let's fix it.

@neetopia
Copy link
Collaborator

Can you try to run a clean build to see if this issue resolves?

@ZacSweers
Copy link
Contributor Author

This is with compile testing so the build is happening in-memory during the test, they're always clean builds :)

@ting-yuan
Copy link
Collaborator

Fixed in #1748 after a few other recent PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 major features or blocking bugs
Projects
None yet
Development

No branches or pull requests

3 participants