Breaking change

On this page 7

A breaking change is any modification to a software product, library, API or data format that causes previously valid usage to fail or behave differently, so that consumers must change their own code, configuration or data before they can upgrade. In the software lifecycle, breaking changes are the main reason releases are versioned, announced and scheduled with care.

Whether a change is breaking depends on the contract the software exposes, not on the size of the code diff. Renaming one public function can break thousands of downstream projects, while rewriting an entire internal module may break nobody.

How a breaking change disrupts consumers

A breaking change disrupts consumers by violating an expectation they relied on. That expectation may be explicit, such as a documented function signature, or implicit, such as the order of items in a response. The failure appears in one of three forms: code that no longer compiles or links, code that fails at run time, or code that runs but produces silently different results.

Engineers usually distinguish source compatibility, where existing code still compiles, from binary compatibility, where already compiled code still links and runs, and behavioral compatibility, where results stay the same. A change can preserve one and break another. Adding a parameter with a default value in C++, for example, keeps source compatibility but breaks binary compatibility, because the compiled function symbol changes.

The table below lists frequent kinds of breaking changes and how they surface.

Kind of changeExampleHow it surfaces
Removed elementA public method or endpoint is deletedCompile error or HTTP 404
Changed signatureA required parameter is addedCompile error or validation failure
Changed data formatA field is renamed in a JSON responseParsing errors or missing values
Changed behaviorA default timeout drops from 30 s to 5 sIntermittent run-time failures
Stricter validationPreviously accepted input is now rejectedErrors for some existing callers
Raised requirementsA minimum runtime or OS version increasesInstallation or startup failure
Typical kinds of breaking changes

Breaking changes and semantic versioning

Semantic versioning ties breaking changes directly to the version number. Under the MAJOR.MINOR.PATCH scheme, any incompatible change to the public API requires a major version increment, new backward-compatible features increase the minor number, and backward-compatible fixes increase the patch number.

This convention lets dependency managers apply version range constraints safely. A constraint such as ^2.4.0 accepts 2.5.1 but refuses 3.0.0, on the assumption that only a major release may break consumers. The guarantee holds only when maintainers classify changes honestly; a breaking change shipped in a minor release defeats the whole mechanism.

ChangeSemantic versioning incrementConsumer impact
Bug fix with unchanged contractPatch, for example 2.4.1Safe to upgrade automatically
New optional featureMinor, for example 2.5.0Safe to upgrade, new capabilities available
Deprecation notice onlyMinorWarnings, no failures yet
Removal or incompatible changeMajor, for example 3.0.0Migration work required
How change types map to version numbers

Projects using calendar versioning cannot signal compatibility through the number itself, so they rely more heavily on release notes, changelog markers and deprecation periods.

Managing breaking changes through deprecation

Responsible maintainers rarely remove functionality abruptly. They first mark it as deprecated, keep it working, and publish a migration path and a removal date. Compilers, linters and runtime warnings then alert consumers well before the actual break.

  1. Introduce the replacement alongside the old behavior in a minor release.
  2. Deprecate the old element with warnings and documentation that point to the replacement.
  3. Allow a transition window, often one or more major cycles or a fixed period such as 6-12 months for web APIs.
  4. Remove the old element in the next major release and document the change in a migration guide.

Web API providers often go further with versioned endpoints such as /v1 and /v2, or date-based version headers, so that old clients keep working while new clients adopt the new contract. Running parallel versions costs maintenance effort but decouples provider releases from consumer schedules.

Detecting breaking changes before release

Breaking changes are cheapest to handle when they are detected before release. Teams combine automated tooling with review discipline, because no single technique catches every incompatibility.

TechniqueWhat it catchesBlind spot
API diff toolsRemoved or changed public signaturesBehavioral changes
Schema comparisonIncompatible OpenAPI, Protobuf or database changesSemantic meaning of fields
Consumer-driven contract testsChanges that break known consumersUnknown or new consumers
Downstream test runsReal failures in dependent projectsProjects not included in the run
Code review checklistsImplicit contract changesDepends on reviewer experience
Techniques for detecting breaking changes

Hyrum’s law explains why detection is never complete: with enough users, every observable behavior of a system will be depended on by somebody. Even a performance improvement or a changed error message can therefore break a consumer.

Common misconceptions about breaking changes

Several misconceptions lead teams to ship breaking changes by accident or to fear them more than necessary.

  • “Bug fixes are never breaking.” Fixing incorrect behavior that consumers relied on can break them, which is why some fixes are released only in major versions.
  • “Internal code cannot break anyone.” Reflection, serialized data and plugin architectures can expose internals that were never meant to be public.
  • “Major releases are failures.” A well-planned major release with a clear migration guide is a healthy part of the release cycle.
  • “Feature flags remove the risk.” A feature flag can stage a rollout, but once the old path is removed the change is still breaking.

The practical goal is not to avoid breaking changes entirely but to make them rare, intentional, well announced and easy to migrate.

A non-technical view

A breaking change is an update that stops older things from working with the new version. Imagine a building that replaces every lock with a new design: the doors are better, but everyone’s old keys no longer fit.

Good software makers warn people early, keep the old keys working for a while and explain how to get new ones. The update itself is not the problem; the surprise is.

A concrete example

A company that runs a public shipping API decides to replace the weight field, measured in pounds, with a weight_grams field. Changing the unit in place would cause silently wrong shipping costs for thousands of online shops, so the change is treated as breaking.

The team adds weight_grams in version 2.8 while keeping weight, marks the old field as deprecated in responses, and emails every registered developer with a twelve-month timeline. Monitoring shows which API keys still send the old field, and the support team contacts the remaining 40 clients directly. The field is removed in version 3.0 without a single reported outage, because every active client had already migrated.