[ https://issues.apache.org/jira/browse/MESOS-1987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985965#comment-15985965 ]
Michael Park commented on MESOS-1987: ------------------------------------- [~neilc]: Re-targeting this for 1.4.0. Please let me know if this is a blocker for 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)