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.

Add linuxX64 Kotlin Multiplatform target

See original GitHub issue

Currently, SQLDelight supports only Apple and Windows as native platform targets. If you want to use it in a project that also targets linux, then you can’t even use it for other targets as the gradle plugin seems to attempt to math the native variant:

Execution failed for task ':cinteropSodiumLinux'.
> Could not resolve all files for configuration ':linuxSodiumCInterop'.
   > Could not resolve com.squareup.sqldelight:runtime:1.4.0.
     Required by:
         project :
      > Unable to find a matching variant of com.squareup.sqldelight:runtime:1.4.0:
          - Variant 'iosArm32-api' capability com.squareup.sqldelight:runtime:1.4.0:
              - Incompatible attribute:
                  - Required org.jetbrains.kotlin.native.target 'linux_x64' and found incompatible value 'ios_arm32'.
              - Other attributes:
                  - Found org.gradle.status 'release' but wasn't required.
                  - Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
                  - Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
          - Variant 'iosArm64-api' capability com.squareup.sqldelight:runtime:1.4.0:
              - Incompatible attribute:
                  - Required org.jetbrains.kotlin.native.target 'linux_x64' and found incompatible value 'ios_arm64'.
              - Other attributes:
                  - Found org.gradle.status 'release' but wasn't required.
                  - Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
                  - Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.

and so on for all supported native variants.

The best fix would be to add the linuxX64 variant as well which probably hasn’t happened because all developers are on Mac!?

Unfortunately, it seems that touchlab’s SQLiter needs to add support first.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:25 (14 by maintainers)

github_iconTop GitHub Comments

5reactions
chippmanncommented, Feb 26, 2021

I opened a PR on the SQLiter repo which adds support for linux targets. Once that one (or something similar) is merged it actually should be pretty straight forward to add linux as a target here (the changes i needed to make on my local build were pretty minimal but maybe I don’t see the full picture). Depending on the outcome of said PR i could also file a PR here once it’s merged. It depends on whether this is wanted with the current state of SQLiter (refering to the above comment of @kpgalligan) and you would welcome such a PR regardless of the state of SQLiter.

2reactions
JakeWhartoncommented, Feb 27, 2021

Please send a PR when the dependency is ready. We won’t be able to have a passing build until all our dependencies are updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up targets for Kotlin Multiplatform
You can add targets when creating a project with the Project Wizard. If you need to add a target later, you can do...
Read more >
Introduction to Multiplatform Programming in Kotlin - Baeldung
In this tutorial, we'll understand multiplatform programming in Kotlin. We'll develop a simple application that will target multiple ...
Read more >
Creating a Kotlin Multiplatform lib targeting all native targets ...
I am trying to create a Kotlin Multiplatform library that targets all native targets. Currently I can create a library targeting a specific ......
Read more >
Optimising CI build times of a Kotlin Multiplatform project
Kotlin Multiplatform supports different targets (platforms), which require ... First thing we need is to add another command line argument: ...
Read more >
Adding an Android Target to a Kotlin Multiplatform Project
This is the third post in a series on Kotlin Multiplatform. In my second post, I walked you through the steps to build...
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