Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-1987

Add support for SemVer build and prerelease labels to stout.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.1, 1.3.0, 1.4.0
    • stout

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              neilc Neil Conway
              karya Kapil Arya
              Benjamin Mahler Benjamin Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: