K
Kord3mo ago
vyfor

Compilation error with KSP

Hello, I'm facing this particular error when compiling my project and its ksp subproject:
> Task :kspKotlinMingwX64 FAILED
e: Could not find "org.jetbrains.kotlinx:kotlinx-datetime-cinterop-date" in [C:\Users\1\Desktop\kotlin\Cordex, D:\.konan\klib, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\common, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\platform\mingw_x64]
> Task :kspKotlinMingwX64 FAILED
e: Could not find "org.jetbrains.kotlinx:kotlinx-datetime-cinterop-date" in [C:\Users\1\Desktop\kotlin\Cordex, D:\.konan\klib, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\common, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\platform\mingw_x64]
The root project has only two main dependencies:
dependencies {
api("dev.kord:kord-core:feature-native-SNAPSHOT")
api("dev.kord.x:emoji:feature-mpp-SNAPSHOT")
}
dependencies {
api("dev.kord:kord-core:feature-native-SNAPSHOT")
api("dev.kord.x:emoji:feature-mpp-SNAPSHOT")
}
7 Replies
vyfor
vyfor3mo ago
Output of gradle dependencyInsight --dependency kotlinx-datetime --configuration commonMainCompileOnlyDependenciesMetadata:
org.jetbrains.kotlinx:kotlinx-datetime:{strictly 0.6.0} -> 0.6.0
\--- commonMainCompileOnlyDependenciesMetadata

org.jetbrains.kotlinx:kotlinx-datetime:0.6.0
\--- dev.kord:kord-common:feature-native-SNAPSHOT:20240702.201033-23
+--- commonMainCompileOnlyDependenciesMetadata (requested dev.kord:kord-common:{strictly feature-native-SNAPSHOT})
+--- dev.kord:kord-core:feature-native-SNAPSHOT:20240702.201033-23
| +--- commonMainCompileOnlyDependenciesMetadata
| \--- dev.kord.x:emoji:feature-mpp-SNAPSHOT:20240301.200628-2
| \--- commonMainCompileOnlyDependenciesMetadata
+--- dev.kord:kord-rest:feature-native-SNAPSHOT:20240702.201033-23
| +--- commonMainCompileOnlyDependenciesMetadata (requested dev.kord:kord-rest:{strictly feature-native-SNAPSHOT})
| \--- dev.kord:kord-core:feature-native-SNAPSHOT:20240702.201033-23 (*)
\--- dev.kord:kord-gateway:feature-native-SNAPSHOT:20240702.201033-23
+--- commonMainCompileOnlyDependenciesMetadata (requested dev.kord:kord-gateway:{strictly feature-native-SNAPSHOT})
\--- dev.kord:kord-core:feature-native-SNAPSHOT:20240702.201033-23 (*)
org.jetbrains.kotlinx:kotlinx-datetime:{strictly 0.6.0} -> 0.6.0
\--- commonMainCompileOnlyDependenciesMetadata

org.jetbrains.kotlinx:kotlinx-datetime:0.6.0
\--- dev.kord:kord-common:feature-native-SNAPSHOT:20240702.201033-23
+--- commonMainCompileOnlyDependenciesMetadata (requested dev.kord:kord-common:{strictly feature-native-SNAPSHOT})
+--- dev.kord:kord-core:feature-native-SNAPSHOT:20240702.201033-23
| +--- commonMainCompileOnlyDependenciesMetadata
| \--- dev.kord.x:emoji:feature-mpp-SNAPSHOT:20240301.200628-2
| \--- commonMainCompileOnlyDependenciesMetadata
+--- dev.kord:kord-rest:feature-native-SNAPSHOT:20240702.201033-23
| +--- commonMainCompileOnlyDependenciesMetadata (requested dev.kord:kord-rest:{strictly feature-native-SNAPSHOT})
| \--- dev.kord:kord-core:feature-native-SNAPSHOT:20240702.201033-23 (*)
\--- dev.kord:kord-gateway:feature-native-SNAPSHOT:20240702.201033-23
+--- commonMainCompileOnlyDependenciesMetadata (requested dev.kord:kord-gateway:{strictly feature-native-SNAPSHOT})
\--- dev.kord:kord-core:feature-native-SNAPSHOT:20240702.201033-23 (*)
Output of gradle ksp:dependencyInsight --dependency kotlinx-datetime --configuration commonMainCompileOnlyDependenciesMetadata (subproject):
No dependencies matching given input were found
No dependencies matching given input were found
Downgrading kotlinx-datetime to 0.5.0 & 0.4.0 (adding a dependency on datetime and excluding it from both of the kord snapshots) does not seem to be of any help either. The build file: https://pastebin.com/YWfQGTX7 Can someone please help me? I'm not sure about where to begin debugging the root of the issue Upgrading to Kotlin 2.0 does not help.
> Task :kspKotlinMingwX64 FAILED
e: KLIB resolver: Could not find "org.jetbrains.kotlinx:kotlinx-datetime-cinterop-date" in [C:\Users\1\Desktop\kotlin\Cordex, D:\.konan\klib, D:\.konan\kotlin-native-prebuilt-windows-x86_64-2.0.0\klib\common, D:\.konan\kotlin-native-prebuil
t-windows-x86_64-2.0.0\klib\platform\mingw_x64]
> Task :kspKotlinMingwX64 FAILED
e: KLIB resolver: Could not find "org.jetbrains.kotlinx:kotlinx-datetime-cinterop-date" in [C:\Users\1\Desktop\kotlin\Cordex, D:\.konan\klib, D:\.konan\kotlin-native-prebuilt-windows-x86_64-2.0.0\klib\common, D:\.konan\kotlin-native-prebuil
t-windows-x86_64-2.0.0\klib\platform\mingw_x64]
Excluding the ksp subproject from compilation results in the root project failing with the same error. Any ideas?
LustigerLurch
LustigerLurch3mo ago
i'm sorry but i don't have any good idea where to start with that
vyfor
vyfor3mo ago
hm, there haven't been any changes to the native snapshots recently right?
LustigerLurch
LustigerLurch3mo ago
see commits on the feature/native branch
vyfor
vyfor3mo ago
here's the minimal reproducible project: https://github.com/vyfor/kord-test CI fails on both Linux and Windows with the same error, so it's likely an issue with Kord itself. i've found the issue, kord builds just fine whereas kordx.emoji fails with the error above. kordx.emoji seems to rely on datetime indirectly through kord. i think the latest build of kordx.emoji(mpp) might not be using the most recent snapshot of kord(native), i could be wrong.
vyfor
vyfor3mo ago
GitHub
Build fails on Kotlin/Native · Issue #25 · kordlib/kordx.emoji
Adding dev.kord.x:emoji:feature-mpp-SNAPSHOT as a dependency leads to a failure during build, as seen here with the following error: e: KLIB resolver: Could not find "org.jetbrains.kotlinx:kot...
vyfor
vyfor3mo ago
No description
Want results from more Discord servers?
Add your server