You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Michael Park (JIRA)" <ji...@apache.org> on 2017/04/27 03:57:04 UTC
[jira] [Updated] (MESOS-1987) Add better support for handling
arbitrary long versions strings in stout/version.hpp
[ https://issues.apache.org/jira/browse/MESOS-1987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Park updated MESOS-1987:
--------------------------------
Target Version/s: 1.2.1, 1.4.0 (was: 1.2.1, 1.3.0)
> Add better support for handling arbitrary long versions strings in stout/version.hpp
> ------------------------------------------------------------------------------------
>
> Key: MESOS-1987
> URL: https://issues.apache.org/jira/browse/MESOS-1987
> Project: Mesos
> Issue Type: Bug
> Components: stout
> Reporter: Kapil Arya
> Assignee: Neil Conway
> Labels: mesosphere
>
> Currently, the Version class handles strings of the form X.Y.Z only. A recent patch (https://reviews.apache.org/r/27115/) allows for strings of the form X.Y.Z-* by discarding the "-" along with the rest of the string following it. This means that the check `Version("0.20.1") == Version("0.20.1-rc2")` will succeed.
> A better fix is to allow arbitrary number of components in the Version string and still do the right thing w.r.t. comparisons. To standardize it a bit, we can consider Semantic Versioning (http://semver.org/).
> Semantic Versioning allows for strings of the following tagformat:
> <code>
> "MAJOR.MINOR.PATCH-IDENTIFIER[.IDENTIFIER]*"
> </code>
> An IDENTIFIER must comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-].
> One way to implement it in the Version class is to keep a vector of (string) identifiers along with major, minor, and patch variable. Another alternative is to not have the major, minor, and patch variables and just have a single vector of strings.
> The comparison can be tricky. One has to consider the pre-release version, etc. as explained in SemVer 2.0.0 RFC.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)