What's the best way to track down the cause of: `...
# gradle
e
What's the best way to track down the cause of:
Copy code
> Task :integration-tests:ksp:kspTestKotlinWasmJs FAILED
w: duplicate library name: kotlin
e: warnings found and -Werror specified
Ah, you commented on those so probably not what you were looking for, sorry 😅
e
It might be related to KT-62653 because there is some non-standard source set usage in this project so I'll look into that
Looks unrelated 😓
j
I think KT-51110 is the root tracking issue. "kotlin" being the library does seem odd though. Is that the standard lib? You could print your dependency tree with
./gradlew :integration-tests:ksp:dependencies > dependencies.txt
and search the output dependencies.txt for where different versions are stemming from.
e
The only thing that looks out of place there is
Copy code
|    +--- com.google.devtools.ksp:symbol-processing-api:1.9.21-1.0.15
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0
|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.0 -> 1.9.21 (*)
I wouldn't expect ksp
1.9.21-1.0.15
to be depending on
stdlib:1.9.0
j
e
Even still, it looks like it's correctly getting switched to use 1.9.21
j
The way I understand this bug, it doesn't matter that transitive dependencies should be getting updated to the newer version declared by the project. For some reason Kotlin/JS and Kotlin/Native spit out that warning anyway.
e
In this case it's only happening for wasmJs. js works fine
j
I guess Kotlin/Wasm is effected too. I see the warning myself for kotlinx-serialization in native targets: > w: duplicate library name: org.jetbrains.kotlinx:kotlinx-serialization-core because kotlinx-datetime declares 1.5.1 and I declare 1.6.1 in my tests. It might be the indirect relationship where, 1.5.1 is a transitive main dependency and 1.6.1 is introduced in tests. I also see this in the dependencies output:
Copy code
+--- org.jetbrains.kotlinx:kotlinx-datetime:0.4.1
|    \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.5.1 -> 1.6.1
e
The underlying issue was relying on a library that was using the
wasm
target and not the
wasmJs
target