-
Notifications
You must be signed in to change notification settings - Fork 174
Description
Preface
The versioning scheme used by Zephyr SDK is currently more or less arbitrary in the sense that there are no clearly defined rules dictating how the version number is incremented, which leads to various problems such as:
- inconsistent and potentially misleading version numbers
- given the version number format
A.B.C, there are no clear rules dictating whenA,BandCare incremented, leaving this decision basically up to what the maintainer feels like. - e.g. SDK 0.15.2 and 0.16.0 may be used interchangeably while 0.14.2 and 0.15.0 may not.
- given the version number format
- difficulty in discovering a compatible version of SDK from Zephyr build system
- since the SDK versions are set without any rules based on compatibility/interchangeability, the Zephyr build system cannot determine if an SDK version is compatible with it without some form of discrete Zephyr version-to-SDK version compatibility matrix, which cannot exist for the future Zephyr SDK releases at the time of a Zephyr release.
- for this reason, Zephyr build system simply looks for the latest version of Zephyr SDK which may not be compatible with the Zephyr version.
Adopt semantic versioning scheme that clearly defines what each version field means and when each version field is allowed to be incremented.
Implementation Plan
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJORversion when you make major incompatible change(s) to multiple components that affect the overall user experience.MINORversion when you make minor incompatible change(s) to one or more components that do not affect the overall user experience.PATCHversion when you make backwards compatible enhancements and bug fixes.
(loosely based on Semantic Version 2.0.0)
Examples of major incompatible changes
(to multiple components that affect the overall user experience)
- Change the distribution bundle format from self-extracting archive to tarballs with multiple host platform support.
- Change the toolchain triplet format from
(arch)-zephyr-elfto(arch)-none-zephyr.
Examples of minor incompatible changes
(to one or more components that do not affect the overall user experience)
- Change ARC toolchain default thread pointer register from r26 to r25.
- Disable C99 format specifier support in newlib nano variant.
Zephyr Build System Integration
Zephyr build system currently selects the latest version of SDK among the detected SDK installations, which may lead to various build issues if the selected version of SDK is not compatible with the version of Zephyr.
With the proposed semantic versioning scheme, the Zephyr build system can select for the highest PATCH version that is under a specific MAJOR.MINOR version to avoid such compatibility issues, since any PATCH versions within a specific MAJOR.MINOR version are guaranteed to be backwards compatible.
Backports and Maintenance Releases
Zephyr releases often use the latest SDK version available and, with the proposed semantic versioning scheme and the subsequent Zephyr build system integration strategy, they will be tied to the latest MAJOR.MINOR version of SDK available at the time of their release.
Since a Zephyr release may be supported for up to two years and it is not feasible to introduce breaking changes to a dot (aka. PATCH) release of Zephyr (i.e. you cannot bump the required SDK version for dot releases of Zephyr), it is necessary to backport any relevant SDK bug fixes and provide maintenance PATCH releases for use with the previous Zephyr releases.
This will be implemented by creating the release branches for every MAJOR.MINOR release, backporting patches to them, and releasing maintenance MAJOR.MINOR.PATCH releases from the release branches.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status