Hi there! I'm trying to update to 0.6.0 from 0.5.0...
# kotlinx-datetime
i
Hi there! I'm trying to update to 0.6.0 from 0.5.0, but I'm facing this error in GitHub Actions (using ubuntu-latest):
e: Could not find "org.jetbrains.kotlinx:kotlinx-datetime-cinterop-date" in [/home/runner/work/transit-backend/transit-backend, /home/runner/.konan/klib, /home/runner/.konan/kotlin-native-prebuilt-linux-x86_64-1.9.23/klib/common, /home/runner/.konan/kotlin-native-prebuilt-linux-x86_64-1.9.23/klib/platform/linux_x64]
However, if I target
macosArm64()
in my MacBook Pro with M2 Pro and macOS Sonoma 14.4.1 it works just fine. Anyone has a clue? Thank you :)
d
Short answer: no, no idea, besides the generally applicable advice: •
gradle clean
• remove all sorts of caches (
~/.gradle
,
~/.m2
,
~/.cache
,
~/.local/share/gradle
) Everything I know about this: In 0.5.0,
kotlinx-datetime
relied on C++ code internally for Linux and Windows implementations, using the
cinterop
mechanism of Kotlin/Native, and that cinterop configuration was called
date
, so this must be what's being referenced. In 0.6.0, for Linux, there are no more pieces of C++, everything's pure Kotlin, so
cinterop
isn't used and isn't referenced anywhere. Only a tiny piece of Windows code still uses
cinterop
, but with a different configuration name. So, nothing in the library should reference
kotlinx-datetime-cinterop-date
. Something in your configuration does reference it (or we wouldn't see the string), but I have no idea what could still know about it. The simplest guess is that the incremental compilation is faulty and didn't notice that the datetime library no longer needs
cinterop
. If you manage to consistently reproduce this, by the way, it would be useful if you gave us the project where this happens. There is clearly a problem somewhere, quite likely in our tooling.
i
Thank you @Dmitry Khalanskiy [JB], I'll try to clean more cache dirs to see if it helps. If not, I'll set up a demo project and keep looking. Thanks 😄
👍 1
d
Looks like the issue is that, if some library on which you depend itself depends on
kotlinx-datetime
older than 0.6.0-RC, then using 0.6.0 from your project causes this. Nothing to do with caches or incremental compilation.