hey :slightly_smiling_face: when upgrading my mini...
# multiplatform
c
hey 🙂 when upgrading my minimalistic kmp project from kotlin 1.9.21 to 2.0.21 i am getting following error:
Copy code
> Task :kotlinNodeJsSetup
> Task :kotlinYarnSetup
e: KLIB resolver: Could not find "/home/runner/work/kotlin-library-template/kotlin-library-template/core/build/kotlinTransformedMetadataLibraries/commonMain/org.jetbrains.kotlin-kotlin-stdlib-2.1.0-commonMain-ITmP6A.klib" in [/home/runner/.local/share/kotlin/daemon]
> Task :core:compileCommonMainKotlinMetadata FAILED
w: KLIB resolver: Skipping '/home/runner/work/kotlin-library-template/kotlin-library-template/core/build/kotlinTransformedMetadataLibraries/commonMain/org.jetbrains.kotlin-kotlin-stdlib-2.1.0-commonMain-ITmP6A.klib'. Incompatible ABI version. The current default is '1.8.0', found '1.201.0'. The library was produced by '2.1.0-dev-7621' compiler.
(node:2062) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
> Task :kotlinNpmInstall
(Use `node --trace-deprecation ...` to show where the warning was created)
warning workspace-aggregator-5c97f0a7-148f-42a7-8b81-b5d1d6b02534 > kotlin-library-template-test > mocha > glob@8.1.0: Glob versions prior to v9 are no longer supported
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/Example.kt:3:1 Unresolved reference '<init>'.
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/Example.kt:4:17 Missing stdlib class.
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/Example.kt:4:23 Unresolved reference 'also'.
> Task :core:compileKotlinJs FAILED
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/Example.kt:4:28 Unresolved reference 'info'.
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/Example.kt:4:37 Unresolved reference 'info'.
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/Example.kt:4:45 Missing stdlib class.
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/Example.kt:4:57 Unresolved reference 'it'.
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/LoggerUtils.kt:6:43 Unresolved reference 'simpleName'.
e: file:///home/runner/work/kotlin-library-template/kotlin-library-template/core/src/commonMain/kotlin/codes/draeger/example/core/LoggerUtils.kt:6:57 Missing stdlib class.
> Task :core:compileKotlinJvm
warning Ignored scripts due to flag.
> Task :kotlinNpmInstall
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':core:compileCommonMainKotlinMetadata'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
link to kotlin 2 build: https://github.com/christian-draeger/kotlin-library-template/actions/runs/12604591607/job/35131809284 link to project: https://github.com/christian-draeger/kotlin-library-template what am i doing wrong?
🧵 3
t
Have you solved your issue?
c
unfortunately not Repo is still same version as a reproducer. Just bumped kotlin version in „kotlin2“ branch and build is broken. Beeing new to kmp, I have no idea why :/
t
The library was produced by '2.1.0-dev-7621' compiler.
- this is suspicious as
-dev-
is Kotlin development version. Check your dependencies that they are all compiled against stable Kotlin release
c
There are not many dependencies and no RC or prerelease versions in use https://github.com/christian-draeger/kotlin-library-template/blob/kotlin2/gradle/libs.versions.toml Only things changed: kotlin.multiplatform Plugin 1.9.24 -> 2.0 kotlinx-serialization-json 1.7.2 -> 1.7.3 kotlinx-coroutines-core 1.8.1 -> 1.10.1 I am currently in the car and can not check transitive dependencies. Still a bit surprising that it worked with kotlin 1.9
t
Kotlin 2.0 pre-release versions has poisoned dependencies built with it to avoid future problems once it is stabilized
c
I will try to downgrade everything but kotlin version when i am back home
downgrading coroutines from latest (1.10.1) to 1.9.0 did the trick. thx for helping
👍 1
236 Views