版本号中的各个段叫什么?
What are the individual segments in a version number called?
以下版本号4.10.9.7
被分割成四块。这些部分之一的词是什么?如果要在句子中使用它,可能会说
A version number is comprised of one or more ___
由于各个部分通常称为主要编号、次要编号、内部版本号和修订版编号,因此答案是 numbers
。
major.minor[.build[.revision]]
存在各种版本编号方案,因此它们各部分的含义和命名可能因主题而异。
来自Wikipedia:
The standard GNU version numbering scheme is major.minor.revision, but emacs is a notable example using another scheme where the major number (1) was dropped and a user site revision was added which is always zero in original emacs packages but increased by distributors. Similarly, Debian package numbers are prefixed with an optional "epoch", which is used to allow the versioning scheme to be changed.
和:
Other schemes impart meaning on individual sequences:
major.minor[.build[.revision]]
or
major.minor[.maintenance[.build]]
Again, in these examples, the definition of what constitutes a "major" as opposed to a "minor" change is entirely subjective and up to the author, as is what defines a "build", or how a "revision" differs from a "minor" change.
语义版本
最常见的术语来自 semver 规范,它使用 identifier:
Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows
所以,
A version number is comprised of one or more identifiers
包管理器
包管理器并不普遍同意术语,但似乎要么遵循 semver 并使用“identifer”,要么使用通用术语“parts”。
NPM 遵循 semver 并且 uses the term identifer.
Golang 做同样的事情,尽管 the code itself 将其缩短为“Ident”。
PIP 只是称它们为 parts。可能有点麻烦,但它完成了工作。
Ruby 是 the same 作为 pip,称它们为 parts.
结论
问这个问题五年后,我发现自己在提到它们时就像在原来的问题中一样:如 segments.
A version number is comprised of one or more segments
我认为任何能表达意图的术语都足以胜任这份工作。我喜欢“片段”,因为这意味着部分是连续的,而且只是整体的一部分。
但是,如果与 semver 标准保持一致很重要,则应使用的术语是 identifier。
以下版本号4.10.9.7
被分割成四块。这些部分之一的词是什么?如果要在句子中使用它,可能会说
A version number is comprised of one or more ___
由于各个部分通常称为主要编号、次要编号、内部版本号和修订版编号,因此答案是 numbers
。
major.minor[.build[.revision]]
存在各种版本编号方案,因此它们各部分的含义和命名可能因主题而异。
来自Wikipedia:
The standard GNU version numbering scheme is major.minor.revision, but emacs is a notable example using another scheme where the major number (1) was dropped and a user site revision was added which is always zero in original emacs packages but increased by distributors. Similarly, Debian package numbers are prefixed with an optional "epoch", which is used to allow the versioning scheme to be changed.
和:
Other schemes impart meaning on individual sequences:
major.minor[.build[.revision]]
or
major.minor[.maintenance[.build]]
Again, in these examples, the definition of what constitutes a "major" as opposed to a "minor" change is entirely subjective and up to the author, as is what defines a "build", or how a "revision" differs from a "minor" change.
语义版本
最常见的术语来自 semver 规范,它使用 identifier:
Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows
所以,
A version number is comprised of one or more identifiers
包管理器
包管理器并不普遍同意术语,但似乎要么遵循 semver 并使用“identifer”,要么使用通用术语“parts”。
NPM 遵循 semver 并且 uses the term identifer.
Golang 做同样的事情,尽管 the code itself 将其缩短为“Ident”。
PIP 只是称它们为 parts。可能有点麻烦,但它完成了工作。
Ruby 是 the same 作为 pip,称它们为 parts.
结论
问这个问题五年后,我发现自己在提到它们时就像在原来的问题中一样:如 segments.
A version number is comprised of one or more segments
我认为任何能表达意图的术语都足以胜任这份工作。我喜欢“片段”,因为这意味着部分是连续的,而且只是整体的一部分。
但是,如果与 semver 标准保持一致很重要,则应使用的术语是 identifier。