Migrating a KMP project to use androidx room and s...
# multiplatform
j
Migrating a KMP project to use androidx room and seeing following when building iOS app (works fine on Android and Desktop). I've seen some reports of this error online but none yet in context of using room (changes made so far in https://github.com/joreilly/BikeShare/pull/225)
Copy code
ERROR: Rewrite at slice LEXICAL_SCOPE key: ANNOTATION_ENTRY old value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@7bd01c44@2077236292 new value: org.jetbrains.kotlin.resolve.scopes.LexicalScope$Base@334b6715@860579605
<File name: AppDatabase.kt, Physical: true>
<ELEMENT>@Database(entities = [Network::class], version = 1)</ELEMENT>
@ConstructedBy(AppDatabaseCtor::class)
abstract class AppDatabase : RoomDatabase() {
    abstract fun bikeShareDao(): BikeShareDao
}
I'm also using ksp for
kotlin-inject
in this project so that's perhaps a factor
so, turns out that changing order to following works around the issue (had been other way around)
Copy code
dependencies {
    ksp(libs.androidx.room.compiler)
    ksp(libs.kotlininject.compiler)
}
🙈 1
🫠 1
👀 3