Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Semantic Versioning and Releases | Building and Packaging Libraries
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

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 4

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

bookSemantic Versioning and Releases

Veeg om het menu te tonen

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

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 4
some-alt