You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiler plugin uses deprecated api that is incompatible with k2.
I assume that the only required fix is changing argument of IrPluginContext.referenceClass calls from FqName to ClassId, but it's possible that other functions marked with @FirIncompatiblePluginAPI are used somewhere else.
Stacktrace & log output
Details: Internal error in file lowering: java.lang.IllegalStateException: This API is not supported for K2
at org.jetbrains.kotlin.fir.backend.Fir2IrPluginContext.referenceClass(Fir2IrPluginContext.kt:154)
at io.realm.kotlin.compiler.IrUtilsKt.lookupClassOrThrow(IrUtils.kt:244)
at io.realm.kotlin.compiler.RealmModelLowering.lower(RealmModelLoweringExtension.kt:100)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitClass(Lower.kt:104)
at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitClass(IrElementVisitorVoid.kt:111)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitClass(Lower.kt:95)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitClass(Lower.kt:95)
at org.jetbrains.kotlin.ir.declarations.IrClass.accept(IrClass.kt:73)
at org.jetbrains.kotlin.ir.declarations.IrFile.acceptChildren(IrFile.kt:37)
at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptChildrenVoid(IrVisitors.kt:15)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitElement(Lower.kt:99)
at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitPackageFragment(IrElementVisitorVoid.kt:190)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitPackageFragment(Lower.kt:95)
at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:200)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitFile(Lower.kt:95)
at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:198)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitFile(Lower.kt:95)
at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitFile(Lower.kt:95)
at org.jetbrains.kotlin.ir.declarations.IrFile.accept(IrFile.kt:31)
at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptVoid(IrVisitors.kt:11)
at org.jetbrains.kotlin.backend.common.LowerKt.runOnFilePostfix(Lower.kt:92)
at io.realm.kotlin.compiler.RealmModelLowering.lower(RealmModelLoweringExtension.kt:59)
at org.jetbrains.kotlin.backend.common.LowerKt.lower(Lower.kt:76)
at io.realm.kotlin.compiler.RealmModelLoweringExtension.generate(RealmModelLoweringExtension.kt:48)
at org.jetbrains.kotlin.fir.backend.Fir2IrConverter.runSourcesConversion(Fir2IrConverter.kt:106)
at org.jetbrains.kotlin.fir.backend.Fir2IrConverter.access$runSourcesConversion(Fir2IrConverter.kt:43)
at org.jetbrains.kotlin.fir.backend.Fir2IrConverter$Companion.createModuleFragmentWithSignaturesIfNeeded(Fir2IrConverter.kt:499)
at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.convertToIr(convertToIr.kt:159)
at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.convertToIrAndActualize(convertToIr.kt:107)
at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.convertToIrAndActualize$default(convertToIr.kt:64)
at org.jetbrains.kotlin.fir.pipeline.ConvertToIrKt.convertToIrAndActualizeForJvm(convertToIr.kt:52)
at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.CompilerPipelineKt.convertAnalyzedFirToIr(compilerPipeline.kt:241)
at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.CompilerPipelineKt.compileModulesUsingFrontendIrAndLightTree(compilerPipeline.kt:143)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:149)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:53)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:100)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:46)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:460)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:62)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.doCompile(IncrementalCompilerRunner.kt:476)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:399)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:280)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:124)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:636)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:101)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1598)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalStateException: This API is not supported for K2
... 64 more
Can you reproduce the bug?
Always
Reproduction Steps
Use kotlin 1.9.0 and enable k2 using kotlin.experimental.tryK2=true in gradle.properties
Try to compile desktop (jvm) or android project with realm compiler plugin and some classes extending RealmObject
Version
1.10.2
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
jvm (desktop), android
Build environment
Android Studio version: IntelliJ IDEA 2023.2 (Community Edition)
Gradle version: 8.2.1
The text was updated successfully, but these errors were encountered:
How frequently does the bug occur?
Always
Description
Compiler plugin uses deprecated api that is incompatible with k2.
I assume that the only required fix is changing argument of
IrPluginContext.referenceClass
calls fromFqName
toClassId
, but it's possible that other functions marked with@FirIncompatiblePluginAPI
are used somewhere else.Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
Use kotlin 1.9.0 and enable k2 using
kotlin.experimental.tryK2=true
in gradle.propertiesTry to compile desktop (jvm) or android project with realm compiler plugin and some classes extending RealmObject
Version
1.10.2
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
jvm (desktop), android
Build environment
Android Studio version: IntelliJ IDEA 2023.2 (Community Edition)
Gradle version: 8.2.1
The text was updated successfully, but these errors were encountered: