I just moved from Kotlin 1.8.10 to 1.9.10 and saw ...
# code-coverage
p
I just moved from Kotlin 1.8.10 to 1.9.10 and saw that a Kover generated report had dropped from 100% to 78.2...% much to my chagrin. Searching turned up nothing of note. The offending code is this data class shown below. I'm looking for insight or suggestions that will help me avoid going back to 1.8.10, but if this could be a bug, I will report it to the Kover folks. Thanks in advance.
fwiw, I backed off to 1.8.20 and got a similar degraded report but when I backed off to 1.8.10 the report was back to 100%. @Sergey Shanshin does this look like a Kover issue to you, or do you test with the latest Kotlin versions, as I would guess you do, such that you know it is my problem to solve. I'm guessing it is something in my code or project configuration. 😞
I am now nearly convinced this is either a Kover or Kotlin Serialization issue, e.g. not mine. 🙂 So I created a very simple project with two modules, one for 1.8.10 and one for 1.9.10 that illustrates the bad behavior for a serializable data class with a single property: a list of strings. The project is up at Gitlab: https://gitlab.com/pmr/kover-serialization-issue1 and I will file a Kover issue about this momentarily.
I just had the presence of mind to run the 1.9.10 variant without the @Serialization annotation and the code runs as expected, i.e. no failure from Kover. Would that I could definitively say that therefore this is a Kotlin serialization issue. Might be that Kover is not doing something it ought to be doing when serialization is at play. I suspect my best play here is to let the project leads slug it out. 🙂
k
This issue appears to be related: https://github.com/Kotlin/kotlinx-kover/issues/130