joffrey-bion / krossbow

A Kotlin multiplatform coroutine-based STOMP client over websockets, with built-in conversions.
MIT License
189 stars 14 forks source link

Enable binary compatibility mode for default methods in interfaces #496

Closed joffrey-bion closed 4 months ago

joffrey-bion commented 4 months ago

Currently all Krossbow interfaces still use the old scheme generating a DefaultImpls class with default implementations as static methods. This is not ideal, and we should eventually move to real JVM default methods (since we target JDK8+).

However, this change is binary incompatible, so we should keep generating the old DefaultImpls classes. This is what the -Xjvm-default=all-compatibility mode is for.

https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces