Skip to content
tezvyn:
Menu

Breaking Change Policy: Managing API Evolution

Source: github.comMediumHow cards are made

A breaking change policy is a contract with your users, ensuring disruptive API changes are predictable, not chaotic. It governs how you alter shared libraries or design systems, like removing a prop, to prevent downstream failures and maintain trust.

Why it exists

Shared code, like a design system or an API, is a dependency for many teams. Without a policy, a single change by the maintainer can break numerous applications, creating widespread rework and eroding trust. A breaking change policy exists to make this inevitable evolution predictable and manageable for everyone involved.

The mental model

Think of a breaking change policy as the "rules of the road" for a shared library. It's a social contract between maintainers and consumers that says, "We promise not to suddenly move the steering wheel to the other side of the car. If we must, we'll give you months of warning, a clear migration path, and a very good reason." It's about managing trust and dependency risk, not just code.

How it works

A policy first defines what constitutes a "breaking" change. This includes not just code that causes errors but also significant, disruptive visual or user experience changes. The process requires changes to be justified and communicated clearly. A key mechanism is deprecation: a feature is first marked as "deprecated," often with console warnings, to inform users of its impending removal. The actual breaking change is then implemented in a future major version release, giving consumers time to adapt their code.

When to use it

Implement a breaking change policy for any shared asset with multiple consumers: public APIs, internal microservices, company-wide design systems, and open-source libraries. The more consumers you have, the more critical a clear policy becomes. It's the difference between a stable platform and a constant source of fire drills for dependent teams.

When not to use it

A formal policy is overkill for a project in its very early, pre-release (e.g., version 0.x.y) stages where the API is in rapid flux and has no stable users. It's also less critical for a codebase used by a single, small team that can coordinate changes informally. The overhead isn't justified when the "blast radius" of a change is tiny and easily contained.

One canonical example

Wikimedia's Codex design system defines a breaking change as anything incompatible with its public API, including significant visual disruptions. For instance, changing a design token for line-height might not throw a compiler error, but if it causes page titles to get squished and overlap their containers, it's treated as a breaking change. Before removing a feature, they strongly recommend a deprecation period to warn users and give them time to migrate.

Interview question

Under which circumstance is a formal breaking change policy most essential for a software component?

  • a.When the component is exclusively used by a single, small development team.
  • b.When it is a shared asset consumed by multiple independent teams or applications.Correct
  • c.Only for public-facing APIs, not for internal microservices or design systems.
  • d.When the component is in its early, pre-release (0.x.y) development stage.
Why?

A breaking change policy is crucial for shared assets with multiple consumers to manage dependency risk and ensure predictable evolution. It is explicitly stated as overkill for early-stage projects or those used by a single team, and it applies to internal shared assets as well as public APIs.

Just read this? Test yourself on what you have been reading.

Read the original → github.com

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on design systems — each one lists the topics its interview covers.

See open roles