Skip to content

Using tidle instead of hyphen for pre-release tag to comply with debian versioning #97

Closed

Description

@atuleu

hyphen is used by debian to separate between upstream and debian version.

It would be safer to separate (like for backport in debian, that are a kind of pre-release) pre-release tag with tidle '~' to comply easily with debian policy. Then comparison in lexical order of string would still ensure :

1.0.0rc1 < 1.0.0rc2 < 1.0.0

if you refer to the debian policy, this is how they advice to mark upstream version :
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

and the footnote :
http://www.debian.org/doc/debian-policy/footnotes.html#f37

Activity

  1. isaacs commented on Jun 6, 2013

    @isaacs
    Contributor

    Would it be suitable to use either - or ~ as a separator?

  2. atuleu commented on Jun 6, 2013

    @atuleu
    Author

    Suitable for me ... actually my developments are conform to this document, expect for this hyphen thing.

  3. tbull commented on Jun 6, 2013

    @tbull

    Well, Debian is not the only (package management) system in the world which deals with version numbers and which imposes its own set of rules on them. When importing anything from the outside world, there has to be a translation process from the original version to one which complies with these rules. This thought has already occured to the Debian guys, too.

    From http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version :

    however, it [the upstream version] may need to be reformatted to fit into the package management system's format and comparison scheme.

    So the solution appears simple to me. On import, just
    upstream_version =~ s/-/~/; or s/-/~/g;
    (Perl syntax)

    Adjusting the SemVer rules to be compatible with one particular package management system does not seem like a good idea to me. There are so many other such systems. Each of the scripting languages (Perl, Ruby, Python) has own repositories, many OS have them (several Linuxes, several BSDs). Making the requested modification could mean to lose compatibility with one of them. And we would have another special rule, an exception, the opposite of simplicity. I can only repeat: Keep it as simple as possible!

  4. isaacs commented on Jun 6, 2013

    @isaacs
    Contributor

    I slept on this and woke up feeling like this is not a good idea. @tbull just convinced me even more.

    I'd say that if you want to parse Debian style versions, you should either minimally extend the spec for your use case and document the divergence (as I plan to do in one edge case with npm versions), or convert before parsing/comparing.

  5. haacked commented on Jun 9, 2013

    @haacked
    Contributor

    Ok, I'll close this then.

    The dash for pre-release was part of SemVer 1.0 and I think changing it would be a huge unnecessary breaking change for all SemVer implementations out there. So I agree with not changing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions