Update from 1.5.3 to 1.5.4 breaks building of AppDatabase for kotlin native
See original GitHub issueSQLDelight Version
1.5.4
Operating System
macOS Montgomery 12.6
Gradle Version
7.3.0
Kotlin Version
1.7.20
Dialect
SQLite
AGP Version
No response
Describe the Bug
Hi, I am using KMM (Kotlin Multiplatform Mobile) to build iOS and Android Apps with a shared code base.
Currently I have updated all multiplatform library dependencies like kTor, serialisationX, dateTimeX and sqldelight to the latest versions.
Unfortunately it seems that updating from sqldelight 1.5.3 to 1.5.4 breaks building my AppDatabase. All other multiplatform libraries could be updated.
For my shared code I defined the AppDatabase as followed:
sqldelight {
database("AppDatabase") {
packageName = "foo.bar.cache"
}
}
After I have changed the sqldelight version to 1.5.4 it seems that the AppDatabase is not generated anymore for my iOS target and I get the following error while building:
Unresolved reference: AppDatabase
If I switch back to 1.5.3 everything is working again. Is that a known issue?
Thanks Jan
Stacktrace
No response
Gradle Build Script
No response
Issue Analytics
- State:
- Created a year ago
- Comments:12
Top GitHub Comments
I am running 1.5.4 with Kotlin 1.7.20 and not running into issues, at least not in the project I’m testing it in. generally speaking, you don’t need 1.7.20-specific library dependencies. The binary compatibility tends to go back much longer these days. In earlier versions of Kotlin, each Kotlin update required re-releasing everything, but it’s been quite a while since that was an issue.
I’m also not sure that these two issues above have the same cause. They might, but I’d need to see more detail in the error.
If there are any public examples of a repro that will help considerably. “:shared:compileAppleMainKotlinMetadata” also may point to more of a config issue, “Metadata” being the key indicator here.
Looking at the initial issue, if it’s a build issue and the error is
Unresolved reference: AppDatabase
, I’m not sure that has anything to do with Sqliter (maybe, but seems like a different stage of build than Sqliter would be involved in).Sorry, forgot to revert 1.7.10 back to 1.7.20.
I have attached another example without cocoapods and kotlin 1.7.20 and it is still working for me.
SqlDelightNoCocoapods.zip