Hi, I'm trying to update my multiplatform DB proje...
# compiler
x
Hi, I'm trying to update my multiplatform DB project to Kotlin 2.4.20. In compiler plugin, I come to these issues regarding @K1Deprecation:
fun DeclarationDescriptor.findPsi(): PsiElement? {...}
interface SyntheticResolveExtension { ... }
any guidance on how to migrate? Basically, I have a function:
inline fun ClassDescriptor.hasInterfacePsi(interfaces: Set<String>): Boolean {
return this.findPsi()?.hasInterface(interfaces) ?: false
}
2 classes deriving from SyntheticResolveExtension:
class RealmModelSyntheticCompanionExtension : SyntheticResolveExtension
class RealmModelSyntheticMethodsExtension : SyntheticResolveExtension
So guess I have migrate away from these?
the project source is:
<https://github.com/XilinJia/krdb>
✅ 1
d
SyntheticResolveExtension
is part of K1 compiler which is not supported anymore. You should drop these extensions from your plugin completely.
As I can see you already have K2 extensions in your plugin, so most likely no other migrations are needed.
x
thank you. how about
findPsi()
d
It's also deprecated and gonna be removed. K2 doesn't use neither descriptors or psi. So you should delete their usages too.
x
Thanks very much, @dmitriy.novozhilov. that appears to work.
👍 1