~/talk

How to Avoid Breaking Changes in your Go Modules

Talkat GopherCon Europe 2023 · 2023-06-26..06-29· [open-source, go]
slides:none on file

Prometheus is used as a concrete example (35,000 imports) and a go.mod audit finds 181 dependencies with many still at 0.x while only ~11% are v2+, exposing real versioning pain. Advice: define API boundaries with internal packages to stop accidental exports, split independent code into separate modules, and use interface upgrades (new small capability interfaces like Flusher/Exemplar) or the rule accept interfaces, return structs to add features without breaking consumers.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Prometheus as Go module
  3. 3:11Semantic versioning
  4. 6:43Go modules vs versioning
  5. 8:32Costs of major bumps
  6. 10:40Staying on 0.y.z
  7. 13:08Dependency trends in Go
  8. 14:54Podcast plug
  9. 15:38API surface definition
  10. 17:45Module granularity
  11. 19:10Pragmatism in breaking changes
  12. 21:18Interface upgrades
  13. 24:05Accept interfaces return structs
  14. 26:13Closing remarks
~/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.