liveBook · Manning

Versioning

As explained in The Art of Code

Versioning is the practice of identifying successive revisions of an interface or artifact so clients can distinguish and manage compatibility between them.

Evolve public interfaces without surprising clients: communicate the impact of releases, and keep older interfaces available while users plan migrations. section 9.4.2

Use release numbers and compatibility choices to make change easier to manage:

  • With semantic versioning, use major releases for breaking changes, minor releases for backward-compatible additions, and patch releases for bug fixes. section 9.4.2
  • For smaller interface changes, consider supporting old and new behavior together; mark replaced methods as deprecated and explain what to use instead. section 9.4.2

Changes that can break clients

Making an optional field mandatory, changing validation rules, removing a response field, or modifying an endpoint URL can cause dependent applications to fail. section 9.4.2

@Deprecated(since = "2.1", forRemoval = true)
public void generateReport() { ... }

This Java annotation marks generateReport as deprecated since version 2.1 and scheduled for removal. section 9.4.2

How The Art of Code covers it

How deep it goes
Explains semantic-version categories and compatibility tactics, but does not detail a migration process.
Examples
Uses breaking API changes and a Java deprecation annotation as concrete examples.
What you can do after
Apply semantic-version labels and compatibility tactics when evolving an interface.
How it connects
Connects semantic versioning with backward compatibility, API evolution, and deprecation.

Also explained in

Compare how 27 books explain versioning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of Code. The section links point to the parts of the book it draws on.