Skip to content
tezvyn:

Semantic Versioning: A Three-Part Numbering System

Source: Wikipedia: Semantic VersioningEasyHow cards are made

Semantic Versioning (SemVer) is a widely used convention for assigning software versions. It uses a three-part Major.Minor.Patch number to create unique identifiers for software states.

Why it exists

Software development requires a way to assign unique identifiers to unique states of the software. Without a shared convention, this process can be chaotic, using inconsistent numbers, dates, or letters that make it difficult to track changes or manage dependencies between different software components.

The mental model

Think of Semantic Versioning (SemVer) as a universal language for software versions. It replaces arbitrary naming with a predictable, three-part number (Major.Minor.Patch) that provides a formal structure for both humans and machines to understand.

How it works

The core of SemVer is a three-part version number. For example, in 2.5.1, 2 is the Major version, 5 is the Minor version, and 1 is the Patch version. SemVer also allows for optional tags. A hyphen indicates a prerelease tag (e.g., 1.0.0-alpha), while a plus sign indicates build metadata (e.g., 1.0.0+build.456). Some implementations may even add a fourth number to denote a specific build.

When to use it

Use SemVer when you need a clear, widely understood scheme for labeling software releases. It is the most common system and provides a consistent foundation for managing software states and dependencies.

When not to use it

SemVer is not the only option. Some projects use calendar versioning (CalVer), where the version is based on the release date (e.g., 2024.05.10), which is common for products with time-based release schedules. Other historical systems used letters and other characters, which is now less common but demonstrates that not all versioning is semantic.

One canonical example

While SemVer is a three-part system, it can be extended. Adobe Flash, for instance, was known for using a four-part version number, with the fourth number denoting the software build.

Interview question

What is the fundamental structure of a Semantic Versioning number?

  • a.A three-part number: Major.Minor.Patch.Correct
  • b.A date-based system like YYYY.MM.DD.
  • c.A flexible system using letters, numbers, or dates.
  • d.A four-part number including a build identifier.
Why?

The card explicitly states that the core of Semantic Versioning is a three-part Major.Minor.Patch number. While some implementations may extend it to four parts, this is not its fundamental structure.

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

Read the original → en.wikipedia.org

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 versioning — each one lists the topics its interview covers.

See open roles