Share
Embed
Build for the Future, Stay Compatible with the Past
Heapcon 2026 talk, binary compatibility, ABI, tooling, Kotlin
Nebojša Vukšić
November 13, 2026
Transcript
122 slides
-
Build for the Future, Stay Compatible with the Past Nebojša
Vukšić, JetBrains Heapcon 2026 -
01 / THE PROMISE We Build for the Future. SOLID
Clean Architecture DDD Modularity Design Patterns -
02 / THE INCIDENT We Forgot About Yesterday Software That
Was Still Running! -
03 / THE CONTEXT The IDE Ecosystem IDE Platform API
compiled against public API Plugins built on CLIENT runs inside JetBrains IDEs -
03 / THE CONTEXT The IDE Ecosystem IDE Platform PUBLIC
APIS API Editor PSI Project model VFS Swing UI Jewel / Compose UI compiled against public API Plugins built on CLIENT runs inside JetBrains IDEs -
03 / THE CONTEXT The IDE Ecosystem IDE Platform PUBLIC
APIS API Editor PSI Project model VFS Swing UI Jewel / Compose UI compiled against public API Plugins built on CLIENT runs inside JetBrains IDEs all built on the same Platform IntelliJ IDEA and more PyCharm WebStorm GoLand -
03 / THE CONTEXT The IDE Ecosystem IDE Platform PUBLIC
APIS API Editor PSI Project model VFS Swing UI Jewel / Compose UI compiled against public API Plugins built on CLIENT JetBrains & third-party your-plugin.jar + thousands more runs inside JetBrains IDEs all built on the same Platform Kotlin Python Docker IntelliJ IDEA and more PyCharm WebStorm GoLand -
04 / THE CONTRACT Compiled Once, Runs on Many PLATFORM
API 2026.1 build 261 compiled against CLIENT your-plugin.jar PLATFORM 2026.2 API build 262 PLATFORM 2026.3 API build 263 -
04 / THE CONTRACT Compiled Once, Runs on Many PLATFORM
2026.1 your-plugin.jar API build 261 CLIENT compiled against 2026.1 · build 261 PLATFORM 2026.2 API build 262 PLATFORM 2026.3 API build 263 -
04 / THE CONTRACT Compiled Once, Runs on Many PLATFORM
2026.1 API build 261 PLATFORM 2026.2 API build 262 runs, NO recompiling your-plugin.jar CLIENT compiled against 2026.1 · build 261 PLATFORM 2026.3 API build 263 -
04 / THE CONTRACT Compiled Once, Runs on Many PLATFORM
2026.1 API build 261 PLATFORM 2026.2 API build 262 PLATFORM 2026.3 API build 263 runs, NO recompiling your-plugin.jar CLIENT compiled against 2026.1 · build 261 -
04 / THE CONTRACT Which API Stays Stable? Stays stable
Public API with no @ApiStatus annotation stays binary compatible across versions No Breaking API Changes Rare exceptions, released only in major versions with migration guidance. -
04 / THE CONTRACT Which API Stays Stable? Stays stable
Public API Can change or be removed @ApiStatus.Internal with no @ApiStatus annotation stays binary compatible across versions not for plugins: changes without notice No Breaking API Changes may change or break between versions Rare exceptions, released only in major versions with migration guidance. @ApiStatus.Experimental @ApiStatus.ScheduledForRemoval(version) will be removed in a stated version -
05 / THE RULES Not All Compatibility Is Equal SOURCE
BINARY BEHAVIORAL Source compatibility Binary compatibility Behavioral compatibility -
05 / THE RULES Not All Compatibility Is Equal SOURCE
BINARY BEHAVIORAL Source compatibility Binary compatibility Behavioral compatibility Will existing source code still compile? USUALLY CAUGHT BY Rebuilding the client with the new library -
05 / THE RULES Not All Compatibility Is Equal SOURCE
BINARY BEHAVIORAL Source compatibility Binary compatibility Behavioral compatibility Will the software still behave as expected? USUALLY CAUGHT BY Unit, integration, and UI tests -
05 / THE RULES Not All Compatibility Is Equal SOURCE
BINARY BEHAVIORAL Source compatibility Binary compatibility Behavioral compatibility Will already-compiled code still work? NEEDS explicit ABI compatibility checks -
OVERVIEW What Weʼll Cover 1 Safely Changing Function Signature 2
Safely Removing Public API 3 Data class usage in public API 4 Which Tools Can We Use? 5 How Can AI Help? -
06 / THE TICKET A Small Feature Request JEWEL-1026 Add
support for fractional palette colors Islands Dark · ManyIslandsDark.theme.json "colors": { "Gray3": "#393B40", "Gray2.5": "#323438", "Gray2.25": "#2E3033", "Gray2": "#2B2D30", "Gray1.5": "#26282b", "Gray1.25": "#222326", "Gray1": "#1E1F22", "Gray0.75": "#191A1C", "Gray0.5": "#17181A", "Gray0.25": "#151517", "Gray0": "#000000", … Islands Dark · JetBrains blog, December 2025 -
06 / THE TICKET A Small Feature Request JEWEL-1026 Add
support for fractional palette colors Fractional palette color A color between two palette steps Islands Dark · ManyIslandsDark.theme.json "colors": { "Gray3": "#393B40", "Gray2.5": "#323438", "Gray2.25": "#2E3033", "Gray2": "#2B2D30", "Gray1.5": "#26282b", "Gray1.25": "#222326", "Gray1": "#1E1F22", "Gray0.75": "#191A1C", "Gray0.5": "#17181A", "Gray0.25": "#151517", "Gray0": "#000000", … Gray1 Gray1.25 Gray1.5 Gray2 -
06 / THE TICKET The Palette API Today public class
ThemeColorPalette( public val gray: List<Color>, … blue, green, red, yellow, orange, purple, teal public val rawMap: Map<String, Color>, ) { … 16 more functions: gray(), blue(), blueOrNull(), …, lookup() public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) … companion object } grayOrNull(1) → Gray1 #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } grayOrNull(1) → Gray1 #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } $ javap -cp out org.jetbrains.jewel.foundation.theme.ThemeColorPalette Compiled from "ThemeColorPalette.kt" public final class org.jetbrains.jewel.foundation.theme.ThemeColorPalette { … public final androidx.compose.ui.graphics.Color grayOrNull-ijrfgN4(int); … } grayOrNull(1) → Gray1 #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } $ javap -cp out org.jetbrains.jewel.foundation.theme.ThemeColorPalette Compiled from "ThemeColorPalette.kt" public final class org.jetbrains.jewel.foundation.theme.ThemeColorPalette { … public final androidx.compose.ui.graphics.Color grayOrNull-ijrfgN4(int); … } public final function cannot be extended unless explicitly marked as open grayOrNull(1) → Gray1 #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } $ javap -cp out org.jetbrains.jewel.foundation.theme.ThemeColorPalette Compiled from "ThemeColorPalette.kt" public final class org.jetbrains.jewel.foundation.theme.ThemeColorPalette { … public final androidx.compose.ui.graphics.Color grayOrNull-ijrfgN4(int); … } Return type: Color is a value class, the cheap wrapper for a primitive type grayOrNull(1) → Gray1 #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } grayOrNull(1) → Gray1 $ javap -cp out org.jetbrains.jewel.foundation.theme.ThemeColorPalette Compiled from "ThemeColorPalette.kt" public final class org.jetbrains.jewel.foundation.theme.ThemeColorPalette { … public final androidx.compose.ui.graphics.Color grayOrNull-ijrfgN4(int); … } -ijrfgN4:Kotlin mangles method names involving value classes to avoid JVM signature clashes #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } $ javap -cp out org.jetbrains.jewel.foundation.theme.ThemeColorPalette Compiled from "ThemeColorPalette.kt" public final class org.jetbrains.jewel.foundation.theme.ThemeColorPalette { … public final androidx.compose.ui.graphics.Color grayOrNull-ijrfgN4(int); … } Int translates to primitive int. Parameter names aren't part of the JVM signature grayOrNull(1) → Gray1 #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } grayOrNull(1) → Gray1 $ javap -cp out org.jetbrains.jewel.foundation.theme.ThemeColorPalette Compiled from "ThemeColorPalette.kt" public final class o.j.j.f.t.ThemeColorPalette { … public final a.c.u.g.Color grayOrNull-ijrfgN4(int); … } Package aliases: a.c.u.g = androidx.compose.ui.graphics, o.j.j.f.t = org.jetbrains.jewel.foundation.theme #1E1F22 -
06 / THE TICKET What the JVM Sees public class
ThemeColorPalette(…) { public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) } grayOrNull(1) → Gray1 $ javap -cp out org.jetbrains.jewel.foundation.theme.ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); The contract: At runtime, already-compiled plugins invoke this method using its exact JVM signature #1E1F22 -
06 / THE TICKET Back to the Ticket JEWEL-1026 Add
support for fractional palette colors public class ThemeColorPalette(…) { … public fun grayOrNull(index: Int): Color? = … … } CALL SITE palette.grayOrNull(1) → Gray1 ✓ -
06 / THE TICKET Back to the Ticket JEWEL-1026 Add
support for fractional palette colors public class ThemeColorPalette(…) { … public fun grayOrNull(index: Int): Color? = … … } CALL SITE palette.grayOrNull(1) → Gray1 ✓ palette.grayOrNull(1.25) → Gray1.25 ✗ -
06 / THE TICKET Back to the Ticket JEWEL-1026 Add
support for fractional palette colors public class ThemeColorPalette(…) { … public fun grayOrNull(index: Int): Color? = … … } CALL SITE palette.grayOrNull(1) → Gray1 ✓ palette.grayOrNull(1.25) → Gray1.25 ✗ The signature has to change -
07 / THE TEMPTING CHANGE Just Add a Parameter? public
class ThemeColorPalette(…) { … public fun grayOrNull(index: Int): Color? = … … } javap output public final a.c.u.g.Color grayOrNull-ijrfgN4(int); -
07 / THE TEMPTING CHANGE Just Add a Parameter? public
class ThemeColorPalette(…) { … public fun grayOrNull(index: Int, fractional: Int = 0): Color? = … … } javap output changes − public final a.c.u.g.Color grayOrNull-ijrfgN4(int); + public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); + public static a.c.u.g.Color grayOrNull-6MYuD4A$default(o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); -
07 / THE TEMPTING CHANGE Just Add a Parameter? public
class ThemeColorPalette(…) { … public fun grayOrNull(index: Int, fractional: Int = 0): Color? = … … } javap output changes − public final a.c.u.g.Color grayOrNull-ijrfgN4(int); the one-parameter method is gone + public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); the JVM has no default arguments: two int s, and a new name + public static a.c.u.g.Color grayOrNull-6MYuD4A$default(o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); synthetic helper that fills in fractional = 0 -
07 / THE TEMPTING CHANGE It Still Compiles public class
ThemeColorPalette(…) { … public fun grayOrNull(index: Int, fractional: Int = 0): Color? = … … } CALL SITE val background = JewelTheme.colorPalette.grayOrNull(1) ✓ still compiles -
07 / THE TEMPTING CHANGE It Still Compiles public class
ThemeColorPalette(…) { … public fun grayOrNull(index: Int, fractional: Int = 0): Color? = … … } CALL SITE val background = JewelTheme.colorPalette.grayOrNull(1) ✓ Source compatible change ✓ still compiles -
07 / THE TEMPTING CHANGE But Binary Compatibility Gets Broken
INTELLIJ PLATFORM · BEFORE JEWEL-1026 INTELLIJ PLATFORM · AFTER JEWEL-1026 API API class ThemeColorPalette class ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); new public static a.c.u.g.Color grayOrNull-6MYuD4A$default( o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); new compiled against CLIENT CLIENT your-plugin.jar calls grayOrNull-ijrfgN4(int) compiled before JEWEL-1026 -
07 / THE TEMPTING CHANGE But Binary Compatibility Gets Broken
INTELLIJ PLATFORM · BEFORE JEWEL-1026 INTELLIJ PLATFORM · AFTER JEWEL-1026 API API class ThemeColorPalette class ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); new public static a.c.u.g.Color grayOrNull-6MYuD4A$default( o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); new java.lang.NoSuchMethodError: 'androidx.compose.ui.graphics.Color org.jetbrains.jewel.foundation.theme.ThemeColorPalette.grayOrNull-ijrfgN4(int)' at com.example.plugin.PalettePanelKt.panelBackground(PalettePanel.kt:6) CLIENT ✗ not here CLIENT your-plugin.jar calls grayOrNull-ijrfgN4(int) compiled before JEWEL-1026 -
07 / THE TEMPTING CHANGE But Binary Compatibility Gets Broken
INTELLIJ PLATFORM · BEFORE JEWEL-1026 INTELLIJ PLATFORM · AFTER JEWEL-1026 API API class ThemeColorPalette class ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); new public static a.c.u.g.Color grayOrNull-6MYuD4A$default( o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); new java.lang.NoSuchMethodError: 'androidx.compose.ui.graphics.Color org.jetbrains.jewel.foundation.theme.ThemeColorPalette.grayOrNull-ijrfgN4(int)' at com.example.plugin.PalettePanelKt.panelBackground(PalettePanel.kt:6) CLIENT ✗ not here CLIENT your-plugin.jar calls grayOrNull-ijrfgN4(int) compiled before JEWEL-1026 ✗ Breaking binary change -
08 / THE REVIEW FIX How to preserve binary compatibility?
public class ThemeColorPalette(…) { … public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) … } -
08 / THE REVIEW FIX How to preserve binary compatibility?
+ import kotlin.DeprecationLevel.HIDDEN public class ThemeColorPalette(…) { … + @Deprecated("Use variant with fractional parameter", level = HIDDEN) public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) … } Keep the old function, HIDDEN gone from source, still in bytecode: old binaries link -
08 / THE REVIEW FIX How to preserve binary compatibility?
+ import kotlin.DeprecationLevel.HIDDEN public class ThemeColorPalette(…) { … + @Deprecated("Use variant with fractional parameter", level = HIDDEN) public fun grayOrNull(index: Int): Color? = gray.getOrNull(index - 1) + } public fun grayOrNull(index: Int, fractional: Int = 0): Color? = … … EXISTING SOURCE grayOrNull(1) compiles against the new function: nothing to migrate Keep the old function, HIDDEN gone from source, still in bytecode: old binaries link Add the new function existing calls move to it on recompile -
08 / THE REVIEW FIX How to preserve binary compatibility?
+ import kotlin.DeprecationLevel.HIDDEN public class ThemeColorPalette(…) { … + @Deprecated("Use variant with fractional parameter", level = HIDDEN) public fun grayOrNull(index: Int): Color? = − gray.getOrNull(index - 1) + grayOrNull(index, fractional = 0) + } public fun grayOrNull(index: Int, fractional: Int = 0): Color? = … … Keep the old function, HIDDEN gone from source, still in bytecode: old binaries link Add the new function existing calls move to it on recompile Delegate old to new one implementation, two entry points -
09 / THE UPGRADE Before and After JEWEL 1026 INTELLIJ
PLATFORM · BEFORE JEWEL-1026 INTELLIJ PLATFORM · AFTER JEWEL-1026 API API class ThemeColorPalette class ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); compiled against CLIENT CLIENT your-plugin.jar calls grayOrNull-ijrfgN4(int) compiled before JEWEL-1026 -
09 / THE UPGRADE Before and After JEWEL 1026 INTELLIJ
PLATFORM · BEFORE JEWEL-1026 INTELLIJ PLATFORM · AFTER JEWEL-1026 API API class ThemeColorPalette class ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); new public static a.c.u.g.Color grayOrNull-6MYuD4A$default( o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); new compiled against CLIENT CLIENT your-plugin.jar calls grayOrNull-ijrfgN4(int) compiled before JEWEL-1026 old, hidden -
09 / THE UPGRADE Before and After JEWEL 1026 INTELLIJ
PLATFORM · BEFORE JEWEL-1026 INTELLIJ PLATFORM · AFTER JEWEL-1026 API API class ThemeColorPalette class ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); new public static a.c.u.g.Color grayOrNull-6MYuD4A$default( o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); new installed, not rebuilt: links CLIENT ✓ found CLIENT your-plugin.jar calls grayOrNull-ijrfgN4(int) compiled before JEWEL-1026 -
09 / THE UPGRADE Before and After JEWEL 1026 INTELLIJ
PLATFORM · BEFORE JEWEL-1026 INTELLIJ PLATFORM · AFTER JEWEL-1026 API API class ThemeColorPalette class ThemeColorPalette public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-ijrfgN4(int); public final a.c.u.g.Color grayOrNull-6MYuD4A(int, int); new public static a.c.u.g.Color grayOrNull-6MYuD4A$default( o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object); new installed, not rebuilt: links CLIENT ✓ found CLIENT your-plugin.jar calls grayOrNull-ijrfgN4(int) compiled before JEWEL-1026 After the plugin is recompiled to a new API, same function call grayOrNull(1) now links to the $default helper grayOrNull-6MYuD4A$default(o.j.j.f.t.ThemeColorPalette, int, int, int, j.l.Object) -
10 / THE INCIDENT The Real Incident: After the Revert
Reported 2026-02-17 · IntelliJ IDEA 2026.1 EAP · Junie java.lang.NoSuchMethodError: 'androidx.compose.ui.graphics.Color org.jetbrains.jewel.foundation.theme.ThemeColorPalette. grayOrNull-6MYuD4A$default ( org.jetbrains.jewel.foundation.theme.ThemeColorPalette, int, int, int, java.lang.Object)' at …JuniePillSwitchStyle$Companion.defaultStyle(SpeedModeSelector.kt:227) at …JunieTheme(JunieTheme.kt:63) … -
10 / THE INCIDENT Gone, But Not Forgotten API BEFORE
grayOrNull-ijrfgN4(int) CLIENT -
10 / THE INCIDENT Gone, But Not Forgotten Jan 14
JEWEL 1026 merged API BEFORE JEWEL-1026 grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-6MYuD4A(int, int) grayOrNull-6MYuD4A$default(…) CLIENT -
10 / THE INCIDENT Gone, But Not Forgotten Jan 14
JEWEL 1026 merged Jan 23 JEWEL 1026 reverted API BEFORE JEWEL-1026 AFTER THE REVERT grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-6MYuD4A(int, int) grayOrNull-6MYuD4A(int, int) gone grayOrNull-6MYuD4A$default(…) grayOrNull-6MYuD4A$default(…) gone CLIENT -
10 / THE INCIDENT Gone, But Not Forgotten Jan 14
JEWEL 1026 merged IDEA EAP 1 ships Jan 23 JEWEL 1026 reverted API BEFORE JEWEL-1026 AFTER THE REVERT grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-6MYuD4A(int, int) grayOrNull-6MYuD4A(int, int) gone grayOrNull-6MYuD4A$default(…) gone grayOrNull-6MYuD4A$default(…) calls $default : links CLIENT Junie calls grayOrNull-6MYuD4A$default(…) compiled against EAP 1 ✓ found -
10 / THE INCIDENT Gone, But Not Forgotten Jan 14
JEWEL 1026 merged IDEA EAP 1 ships Jan 23 JEWEL 1026 reverted IDEA EAP 2 cut-off API BEFORE JEWEL-1026 AFTER THE REVERT grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-6MYuD4A(int, int) grayOrNull-6MYuD4A(int, int) gone grayOrNull-6MYuD4A$default(…) gone grayOrNull-6MYuD4A$default(…) calls $default : links CLIENT Junie calls grayOrNull-6MYuD4A$default(…) compiled against EAP 1 ✓ found -
10 / THE INCIDENT Gone, But Not Forgotten Jan 14
JEWEL 1026 merged IDEA EAP 1 ships Jan 23 JEWEL 1026 reverted IDEA EAP 2 cut-off Feb 17 Junie fails in EAP 2 API BEFORE JEWEL-1026 AFTER THE REVERT grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-ijrfgN4(int) grayOrNull-6MYuD4A(int, int) grayOrNull-6MYuD4A(int, int) gone grayOrNull-6MYuD4A$default(…) grayOrNull-6MYuD4A$default(…) ✗ not here java.lang.NoSuchMethodError: 'androidx.compose.ui.graphics.Color org.jetbrains.jewel.foundation.theme.ThemeColorPalette.grayOrNull-6MYuD4A$default( org.jetbrains.jewel.foundation.theme.ThemeColorPalette, int, int, int, java.lang.Object)' at …JuniePillSwitchStyle$Companion.defaultStyle(SpeedModeSelector.kt:227) CLIENT Junie calls grayOrNull-6MYuD4A$default(…) compiled against EAP 1 -
11 / REMOVING AN API A Temporary Guard For K2
Migration KOTLIN PLUGIN public fun suppressAndroidPlugin(): Boolean -
11 / REMOVING AN API A Temporary Guard For K2
Migration KOTLIN PLUGIN public fun suppressAndroidPlugin(): Boolean ANDROID PLUGIN calls if (suppressAndroidPlugin()) return null -
11 / REMOVING AN API We deleted all source usages
KOTLIN PLUGIN public fun suppressAndroidPlugin(): Boolean ANDROID PLUGIN calls if (suppressAndroidPlugin()) return null -
11 / REMOVING AN API We deleted all source usages
KOTLIN PLUGIN public fun suppressAndroidPlugin(): Boolean ANDROID PLUGIN 0 source usages if (suppressAndroidPlugin()) return null -
11 / REMOVING AN API We deleted all source usages
KOTLIN PLUGIN public fun suppressAndroidPlugin(): Boolean ANDROID PLUGIN 0 source usages if (suppressAndroidPlugin()) return null -
11 / REMOVING AN API The Runtime Failure java.lang.NoClassDefFoundError: org/jetbrains/kotlin/idea/base/plugin/KotlinPluginModeProviderKt
at com.android.tools.idea.dagger.DaggerRelatedItemLineMarkerProvider.collectNavigationMarkers( DaggerRelatedItemLineMarkerProvider.kt:69) at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectNavigationMarkers( RelatedItemLineMarkerProvider.java:35) at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectSlowLineMarkers( RelatedItemLineMarkerProvider.java:27) at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:226) -
11 / REMOVING AN API The Runtime Failure java.lang.NoClassDefFoundError: org/jetbrains/kotlin/idea/base/plugin/KotlinPluginModeProviderKt
at com.android.tools.idea.dagger.DaggerRelatedItemLineMarkerProvider.collectNavigationMarkers( DaggerRelatedItemLineMarkerProvider.kt:69) at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectNavigationMarkers( RelatedItemLineMarkerProvider.java:35) at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectSlowLineMarkers( RelatedItemLineMarkerProvider.java:27) at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:226) -
11 / REMOVING AN API A Top-Level Function Needs a
Class KotlinPluginModeProvider.kt fun suppressAndroidPlugin(): Boolean -
11 / REMOVING AN API A Top-Level Function Needs a
Class KotlinPluginModeProvider.kt KotlinPluginModeProviderKt.class fun suppressAndroidPlugin(): Boolean public final class KotlinPluginModeProviderKt { public static final boolean suppressAndroidPlugin(); } compiles to -
11 / REMOVING AN API A Top-Level Function Needs a
Class KotlinPluginModeProvider.kt KotlinPluginModeProviderKt.class fun suppressAndroidPlugin(): Boolean public final class KotlinPluginModeProviderKt { public static final boolean suppressAndroidPlugin(); } compiles to -
11 / REMOVING AN API The Plugin Calls a Plugin
API INTELLIJ IDEA · 2025.1 INTELLIJ IDEA · 2025.1.1 API API IntelliJ Platform IntelliJ Platform compiled against PLUGINS compiled against PLUGINS API KOTLIN PLUGIN · BUNDLED API KOTLIN PLUGIN · BUNDLED, UPDATED WITH THE IDE class KotlinPluginModeProviderKt class KotlinPluginModeProviderKt public static final boolean suppressAndroidPlugin(); public static final boolean suppressAndroidPlugin(); calls · links Android plugin calls suppressAndroidPlugin() compiled against Kotlin plugin 2025.1 -
11 / REMOVING AN API The Plugin Calls a Plugin
API INTELLIJ IDEA · 2025.1 INTELLIJ IDEA · 2025.1.1 API API IntelliJ Platform IntelliJ Platform compiled against PLUGINS compiled against PLUGINS API KOTLIN PLUGIN · BUNDLED API KOTLIN PLUGIN · BUNDLED, UPDATED WITH THE IDE class KotlinPluginModeProviderKt class KotlinPluginModeProviderKt public static final boolean suppressAndroidPlugin(); public static final boolean suppressAndroidPlugin(); ✗ class gone calls · links Android plugin calls suppressAndroidPlugin() compiled against Kotlin plugin 2025.1 -
11 / REMOVING AN API The Plugin Calls a Plugin
API INTELLIJ IDEA · 2025.1 INTELLIJ IDEA · 2025.1.1 API API IntelliJ Platform IntelliJ Platform compiled against PLUGINS API compiled against PLUGINS KOTLIN PLUGIN · BUNDLED API KOTLIN PLUGIN · BUNDLED, UPDATED WITH THE IDE class KotlinPluginModeProviderKt class KotlinPluginModeProviderKt public static final boolean suppressAndroidPlugin(); public static final boolean suppressAndroidPlugin(); ✗ class gone java.lang.NoClassDefFoundError Android plugin calls suppressAndroidPlugin() compiled against Kotlin plugin 2025.1 -
11 / REMOVING AN API The Deprecation Cycle @Deprecated("Use replacement")
@ApiStatus.ScheduledForRemoval fun oldApi() -
11 / REMOVING AN API The Deprecation Cycle @Deprecated("Use replacement")
@ApiStatus.ScheduledForRemoval fun oldApi() Keep for 2 major releases -
11 / REMOVING AN API The Deprecation Cycle @Deprecated("Use replacement")
@ApiStatus.ScheduledForRemoval fun oldApi() Keep for 2 major releases Check current usages -
11 / REMOVING AN API The Deprecation Cycle @Deprecated("Use replacement")
@ApiStatus.ScheduledForRemoval fun oldApi() Keep for 2 major releases Usage is minimal Remove API Check current usages Still widely used Postpone to next major release -
12 / DATA CLASSES A Data Class Publishes More Than
Its Constructor public data class Solid( val width: Float, val color: Int, ) : Stroke() -
12 / DATA CLASSES A Data Class Publishes More Than
Its Constructor public data class Solid( val width: Float, val color: Int, ) : Stroke() WHAT A PLUGIN CAN LINK TO CONSTRUCTOR Solid(width, color) GETTERS getWidth() · getColor() DESTRUCTURING component1() · component2() COPY copy(width, color) · copy$default EQUALITY equals · hashCode · toString -
12 / DATA CLASSES A Data Class Publishes More Than
Its Constructor public data class Solid( val width: Float, val color: Int, ) : Stroke() WHAT A PLUGIN CAN LINK TO CONSTRUCTOR Solid(width, color) order matters DESTRUCTURING component1() · component2() order matters COPY copy(width, color) · copy$default order matters Two properties become a public positional contract -
12 / DATA CLASSES Property Order Is API public data
class Solid( val width: Float, val color: Int, ) : Stroke() ABI component1(): Float compiles to ✓ component2(): Int calls CLIENT val (width, color) = solid → component1(): Float ✓ links → component2(): Int ✓ links -
12 / DATA CLASSES Property Order Is API public data
class Solid( val width: Float, val alignment: Alignment, val color: Int, ) : Stroke() ABI component1(): Float compiles to ✓ component2(): Int calls CLIENT val (width, color) = solid → component1(): Float ✓ links → component2(): Int ✓ links -
12 / DATA CLASSES Property Order Is API public data
class Solid( val width: Float, val alignment: Alignment, val color: Int, ) : Stroke() ABI component1(): Float compiles to component2(): Alignment component3(): Int ✓ was Int new calls CLIENT val (width, color) = solid → component1(): Float ✓ links → component2(): Int ✓ links -
12 / DATA CLASSES Property Order Is API public data
class Solid( val width: Float, val alignment: Alignment, val color: Int, ) : Stroke() ABI component1(): Float compiles to component2(): Alignment component3(): Int ✓ was Int new calls CLIENT val (width, color) = solid → component1(): Float → component2(): Int ✓ links ✗ NoSuchMethodError -
12 / DATA CLASSES Appending Is Safer. copy() Still Breaks.
public data class Solid( val width: Float, val color: Int, val alignment: Alignment = Alignment.Inside, ) : Stroke() ABI compiles to component1(): Float ✓ unchanged component2(): Int ✓ unchanged component3(): Alignment new calls CLIENT val (width, color) = solid → component1(): Float ✓ links → component2(): Int ✓ links -
12 / DATA CLASSES Appending Is Safer. copy() Still Breaks.
public data class Solid( val width: Float, val color: Int, val alignment: Alignment = Alignment.Inside, ) : Stroke() ABI copy(float, int): Solid compiles to copy$default(Solid, float, int, int, Object): Solid calls CLIENT val pressed = solid.copy(color = pressedColor) → copy$default(Solid, float, int, int, Object): Solid ✓ links -
12 / DATA CLASSES Appending Is Safer. copy() Still Breaks.
public data class Solid( val width: Float, val color: Int, val alignment: Alignment = Alignment.Inside, ) : Stroke() ABI − copy(float, int): Solid compiles to − copy$default(Solid, float, int, int, Object): Solid + copy(float, int, Alignment): Solid + copy$default(Solid, float, int, Alignment, int, Object): Solid calls CLIENT val pressed = solid.copy(color = pressedColor) → copy$default(Solid, float, int, int, Object): Solid ✓ links -
12 / DATA CLASSES Appending Is Safer. copy() Still Breaks.
public data class Solid( val width: Float, val color: Int, val alignment: Alignment = Alignment.Inside, ) : Stroke() ABI − copy(float, int): Solid compiles to − copy$default(Solid, float, int, int, Object): Solid + copy(float, int, Alignment): Solid + copy$default(Solid, float, int, Alignment, int, Object): Solid calls CLIENT val pressed = solid.copy(color = pressedColor) → copy$default(Solid, float, int, int, Object): Solid ✗ NoSuchMethodError -
12 / DATA CLASSES Appending Is Safer. copy() Still Breaks.
public data class Solid( val width: Float, val color: Int, val alignment: Alignment = Alignment.Inside, ) : Stroke() ABI − copy(float, int): Solid compiles to − copy$default(Solid, float, int, int, Object): Solid + copy(float, int, Alignment): Solid + copy$default(Solid, float, int, Alignment, int, Object): Solid calls CLIENT val pressed = solid.copy(color = pressedColor) Appending keeps componentN binary compatible, but copy() still breaks. → copy$default(Solid, float, int, int, Object): Solid ✗ NoSuchMethodError -
12 / DATA CLASSES Donʼt use data classes in public
API @GenerateDataFunctions historical name public class Solid internal constructor( public val width: Dp, public val color: Color, public val alignment: Alignment, ) : Stroke() { equals / hashCode / toString } -
12 / DATA CLASSES Donʼt use data classes in public
API @GenerateDataFunctions historical name public class Solid internal constructor( public val width: Dp, public val color: Color, public val alignment: Alignment, ) : Stroke() { equals / hashCode / toString } KEEPS DOES NOT GENERATE ✓ equals ✗ copy ✓ hashCode ✗ copy$default ✓ toString ✗ componentN ✓ immutable public properties ✗ positional data-class ABI -
12 / DATA CLASSES Donʼt use data classes in public
API @GenerateDataFunctions historical name public class Solid internal constructor( public val width: Dp, public val color: Color, public val alignment: Alignment, ) : Stroke() { equals / hashCode / toString } KEEPS DOES NOT GENERATE ✓ equals ✗ copy ✓ hashCode ✗ copy$default ✓ toString ✗ componentN ✓ immutable public properties ✗ positional data-class ABI @GenerateDataFunctions is a historical name. Today it validates equality methods. It does not create data-class ABI. -
12 / DATA CLASSES The Build Enforces API to stay
up to date GRADLE validatePublicApi Data classes are not allowed in public API. Found violations: … Turn them into regular classes, implement equals()/hashCode()/toString(), and add the @GenerateDataFunctions annotation. -
12 / DATA CLASSES The Build Enforces API to stay
up to date GRADLE validatePublicApi DETEKT EqualityMembersRule Data classes are not allowed in public API. Found violations: … Turn them into regular classes, implement equals()/hashCode()/toString(), and add the @GenerateDataFunctions annotation. detects missing or incomplete equals/hashCode/toString functions ‹Class› is missing required functions: ‹functions›. Jewel's default policy: no data classes in public API. Exceptions must be explicit. -
13 / THE GUARDS Compatibility Tooling IntelliJ API Checker Metalava
BINARY API SOURCE API -
13 / THE GUARDS Compatibility Tooling IntelliJ API Checker Metalava
BINARY API SOURCE API Kotlin ABI Validator japicmp BINARY API BINARY API -
13 / THE GUARDS Create the Baseline Generate initial API
dump Commit api-dump.txt -
13 / THE GUARDS Validate Every API Change In CI
Commit + push source + api-dump.txt CI generates current API dump Compare with committed dump -
13 / THE GUARDS Validate Every API Change In CI
Merge MATCH Commit + push source + api-dump.txt CI generates current API dump Compare with committed dump -
13 / THE GUARDS Validate Every API Change In CI
Merge MATCH Commit + push source + api-dump.txt CI generates current API dump Compare with committed dump MISMATCH Review API diff CI fails -
13 / THE GUARDS Validate Every API Change In CI
Merge MATCH Commit + push source + api-dump.txt CI generates current API dump Compare with committed dump MISMATCH Review API diff Expected change Update api-dump.txt CI fails -
13 / THE GUARDS Validate Every API Change In CI
Merge MATCH Commit + push source + api-dump.txt CI generates current API dump Compare with committed dump MISMATCH Review API diff Expected change Update api-dump.txt CI fails Unexpected break Fix API break -
14 / THE AGE OF AI A Diff Is Not
a Decision Compatibility check failed - public fun oldApi() requires judgment Is this change expected and safe? -
14 / THE AGE OF AI Tools Give AI Eyes
Public API change -
14 / THE AGE OF AI Tools Give AI Eyes
Public API change Compatibility tools -
14 / THE AGE OF AI Tools Give AI Eyes
Public API change Compatibility tools Evidence Removed public symbol -
14 / THE AGE OF AI Tools and Skills Close
the Loop Implement API change Run compatibility tools Apply API-evolution rules -
14 / THE AGE OF AI Tools and Skills Close
the Loop Implement API change Run compatibility tools Apply API-evolution rules issue found Fix compatibility issue -
14 / THE AGE OF AI Tools and Skills Close
the Loop Implement API change Run compatibility tools Apply API-evolution rules safe issue found Fix compatibility issue Commit change -
15 / THE CONCLUSION Building software for the future is
hard. Staying compatible with the past is even more difficult. -
15 / THE CONCLUSION So when you build for the
future, respect the past. -
15 / THE CONCLUSION So when you build for the
future, respect the past. Every release you ship might be someone else's dependency.