I have another strange exception This is related ...
# k2-adopters
j
I have another strange exception This is related to this line:
@file:UseSerializers(UuidSerializer::class)
As you can see, again the banasher44 UUID library is again somewhere in the vicinity. I tried to play around with the order of the dependencies in the build.gradle.kts. But could not solve this issue. I suspect that somehow the dependency resolution might have some bugs which (also) lead to this exception. (The code compiles fine with 1.9.20)
Copy code
org.jetbrains.kotlin.fir.pipeline.FirUtilsKt.resolveAndCheckFir(firUtils.kt:72)
        at org.jetbrains.kotlin.cli.metadata.FirMetadataSerializer.analyze(FirMetadataSerializer.kt:109)
        at org.jetbrains.kotlin.cli.metadata.FirMetadataSerializer.analyze(FirMetadataSerializer.kt:49)
        at org.jetbrains.kotlin.cli.metadata.AbstractMetadataSerializer.analyzeAndSerialize(AbstractMetadataSerializer.kt:34)
        at org.jetbrains.kotlin.cli.metadata.K2MetadataCompiler.doExecute(K2MetadataCompiler.kt:134)
[...]
        at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: java.lang.AssertionError: Argument for kotlinx.serialization.UseSerializers does not implement KSerializer or does not provide serializer for concrete type
        at org.jetbrains.kotlinx.serialization.compiler.fir.services.ContextualSerializersProvider$special$$inlined$createCache$2.invoke(FirCachesFactory.kt:82)
        at org.jetbrains.kotlinx.serialization.compiler.fir.services.ContextualSerializersProvider$special$$inlined$createCache$2.invoke(FirCachesFactory.kt:69)
        at org.jetbrains.kotlin.fir.caches.FirThreadUnsafeCache.getValue(FirThreadUnsafeCachesFactory.kt:40)
        at org.jetbrains.kotlinx.serialization.compiler.fir.services.ContextualSerializersProvider.getAdditionalSerializersInScopeForFile(ContextualSerializersProvider.kt:170)
[...]
I suspect that these problems might arise, because I have two different dependencies with the same artifact ID ("uuid"). Could this explain the problems? Maybe somewhere only the artifact id is used as key?
i
Please file an issue and attach a sample project.
j
t
@jschneider hi, could you tell us what exact libraries with the same module name are you using?
j
https://github.com/jschneider/KT-63573 I am not sure why you can't reproduce this problem. It seems to be very straightforward for me...
t
to reproduce we need a repro project 🙂 Thank you - we will take a look into it
j
Yeah, but to be honest it is a major bug in your software. And while I am very willing to help and find bugs, I hoped you would also try to reproduce the issue. I think it is kind of harsh to not only expect bug reports but also require reproducible projects (at least for such important bugs). 😉