cashapp / sqldelight

SQLDelight - Generates typesafe Kotlin APIs from SQL
https://cashapp.github.io/sqldelight/
Apache License 2.0
6.14k stars 513 forks source link

SQLDelight not compatible with kotlinx.* #1178

Closed benasher44 closed 5 years ago

benasher44 commented 5 years ago

kotlinx.io and kotlinx.serialization are still using version 0.3 of gradle metadata (just 2 examples of such libraries, but there are more). These libraries bring some really important/useful functionality when developing for multiplatform. Because SQLDelight is using gradle metadata 0.4, you can't use these other dependencies if you want to use SQLDelight (or the reverse). You get this error (in the "i want to use kotlinx.serialization and already have SQLDelight") scenario:

> Could not resolve org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:0.9.1.
  Required by:
      project :
   > Could not resolve org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:0.9.1.
      > Could not parse module metadata https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlinx/kotlinx-serialization-runtime-native/0.9.1/kotlinx-serialization-runtime-native-0.9.1.module
         > Unsupported format version '0.3' specified in module metadata. This version of Gradle supports format version 0.4 only.

It might be possible to just disable gradle metadata, but IIRC that can cause weird things to happen too (new to this ecosystem so haven't pinned down exactly what yet)?

Would it be possible to either: a) release parallel versions that use 0.3 metadata or b) go back to 0.3 (until the rest of the ecosystem evolves)? SQLDelight and kotlinx.serialization share similar goals (shared model/serialization code across platforms); it'd be great to figure out a solution here (open to anything really).

Thanks for your help/consideration!

JakeWharton commented 5 years ago

Yeah it's been pretty frustrating that JetBrains won't update past Gradle 4.7. Alec put some details in #1163 about it.

benasher44 commented 5 years ago

Do you know if there are issues with transitive dependencies that we should be wary of, when we switch to no-gradle-metadata?

JakeWharton commented 5 years ago

I use serialization and coroutines without issue using manual dependencies.

On Fri, Jan 18, 2019, 6:26 PM Ben Asher <notifications@github.com wrote:

Do you know if there are issues with transitive dependencies that we should be wary of, when we switch to no-gradle-metadata?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/square/sqldelight/issues/1178#issuecomment-455719919, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEWkcELKOfmGL8xavianHQzGsU8Hfks5vElgygaJpZM4aIzM6 .

benasher44 commented 5 years ago

Got it. Thanks!