question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update from 1.5.3 to 1.5.4 breaks building of AppDatabase for kotlin native

See original GitHub issue

SQLDelight 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:open
  • Created a year ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
kpgalligancommented, Oct 17, 2022

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).

0reactions
wman1980commented, Oct 18, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kotlin Multiplatform Mobile plugin releases
Release info Release highlights Co... 0.3.4. Released: 12 September, 2022 Kotli... 0.3.3. Released: 9 June, 2022 Updated dependency on Kotlin IDE plugin 1.7.0. Kotli... 0.3.1. Released:...
Read more >
Upgrading Android kotlin version to 1.5.0 throwing error ...
Running with kotlin version '1.4.32' my Android project runs and builds. Trying to upgrade to kotlin '1.5.0' and my build throws:
Read more >
Com.flipperdevices.app (!11685) · Merge requests - GitLab
This way of sharing build logic is recommended by gradle. Also gradle scripts written in kotlin, for kotlin gradle it is needed to...
Read more >
Android Developer Fundamentals Course – Practicals - AWS
1.5.2.1. 1.5.2.2. 1.5.3. 1.5.3.1. 1.5.3.2. 1.5.3.3. 1.5.4. 1.5.4.1 ... Android programming concepts and build a variety of apps, starting with Hello World ...
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found