You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please add a FAQ entry about platform support #716
I've been in several discussions about what to do about supported platforms (i.e., for Ruby gems, versions of Ruby, for npm packages, versions of node).
Semver is only about the documented API, so similar to updating dependencies, dropping supported platforms could even happen in a patch release.
Dropping a supported platform is a breaking change so that should only happen in a major release.
(I have a preference but that is not really relevant to this ticket!)
There is already an entry in the FAQ section about updating dependencies. Having one for platform support would help projects a lot in adhering to semver.
Reacted by Dominick C. Pastore, Joseph Donahue, XANDER, Jonathan Hefner, Juraj Uhlar and DannyNiu/NJF
@ljharb this ticket is explicitly about a FAQ entry. I have not heard from anyone but you on this, and you have already indicated you can't make a FAQ entry happen. I'd like te see a response from someone who can.
Reacted by Jordan Harband, XANDER and |7eter l-|. l3oling
It seems to me pretty obvious that semantic versioning only applies to the public API. Dropping support for a platform does not change the public API. Doing so should not result in a bump of the major version. I don't think this warrants a FAQ entry but I have no objection to adding such a FAQ clarification.
Reacted by Matijs van Zuijlen
Reacted by Jordan Harband, Robert Kieffer, Eric Cornelius, XANDER, Gajus Kuizinas and |7eter l-|. l3oling
A breaking change is something that requires the consumer to make changes to their application after updating. Upgrading the platform version is included in this - dropping support for a platform is both obviously and objectively a breaking change.
Reacted by Joseph Donahue, Robert Kieffer, Eric Cornelius, XANDER, Gajus Kuizinas, |7eter l-|. l3oling, Igor, Jakub Jirutka and Sam Wilson
A breaking change is something that requires the consumer to make changes to their application after updating.
Obviously adding a platform is not a breaking change that warrants bumping the major number. Which is why removing a platform is not a breaking change. Anyone using a module on a platform that is no longer supported can simply pin their use to the last supported version. The project should ensure that if they do not do so their builds will fail. I don't think dropping support for a platform warrants bumping the major number.
Reacted by Robert Kieffer, Eric Cornelius, XANDER, Gajus Kuizinas, Uri Gilad, |7eter l-|. l3oling, Igor, Jakub Jirutka and Ilkka Kallioniemi
@ljharb, I am ambivalent with respect to your argument. Please point us to where "Supported platforms are always part of the documented API" is itself documented. Even for a different project. A platform might be dropped for many reasons. Such as the platform no longer being actively maintained. Dropping support for that platform is not a breaking change for every other platform.
I understand why you are making your argument. If a project drops support for a platform its public API for that platform has, technically, changed. But no other platform is affected and the affected users of the, now unsupported, platform can simply pin their dependency. It is not at all obvious that dropping support for a platform warrants changing the major version since the reason for dropping support has nothing to do with changing the public API other than for that platform.
This is a perennial issue that arises out of the fact that the spec talks about API's more than packages AND it has a broad definition of what an API is:
1 Software using Semantic Versioning MUST declare a public API. This API could be declared in the code itself or exist strictly in documentation. However it is done, it SHOULD be precise and comprehensive.
It turns out that in practice, we rarely ever actually version our Programming Interfaces (classic API's). Most of the SemVer implementing tools are in fact packaging tools, where the version string applies to an entire collection of interface/implementation code, data, binaries and metadata. The later normally includes something like a package manifest. The package manifests have come to be considered part of the public API, in many of these tool chains.
It's all about what exactly are you versioning? If it's a core set of function/method signatures in a header file, then implementation details regarding supported platforms would not be included, as literally specified by the SemVer spec. But the cases where arguments arise over breaking changes around supported platforms never arise in such pure API cases. They arise out of environments/tool-chains where the version string is applied to a package and its manifest, which tend to reference implementation details and dependencies.
It sounds like the maintainers of semver have strong opinions on this one; I don't think discussing it further is really going to take us anywhere. This issue has gotten off-track though. To avoid further questions about how this should or should not work, can we please add an entry into the FAQ regarding this point of discussion?
We (the uuid module maintainers) are dropping support for node 8 and IE 11 after uuid@8.3.2. Specifically, we're dropping those platforms from our CI testing matrix and, moving forward, will be closing issues specific to those platforms as "WON'T FIX". So how should this be reflected in the release version?
The answer is self-evident: It has to be a major release. The fact we no longer test legacy platforms means that when a legacy-breaking change gets introduced (probably in the form of some otherwise minor change), we are unlikely to know about it.
Thus, the only responsible option is to do a major version bump now, even if everything else in the API remains unchanged.
Reacted by Joseph Donahue, cdrch, Phil Davis, XANDER, |7eter l-|. l3oling and nicholas a. evans
@mvz yes it does, because users on node 8 will see their code no longer work when they install the update, which the spec forces you to mark as a breaking change.
I have always interpreted the SemVer spec as requiring a major version bump in case of dropping support for a platform. If a tool works on my platform, and I install a patch, I expect it to work.
I will always be surprised if a project stops working when the only delta is a patch update, and I'll internally consider this a bug, even if the project attempts an alternate framing. Therefore platform support can't be dropped in a patch, and it follows, can't be dropped in a minor update either, because it is obviously and implicitly, a breaking change.
This is a problem in Ruby, becuase the maintainer of rubocop (@bbatsov) inteprets the SemVer spec differently, (the narrow API version) and drops Ruby version support in minor updates.
Apparently his interpretation is common enough to warrant repeated hashing of this issue, and though I've been a supporter of SemVer for many years, if the spec isn't clear enough to put this discussion to rest it seems flawed.
@pboling the rubocop case is a little different because dropping a supported TargetRubyVersion is not caught by the installer, and usually people don't run rubocop on the lowest Ruby version they want to support with their gem.
So I'm fully in agreement with you that dropping a TargetRubyVersion (which is a feature and not a dependency) is a breaking change and should be accompanied by a major version bump.
Rubocop has never done a major bump to accommodate dropping a Ruby, and 1.29.0 will drop Ruby 2.5, both from the syntax target (TargetRubyVersion) and from the minimum install supported Ruby, if current plans materialize unchanged.
However, I think both types of version support being dropped, from installing, to syntax parsing with the target setting, require a major version bump according to SemVer, and that appears to be what this discussion is about.
The maintainer doesn't see drops as changing the API in a breaking way, because it is a gem with a "real" API in the classic sense.
But almost no end users use that API, they all use rubocop via package managers, and command line. The current release strategy breaks the intended SemVer-based utility of ~> 1.0.
As has been made clear in previous comments, the platform is part of the interface of a tool. The fact that deviance from proper SemVer is somewhat mitigated by the required_ruby_version setting from the gemspec is irrelevant.
The fact that SemVer 2.0 is defined in a way that tramples the principle of least surprise is the issue.
Yes, I understand what the discussion in this issue is about.
I was just commenting on the fact that dropping a TargetRubyVersion is a problem orthogonal to your position on dropping support for a platform a gem runs on.
Reacted by Bozhidar Batsov and |7eter l-|. l3oling
Yep, also notice that we have an extended window for supporting Rubies that reached EOL at the runtime level - we'll now be dropping support for a Ruby release that reached EOL over 1 year ago. I totally agree that changes to TargetRubyVersion are a breaking change, but the runtime compatibility stuff is definitely a gray area, especially when this is unlikely to affect anyone in practice (given how old the Ruby 2.5 is).
I do agree, however, it'd be nice if SemVer's spec was clear on this issue.
this is unlikely to affect anyone in practice (given how old the Ruby 2.5 is).
I disagree. Many gem authors who support older rubies in their projects. Rubocop is heavily used by FLOSS gems that have widely varying scopes of support, for example, one of the most popular gems, rspec, still supports Ruby 1.8.7.
If 2.5 is dropped outside a major version bump, I'll have to make a mental note of "remember to stop before the arbitrary and meaningless number 1.29!" when updating many gems. 1.29 would effectively be a "magic number".
Granted I just spent dozens of hours wrapping this problem in a SemVer (as I interpret it) solution, so I can avoid rubocop versioning altogether... https://GitLab.com/rubocop-lts
To put it simply:
it is precisely because neither Ruby, nor Rubocop, release patterns dictate when my projects drop support for ancient-but-still functional platforms, that I am invested in this.
My support efforts become harder when platforms are dropped without a major bump.
This is something which, until today, I thought was settled, accepting that various projects didn't follow SemVer for particular reasons.
EOL for a still-functional dependency should not be relevant to SemVer, IMO.
I did not expect so much ambiguity around this. At the end of the day all of us change some data in some container (folder/file/repo/HDD/cloud/etc.). The tiniest data piece is a bit. So it can really go down to a simple question: will a change of one bit break any possible variation of a consumer out there?
Yes, it can > Breaking change (MAJOR).
No, it cannot > MINOR or PATCH.
The last thing consumer should worry about is where this changed bit of data belongs to, either manifest file, code file, image file, documentation file, README, .gitignore, generated dynamically, etc. We simply should not care as we are versioning deliverable in some format via some channel.
It seems too much effort is made to define what API is, where focus should be shifted to understand that something has changed and if a change in something can break consumers.
Reacted by |7eter l-|. l3oling, Jordan Harband, Lucas Yamanishi, Thibaud Colas, Matthew O'Leary and nicholas a. evans
... version numbers ... convey ... what has been modified ... https://semver.org/
So it is exactly about that. Changing anything in the text below (or equivalent) is a change, so it is author's responsibility to "convey what has been modified" and how it can affect consumers.
Activity
ljharb commentedon Jun 25, 2021
Supported platforms are always part of the documented API. A FAQ entry would be nice but it doesn't change that that's how it works.
mvz commentedon Jun 25, 2021
@ljharb this ticket is explicitly about a FAQ entry. I have not heard from anyone but you on this, and you have already indicated you can't make a FAQ entry happen. I'd like te see a response from someone who can.
krader1961 commentedon Jun 28, 2021
It seems to me pretty obvious that semantic versioning only applies to the public API. Dropping support for a platform does not change the public API. Doing so should not result in a bump of the major version. I don't think this warrants a FAQ entry but I have no objection to adding such a FAQ clarification.
ljharb commentedon Jun 28, 2021
A breaking change is something that requires the consumer to make changes to their application after updating. Upgrading the platform version is included in this - dropping support for a platform is both obviously and objectively a breaking change.
krader1961 commentedon Jun 28, 2021
Obviously adding a platform is not a breaking change that warrants bumping the major number. Which is why removing a platform is not a breaking change. Anyone using a module on a platform that is no longer supported can simply pin their use to the last supported version. The project should ensure that if they do not do so their builds will fail. I don't think dropping support for a platform warrants bumping the major number.
ljharb commentedon Jun 28, 2021
@krader1961 no, adding a platform is adding stuff, so it's a minor version. removal is typically major, addition is typically minor.
The platform's support status is irrelevant.
krader1961 commentedon Jun 29, 2021
@ljharb, I am ambivalent with respect to your argument. Please point us to where "Supported platforms are always part of the documented API" is itself documented. Even for a different project. A platform might be dropped for many reasons. Such as the platform no longer being actively maintained. Dropping support for that platform is not a breaking change for every other platform.
I understand why you are making your argument. If a project drops support for a platform its public API for that platform has, technically, changed. But no other platform is affected and the affected users of the, now unsupported, platform can simply pin their dependency. It is not at all obvious that dropping support for a platform warrants changing the major version since the reason for dropping support has nothing to do with changing the public API other than for that platform.
ljharb commentedon Jun 29, 2021
“changing the API other than <changing the API for nonzero users>“
07831968138 commentedon Jul 23, 2021
F
jwdonahue commentedon Sep 5, 2021
This is a perennial issue that arises out of the fact that the spec talks about API's more than packages AND it has a broad definition of what an API is:
It turns out that in practice, we rarely ever actually version our Programming Interfaces (classic API's). Most of the SemVer implementing tools are in fact packaging tools, where the version string applies to an entire collection of interface/implementation code, data, binaries and metadata. The later normally includes something like a package manifest. The package manifests have come to be considered part of the public API, in many of these tool chains.
It's all about what exactly are you versioning? If it's a core set of function/method signatures in a header file, then implementation details regarding supported platforms would not be included, as literally specified by the SemVer spec. But the cases where arguments arise over breaking changes around supported platforms never arise in such pure API cases. They arise out of environments/tool-chains where the version string is applied to a package and its manifest, which tend to reference implementation details and dependencies.
nVitius commentedon Nov 1, 2021
It sounds like the maintainers of semver have strong opinions on this one; I don't think discussing it further is really going to take us anywhere. This issue has gotten off-track though. To avoid further questions about how this should or should not work, can we please add an entry into the FAQ regarding this point of discussion?
broofa commentedon Dec 4, 2021
Stirring the pot...
We (the
uuidmodule maintainers) are dropping support for node 8 and IE 11 afteruuid@8.3.2. Specifically, we're dropping those platforms from our CI testing matrix and, moving forward, will be closing issues specific to those platforms as "WON'T FIX". So how should this be reflected in the release version?The answer is self-evident: It has to be a major release. The fact we no longer test legacy platforms means that when a legacy-breaking change gets introduced (probably in the form of some otherwise minor change), we are unlikely to know about it.
Thus, the only responsible option is to do a major version bump now, even if everything else in the API remains unchanged.
ljharb commentedon Dec 4, 2021
@broofa indeed, that's a breaking change, so you'd need to bump to v9 (altho i'm sad about that decision)
mvz commentedon Dec 4, 2021
@broofa you can certainly do that if you want, but semver as defined does not force you to do so.
ljharb commentedon Dec 4, 2021
@mvz yes it does, because users on node 8 will see their code no longer work when they install the update, which the spec forces you to mark as a breaking change.
46 remaining items
pboling commentedon May 2, 2022
I have always interpreted the SemVer spec as requiring a major version bump in case of dropping support for a platform. If a tool works on my platform, and I install a patch, I expect it to work.
I will always be surprised if a project stops working when the only delta is a patch update, and I'll internally consider this a bug, even if the project attempts an alternate framing. Therefore platform support can't be dropped in a patch, and it follows, can't be dropped in a minor update either, because it is obviously and implicitly, a breaking change.
This is a problem in Ruby, becuase the maintainer of
rubocop(@bbatsov) inteprets the SemVer spec differently, (the narrow API version) and drops Ruby version support in minor updates.Apparently his interpretation is common enough to warrant repeated hashing of this issue, and though I've been a supporter of SemVer for many years, if the spec isn't clear enough to put this discussion to rest it seems flawed.
I wrote about my isssues here:
https://dev.to/pboling/rubocop-ruby-matrix-gems-nj
mvz commentedon May 3, 2022
@pboling the
rubocopcase is a little different because dropping a supported TargetRubyVersion is not caught by the installer, and usually people don't run rubocop on the lowest Ruby version they want to support with their gem.So I'm fully in agreement with you that dropping a TargetRubyVersion (which is a feature and not a dependency) is a breaking change and should be accompanied by a major version bump.
pboling commentedon May 3, 2022
Rubocop has never done a major bump to accommodate dropping a Ruby, and 1.29.0 will drop Ruby 2.5, both from the syntax target (
TargetRubyVersion) and from the minimum install supported Ruby, if current plans materialize unchanged.However, I think both types of version support being dropped, from installing, to syntax parsing with the target setting, require a major version bump according to SemVer, and that appears to be what this discussion is about.
The maintainer doesn't see drops as changing the API in a breaking way, because it is a gem with a "real" API in the classic sense.
But almost no end users use that API, they all use rubocop via package managers, and command line. The current release strategy breaks the intended SemVer-based utility of
~> 1.0.As has been made clear in previous comments, the platform is part of the interface of a tool. The fact that deviance from proper SemVer is somewhat mitigated by the
required_ruby_versionsetting from the gemspec is irrelevant.The fact that SemVer 2.0 is defined in a way that tramples the principle of least surprise is the issue.
mvz commentedon May 3, 2022
Yes, I understand what the discussion in this issue is about.
I was just commenting on the fact that dropping a
TargetRubyVersionis a problem orthogonal to your position on dropping support for a platform a gem runs on.bbatsov commentedon May 3, 2022
Yep, also notice that we have an extended window for supporting Rubies that reached EOL at the runtime level - we'll now be dropping support for a Ruby release that reached EOL over 1 year ago. I totally agree that changes to
TargetRubyVersionare a breaking change, but the runtime compatibility stuff is definitely a gray area, especially when this is unlikely to affect anyone in practice (given how old the Ruby 2.5 is).I do agree, however, it'd be nice if SemVer's spec was clear on this issue.
pboling commentedon May 3, 2022
I disagree. Many gem authors who support older rubies in their projects. Rubocop is heavily used by FLOSS gems that have widely varying scopes of support, for example, one of the most popular gems,
rspec, still supports Ruby 1.8.7.If 2.5 is dropped outside a major version bump, I'll have to make a mental note of "remember to stop before the arbitrary and meaningless number 1.29!" when updating many gems.
1.29would effectively be a "magic number".Granted I just spent dozens of hours wrapping this problem in a SemVer (as I interpret it) solution, so I can avoid rubocop versioning altogether... https://GitLab.com/rubocop-lts
To put it simply:
My support efforts become harder when platforms are dropped without a major bump.
This is something which, until today, I thought was settled, accepting that various projects didn't follow SemVer for particular reasons.
EOL for a still-functional dependency should not be relevant to SemVer, IMO.
igorpupkinable commentedon May 3, 2022
I did not expect so much ambiguity around this. At the end of the day all of us change some data in some container (folder/file/repo/HDD/cloud/etc.). The tiniest data piece is a bit. So it can really go down to a simple question: will a change of one bit break any possible variation of a consumer out there?
The last thing consumer should worry about is where this changed bit of data belongs to, either manifest file, code file, image file, documentation file, README, .gitignore, generated dynamically, etc. We simply should not care as we are versioning deliverable in some format via some channel.
It seems too much effort is made to define what API is, where focus should be shifted to understand that something has changed and if a change in something can break consumers.
mvz commentedon May 12, 2022
No matter what your opinion about platform version support is, this is emphatically not what SemVer is about. Fixing a bug might break a consumer.
igorpupkinable commentedon May 23, 2022
@mvz
So it is exactly about that. Changing anything in the text below (or equivalent) is a change, so it is author's responsibility to "convey what has been modified" and how it can affect consumers.
mvz commentedon May 23, 2022
@igorpupkinable what is your point? We're discussing breaking changes, not what has been modified in general.
igorpupkinable commentedon Jul 15, 2022
Platform requirements change is a breaking change if you narrowing or restricting it.
mvz commentedon Jul 15, 2022
@igorpupkinable you're ignoring the context of my comment.
🔧 Setup Appraisal
🔧 Appraisal is not following SemVer
🔧 Appraisal is not following SemVer