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

Kotlin 2.0.20 support #1825

Closed
AndreyFetisov opened this issue Aug 23, 2024 · 7 comments · Fixed by #1830
Closed

Kotlin 2.0.20 support #1825

AndreyFetisov opened this issue Aug 23, 2024 · 7 comments · Fixed by #1830

Comments

@AndreyFetisov
Copy link

How frequently does the bug occur?

Always

Description

'2.1.0' fails with the below:

Stacktrace & log output

Task :app:compileDebugKotlin FAILED
e: java.lang.NoSuchMethodError: 'java.lang.RuntimeException org.jetbrains.kotlin.backend.common.CompilationExceptionKt.wrapWithCompilationException(java.lang.Throwable, java.lang.String, org.jetbrains.kotlin.ir.declarations.IrFile, org.jetbrains.kotlin.ir.IrElement)'
	at io.realm.kotlin.compiler.RealmModelLowering.lowerFromModuleFragment(RealmModelLoweringExtension.kt:83)
	at io.realm.kotlin.compiler.RealmModelLoweringExtension.generate(RealmModelLoweringExtension.kt:53)
	at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.applyIrGenerationExtensions(convertToIr.kt:437)
	at org.jetbrains.kotlin.fir.pipeline.Fir2IrPipeline.runActualizationPipeline(convertToIr.kt:246)
	at org.jetbrains.kotlin.fir.pipeline.Fir2IrPipeline.convertToIrAndActualize(convertToIr.kt:130)
	at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.convertToIrAndActualize(convertToIr.kt:99)
	at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.convertToIrAndActualize$default(convertToIr.kt:72)
	at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineKt.convertToIrAndActualizeForJvm(jvmCompilerPipeline.kt:196)
	at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineKt.convertAnalyzedFirToIr(jvmCompilerPipeline.kt:169)
	at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineKt.compileModulesUsingFrontendIrAndLightTree(jvmCompilerPipeline.kt:140)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:148)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:43)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:103)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:49)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:464)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:73)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.doCompile(IncrementalCompilerRunner.kt:506)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:423)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:301)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:129)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:675)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:92)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1660)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
	at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

2.1.0

What Atlas App Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Android

Build environment

Android Studio version: Koala | 2024.1.1 Patch 2
Android Build Tools version: 8.5.2
Gradle version: 8.7

Copy link

sync-by-unito bot commented Aug 23, 2024

➤ PM Bot commented:

Jira ticket: RKOTLIN-1123

@XilinJia
Copy link

Got the same issue, not knowing what exactly going on, reported to Kotlin: https://youtrack.jetbrains.com/issue/KT-70933/Kotlin-2.0.20-gets-NoSuchMethodError#focus=Comments-27-10373975.0-0

@pvdmde
Copy link

pvdmde commented Aug 27, 2024

Title says 2.0.20 but the example goes with 2.1.0.
Here to confirm the issue is with 2.0.20 which is the latest stable version.
Realm should be ready to support this on release day.

@XilinJia
Copy link

Title says 2.0.20 but the example goes with 2.1.0. Here to confirm the issue is with 2.0.20 which is the latest stable version. Realm should be ready to support this on release day.

2.1.0 is the version of Realm Kotlin. 2.0.20 the version of Kotlin. Mixing the two causes this issue.

@mobiletoly
Copy link

Any ETA on having this fixed?

@pvdmde
Copy link

pvdmde commented Sep 3, 2024

There is a PR with the fix waiting for Realm to merge and release a hotfix hopefully very soon.

@nhachicha
Copy link
Collaborator

Thanks for reporting this @AndreyFetisov some updates:
While the PR in #1826 address some aspects Jetbrains introduced more compiler changes:

I'm grouping potential fixes in #1830 if you want to follow the progress

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants