Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Semantic Versioning and Releases | Building and Packaging Libraries
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C++ Library Development

bookSemantic Versioning and Releases

Note
Definition
  • MAJOR version: incremented for incompatible API changes;
  • MINOR version: incremented for backward-compatible new features;
  • PATCH version: incremented for backward-compatible bug fixes or small improvements.

Understanding how to manage versions is crucial when developing a C++ library. Semantic versioning, often called semver, is the most widely adopted standard for versioning libraries and software. It uses a three-part version number: MAJOR.MINOR.PATCH. Each segment of this version number communicates important information to library consumers about the nature of changes in each release.

You increment the MAJOR version when you make incompatible API changes that could break existing code using your library. The MINOR version is incremented when you add new functionality in a backward-compatible manner, such as introducing new functions or classes without changing or removing existing ones. The PATCH version increases when you make backward-compatible bug fixes or small improvements that don’t affect the API or add new features.

Applying semantic versioning correctly allows users of your library to understand whether an update is safe to adopt, or if they need to make changes to their own code. It also helps you, as the author, to communicate the impact of your changes clearly and maintain trust with your users.

version.hpp

version.hpp

CHANGELOG.md

CHANGELOG.md

copy
1234567
#pragma once #define MYLIBRARY_VERSION_MAJOR 2 #define MYLIBRARY_VERSION_MINOR 1 #define MYLIBRARY_VERSION_PATCH 5 #define MYLIBRARY_VERSION "2.1.5"
question mark

Which of the following changes should require incrementing the MAJOR version of your library according to semantic versioning?

Select the correct answer

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 4

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

Suggested prompts:

Can you give examples of version number changes for different scenarios?

How do I decide when to increment each part of the version number?

Are there tools to help automate semantic versioning for C++ projects?

bookSemantic Versioning and Releases

Scorri per mostrare il menu

Note
Definition
  • MAJOR version: incremented for incompatible API changes;
  • MINOR version: incremented for backward-compatible new features;
  • PATCH version: incremented for backward-compatible bug fixes or small improvements.

Understanding how to manage versions is crucial when developing a C++ library. Semantic versioning, often called semver, is the most widely adopted standard for versioning libraries and software. It uses a three-part version number: MAJOR.MINOR.PATCH. Each segment of this version number communicates important information to library consumers about the nature of changes in each release.

You increment the MAJOR version when you make incompatible API changes that could break existing code using your library. The MINOR version is incremented when you add new functionality in a backward-compatible manner, such as introducing new functions or classes without changing or removing existing ones. The PATCH version increases when you make backward-compatible bug fixes or small improvements that don’t affect the API or add new features.

Applying semantic versioning correctly allows users of your library to understand whether an update is safe to adopt, or if they need to make changes to their own code. It also helps you, as the author, to communicate the impact of your changes clearly and maintain trust with your users.

version.hpp

version.hpp

CHANGELOG.md

CHANGELOG.md

copy
1234567
#pragma once #define MYLIBRARY_VERSION_MAJOR 2 #define MYLIBRARY_VERSION_MINOR 1 #define MYLIBRARY_VERSION_PATCH 5 #define MYLIBRARY_VERSION "2.1.5"
question mark

Which of the following changes should require incrementing the MAJOR version of your library according to semantic versioning?

Select the correct answer

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 4
some-alt