digitalmars.D - Semantic versioning of packages and supported compiler versions
- Bastiaan Veelo (17/17) May 10 2022 In a [PR to
- Paul Backus (9/25) May 10 2022 In general, upgrading a dependency is not considered grounds for
- Bastiaan Veelo (3/8) May 10 2022 You make an interesting point.
- Alexandru Ermicioi (4/9) May 10 2022 That would be a nice feature to be able to list dmd as a
- Bastiaan Veelo (4/7) May 10 2022 (We have postponed this for now as the PR supports both old and
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#too chain-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.
May 10 2022
On Tuesday, 10 May 2022 at 12:21:43 UTC, Bastiaan Veelo wrote: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#too chain-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?In general, upgrading a dependency is not considered grounds for a major version bump in SemVer. So I would say you do not need to increment the major version in this case. It seems like the real problem here is that dub does not take the installed toolchain version into account when resolving dependencies. If a user runs `dub upgrade` with DMD 2.097 installed, dub should not select a package version that requires 2.098.
May 10 2022
On Tuesday, 10 May 2022 at 14:35:06 UTC, Paul Backus wrote:It seems like the real problem here is that dub does not take the installed toolchain version into account when resolving dependencies. If a user runs `dub upgrade` with DMD 2.097 installed, dub should not select a package version that requires 2.098.You make an interesting point. -- Bastiaan.
May 10 2022
On Tuesday, 10 May 2022 at 14:35:06 UTC, Paul Backus wrote:It seems like the real problem here is that dub does not take the installed toolchain version into account when resolving dependencies. If a user runs `dub upgrade` with DMD 2.097 installed, dub should not select a package version that requires 2.098.That would be a nice feature to be able to list dmd as a versioned dependency, or any other tool that will be used during build.
May 10 2022
On Tuesday, 10 May 2022 at 12:21:43 UTC, Bastiaan Veelo wrote:In a [PR to Pegged](https://github.com/PhilippeSigaud/Pegged/pull/311) we are going to limit the supported compiler frontend [...](We have postponed this for now as the PR supports both old and new using `static if`.) -- Bastiaan.
May 10 2022