I'm trying to publish a lib that use Room 2.7.1 to...
# ios
r
I'm trying to publish a lib that use Room 2.7.1 to maven central, but will using
publishAndReleaseToMavenCentral
on github actions. But I get an error for iOS:
Copy code
> Task :xxx:compileKotlinIosSimulatorArm64
e: file:///Users/runner/work/xxx/xxx/xxx/build/generated/ksp/metadata/commonMain/kotlin/io/dot/lorraine/db/XXXConstructor.kt:5:24 'actual object XXXConstructor : RoomDatabaseConstructor<XXXDB>' has no corresponding expected declaration
e: file:///Users/runner/work/xxx/xxx/xxx/build/generated/ksp/metadata/commonMain/kotlin/io/dot/xxx/db/XXXConstructor.kt:5:24 XXXConstructor: expect and corresponding actual are declared in the same module.
> Task :xxx:compileCommonMainKotlinMetadata FAILED
e: file:///Users/runner/work/xxx/xxx/xxx/build/generated/ksp/metadata/commonMain/kotlin/io/dot/xxx/db/XXXConstructor.kt:6:23 'actual fun initialize(): XXXDB' has no corresponding expected declaration
e: file:///Users/runner/work/xxx/xxx/xx/src/commonMain/kotlin/io/dot/xxx/db/XXXConstructor.kt:6:24 XXXConstructor: expect and corresponding actual are declared in the same module.
Any idea how to fix it ?
p
It seems you have a compilation issue. Fix it first.
r
I don't have it when I run the iOS App. It only appear with the task
publishAndReleaseToMavenCentral
p
Oh ok, there is an error saying initialize() doesn't have the actual implementation. And other saying the expect/actual are in the same target. But if you say they compile just fine then I can't infer what the the problem is
r
I followed Room KMP, so the actual implementation is generated by room in the generated source. That is the problem, I may have to open a ticket on google side.
💡 1
p
Interesting, makes sense. Perhaps the code generator task is not running in the appropriate time frame when publishing.