使用SEMVER时,小型破裂的变化是否足以进行主要版本升级?
我对 SemVer 的概念很陌生。在我当前的项目中实施这似乎是一个非常有前途的想法。
根据 SemVer 的概念,如果一个项目名为 project-abc
,那么 a 是主要更新(重大更改),b 是次要更新(较新的实现),c 是补丁更新(错误修复)。
我的问题是,假设我有一个非常小的重大更改,我需要构建和更新我的存储库。那我该怎么办?
这是重大更新还是补丁更新?
另外,SemVer 是否只适用于某些软件技术而不适用于所有技术?例如,一些节点开发人员告诉我他们很少使用这个。但是,我不确定有多少人在练习。
I am new to the concept of SemVer. It's seems like very promising idea to implement in my current project.
According to the SemVer concept, if a project is name project-a.b.c
then, a is Major update(breaking changes), b is Minor update(newer implementations), c is patch update(bug fixes).
My question is, say if I had a Very Small breaking change for which I need to build and update my repo. What should I do then?
Is it a Major update or a Patch update?
Also, is SemVer only suitable for certain software technologies and not for every thing? For example, some Node Devs told me they rarely use this. But, I am not sure what percentage of people are practising it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
重大变更就是重大变更,没有如果或但是。您应该进行重大更新。
SemVer 的目的是
传达底层代码的含义以及从一个版本到下一个版本的修改内容
。该方案适用于需要解决任何类型的兼容性问题的所有情况,并且 SemVer 约定符合目的。https://semver.org/
提出一些问题很有用,可以帮助您确定影响而不是影响偏离 SemVer 约定:
是的=>重大改变;没有=>继续讨论 MINOR 与 PATCH 的下一个问题。
至于开发人员是否使用 SemVer 约定,您会惊讶地发现大量项目使用它,因为它的实用性和简单性,因此我鼓励您在有意义的地方使用它,例如分布式可交付成果。
Breaking change is a breaking change, no ifs or buts. You should do a MAJOR update.
SemVer purpose is to
convey meaning about the underlying code and what has been modified from one version to the next
. This scheme is suitable for everything where there is a need to solve compatibility issues of any kind and SemVer convention fits the purpose.https://semver.org/
It is useful to ask a number of questions to help you determine the impact and not to deviate from the SemVer convention:
Yes => breaking change; No => move on to next question of MINOR vs PATCH.
As to whether developers using or not using SemVer convention you would be surprised to find huge number of projects using it because of its usefulness and simplicity, so I would encourage you to use it where it makes sense, e.g. distributed deliverable.
不得不增加主要版本可能会对小型打破变化感到笨拙(我不确定这是理性的问题)。
使用 reforcation reprecation 给定“足够”通知,要求并释放次要增量的破坏变化。但这将违反语义版本>语义版本2.0.0规范:
如果遵循“ ”,那么主要版本的升级不必繁重,以便用户可以平稳过渡到新的API ”。
为了最大程度地减少歧义,规格依赖于a :
Having to increment the major version may feel heavy-handed for small breaking changes (I'm unsure if this is a rational concern).
There may be a strong temptation to use deprecation releases to subvert the requirement and release a breaking change on a minor increment, given 'sufficient' notice. But that would violate the Semantic Versioning 2.0.0 specification:
Major version upgrades don't have to be onerous if the deprecation steps are followed "so that users can smoothly transition to the new API".
To minimize ambiguity, the spec relies on a formal definition of the word 'MUST':