Semantic versioning of packages and supported compiler versions

Bastiaan Veelo Bastiaan at Veelo.net
Tue May 10 12:21:43 UTC 2022


In a [PR to 
Pegged](https://github.com/PhilippeSigaud/Pegged/pull/311) we are 
going to limit the supported compiler frontend to versions 
2.098.0 and newer, which at the time of writing is just seven 
months old. My question is: *Should I release this as a patch 
release, a minor release or a major release?* The change itself 
is backwards compatible (adding `@safe` annotations).

Projects that depend on Pegged following [semantic 
versioning](https://semver.org/) that have it pinned to the 
current major version, expect Pegged to be backward compatible 
within that  major version, such that doing a `dub upgrade` will 
not brake the build.

Since this change *will* brake the build for anyone using a 
compiler prior to 2.098.0 (be it with a clear error message by 
using 
[`toolchainRequirements`](https://dub.pm/package-format-json.html#toolchain-requirements) in our Dub configuration) one can argue that this demands a major version bump. So, should the major version number be increased with every change to `toolchainRequirements`, however minor? And would your answer be the same if the change would be reducing support for a very old frontend to a slightly less old frontend? If so, where is the cut-off?

-- Bastiaan.


More information about the Digitalmars-d mailing list