~/talk

Kotlin Library API Design and Compatibility Challenges

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [kotlin]
speakerdeck:arkivanov
slides:none on file

Covers concrete compatibility failures and concrete fixes: adding a parameter to a public method creates a new signature and breaks binary compatibility; solution is to keep the old method as a synthetic shim annotated @Deprecated(level = HIDDEN) that forwards to the new one. Recommends the JetBrains binary-compatibility-validator Gradle plugin and using API dump diffs, cites Java Language Spec chapter 13 and semantic versioning, shows sealed interfaces/value wrappers to avoid exhaustive enum breaks, and uses RequiresOptIn for experimental APIs.

AI-written summary · about

  1. 0:00Introduction
  2. 1:29API safety and compatibility
  3. 3:36Source vs binary compatibility
  4. 5:22Binary Compatibility Validator
  5. 6:46Adding function arguments safely
  6. 9:25Lambda parameters and interfaces
  7. 11:52Enums and sealed classes
  8. 13:40Data classes updates
  9. 15:06Experimental APIs and versioning
  10. 15:49Library development best practices
  11. 16:30Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.