You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using tidle instead of hyphen for pre-release tag to comply with debian versioning #97
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 :
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.
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!
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.
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.
Activity
isaacs commentedon Jun 6, 2013
Would it be suitable to use either
-or~as a separator?atuleu commentedon Jun 6, 2013
Suitable for me ... actually my developments are conform to this document, expect for this hyphen thing.
tbull commentedon Jun 6, 2013
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 :
So the solution appears simple to me. On import, just
upstream_version =~ s/-/~/;ors/-/~/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!
isaacs commentedon Jun 6, 2013
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.
haacked commentedon Jun 9, 2013
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.
Replace - by ~ to keep version precedence