<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 17 Nov 2021, at 15:12, Eric Timmons wrote:</p>
</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">On 11/17/21 2:38 PM, Robert Goldman wrote:</p>
<blockquote style="border-left:2px solid #777; color:#999; margin:0 0 5px; padding-left:5px; border-left-color:#999"><p dir="auto">On 17 Nov 2021, at 13:31, Robert Dodier wrote:<br>
<br>
On Wed, Nov 17, 2021 at 10:45 AM Robert Goldman rpgoldman@sift.info<br>
<<a href="mailto:rpgoldman@sift.info" style="color:#999">mailto:rpgoldman@sift.info</a>> wrote:<br>
<br>
I favor something like this because it would be nice to have<br>
prerelease versions of ASDF that perform version checks properly.<br>
<br>
What I mean is, if we are going to add a feature in version 3.4,<br>
right now that would be in a prerelease version with a version<br>
number of something like 3.3.5.22<br>
<br>
It would be a lot better for realistic testing if we could<br>
instead use 3.4.0-alpha1 or 3.4.0-1 and have ASDF know that<br>
3.4.0-1 comes before 3.4.0, not after.<br>
<br>
Hi Robert, hi everyone. I haven't been following closely, but while<br>
you are working out details, let me just mention that I recommend<br>
against version numbers that require special interpretation to<br>
discover their ordering, e.g. 3.4.0-1 < 3.4.0.<br>
<br>
Mostly I'm just thinking that somebody's not going to get the memo<br>
(it's usually me).<br>
<br>
For what it's worth, and all the best.<br>
<br>
I guess that would be an argument for using something more obvious than |-|, like the string |alpha| so |3.4.0-alpha1| or |3.4.0alpha1| instead of |3.4.0-1| since there the meaning should be relatively obvious.<br>
<br>
My feeling is that if a user misinterprets |3.4.0-1|, then shame on me. But if a user misinterprets |3.4.0alpha1| then shame on them.<br>
<br>
I'm not sure how that would align with semver...</p>
</blockquote><p dir="auto">Erik already sent out some examples of ordering with semver. But it is worth noting that 3.4.0-1 *is* valid semver and the ordering would be 3.4.0-1 < 3.4.0-alpha<br>
<br>
So to prevent misinterpretation of 3.4.0-1, ASDF could either promise to always use something like alpha/beta/etc, use something else like PEP440 (I believe that grammar always requires an alphabetic character for pre-releases), or bake its own grammar.<br>
<br>
One thing that's nice about the semver grammar is its flexibility. I have some scripts that can generate a version string from a git repo that lets you easily order versions based on things like when they branched off the default branch. But if we want ASDF to disallow things like 3.4.0-1, I'm happy to build my own system that uses the new API to allow the use of semver strings.<br>
<br>
Another option is to choose something compatible with Debian's version strings. I'm having a little trouble grokking it at the moment, but it seems to be even more freeform than semver and adds an optional epoch prefix.</p>
</blockquote></div>
<div style="white-space:normal">
<p dir="auto">What might be nice would be to support a <em>subset</em> of semver by default -- not allowing the numerical prerelease flagged with <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">-</code> -- but do so in a way that is extensible.</p>
<p dir="auto">Here's my rationale: I would like to provide a relatively simple semantic versioning that is also compatible with automatically detecting and rejecting ill-formed version strings.</p>
<p dir="auto">So, for example, we could (by default!) split the version strings by <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">#\.</code> and <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">#\-</code> and <em>reject</em> any string bounded by <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">#\.</code> that is not numerical.</p>
<p dir="auto">We could demand, again by default, that the substring following the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">#\-</code> be of some constrained form: e.g., Greek letter name followed by optional numeral. For that matter, we could just say "hey, alpha and beta are enough" and reject anything but those two. That would be a nice alternative to having a big table of Greek letter names in ASDF!</p>
<p dir="auto">Finally, for those who want to really go for it, we could add a <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">:version-scheme</code> keyword to <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">defsystem</code>, which would initially default to <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">:unconstrained</code>, but then through the standard process of warning and then erroring, migrate to <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">:standard</code> (or perhaps <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">:asdf</code>) as the default, but let anyone who wants to make up their own versioning scheme. <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">semver</code> would be an obvious extension.</p>
<p dir="auto">Hm. That's a bit more complex than I had hoped, but it would mean ASDF systems would initially continue to work, it provides for some error checking, and a path to extension.</p>
</div>
</div>
</body>
</html>