Hey all,
When using JaCoCo 0.8.13 with Kotlin 2.2.0 code, I noticed that there are new interface methods that are marked as uncovered compared to Kotlin 2.1.21.
After doing some digging, I saw this called out in the Kotlin 2.2.0 changes:
And with the JvmDefaultMode.NO_COMPATIBILITY option it resolves the issues.
Here's an example:
`interface IMyMoviesViewModelProviderFactory : ViewModelProvider.Factory`
shows missing coverage on the default implementations of the `ViewModelProvider.Factory` interface (see attached image).
Additionally, for the implementation of this `IMyMoviesViewModelProviderFactory` interface, I only override the `public fun <T : ViewModel> create(modelClass: Class<T>)` method. Coverage data shows that the class is missing coverage for the implementations of the other `ViewModelProvider.Factory` related methods, as I assume the default methods generated are being represented here. I've attached a screenshot of this as well.
I admit I am not well versed in the tech stack here, in knowing how JaCoCo and/or Kotlin function - but it does seem like there's a disconnect with Kotlin 2.2.0 and JaCoCo coverage - does this seem like it's an issue on the JaCoCo side that needs to be closed out? Or should I report this on the Kotlin side?
Thanks all, open to hearing what you think!