From Fedora Project Wiki
(New page is just the notes)
No edit summary
Line 65: Line 65:
There are two main issues with tilde:
There are two main issues with tilde:


* It's one of a pair of operators you need. But we do not have its counterpart (shown as ':' below):
* It's one of a pair of operators., but we do not have its counterpart (shown as ':' below):
** 1.2 < 1.2.1~1 < 1.2.1~2 < 1.2.1 (X~Z is less than all possible X)
** 1.2 < 1.2.1~1 < 1.2.1~2 < 1.2.1 (X~Z is less than all possible X)
** 1.2 < 1.2:1 < 1.2:2 < 1.2.1 (X:Z is greater than X but less than all possible X.Y).
** 1.2 < 1.2:1 < 1.2:2 < 1.2.1 (X:Z is greater than X but less than all possible X.Y).

Revision as of 23:36, 9 November 2018

Notes for the tilde versioning drafts

There are two drafts:

Neither draft is as simple as the current guidelines but the second is a relatively small addition. I don't know if either is more acceptable to anyone in particular.

The fundamental issues I'm trying to solve:

  • People really want to use tilde because for some (limited but common) cases it makes things simpler.
  • We need something which is relatively simple and "works" for the range of problems generally seen by people.
  • It would be nice to be prescriptive for weirder cases.
  • Keeping Release: simple is really appealing.

With that in mind, here's the problem: these two simple, common cases are at odds with each other:

  • Moving from a post-release snapshot to a new version.
  • Moving between upstream tagged prereleases and git snapshots.

Moving between post-release snapshots and tagged releases

Take this version sequence:

  • (1.2, git snapshot, 1.2.1)

Current guidelines give:

  • (1.2-1, 1.2-2.20180101.abcde, 1.2.1-1)

Keeping Release: pristine sounds great, but....

  • (1.2-1, 1.2+20180101.abcde, 1.2.1-1 + Epoch)

So push snapshot information into Release:

  • (1.2-1, 1.2-2.20180101.abcde, 1.2.1-1)

So obviously, uh, we have no choice but to keep our current Release: mangling here.

If we had some magical operator ':' or something which compared like this: (1.2-1 < 1.2:20180101.abcde < 1.2.1-1) then life would be golden, but I don't think it exists.

Moving between tagged prereleases and git snapshots

Take this version sequence:

  • (1.2beta1, git snapshot, 1.2beta2, git snapshot, 1.2)

Current guidelines give:

  • (1.2-0.1.beta1, 1.2-0.2.20180101.abcde-1, 1.2-0.3.beta2, 1.2-0.3.20180102.fghij-1, 1.2-1) (0)

With keeping Release: pristine, you have to insert a digit and it's simplest to just start when you introduce a snapshot:

  • (1.2~beta1-1, 1.2~1.20180101.abcde-1, 1.2~2.beta2-1, 1.2~3.20180102.fghij-1, 1.2-1) (1)

Not inserting the digit until necessary does work, but seems easy to get wrong and hard to describe:

  • (1.2~beta1-1, 1.2~20180101.abcde-1, 1.2~3.beta2-1 ???, 1.2~4.20180102.fghij-1, 1.2-1) (2)

Pushing the snapshot information into Release gives:

  • (1.2~beta1-1, 1.2~beta1-2.20180101.abcde, 1.2~beta2-1, 1.2~beta2-2.20180102.fghij, 1.2-1) (3)

Now, to me none of these look particularly bad but it seems that #1 is the simplest that allows tilde. I'm calling the third one the "post-prerelease snapshot" option.

What if you knew upstream was going to put out 1.2 and package a snapshot, but then upstream releases a beta?

  • (1.2 git snapshot, 1.2beta1)

Current guidelines of course work fine:

  • (1.2-0.1.20180101.abcde, 1.2-0.2.beta1)

Keeping "pristine Release" with requiring the extra digit on snapshots works:

  • (1.2~1.20180101.abcde, 1.2~2.beta1)

Without the requirement for the digit on snapshots it "works" but is less pleasant:

  • (1.2~20180101.abcde, 1.2~3.beta1)

With snapshot information in release, you can't add the beta1 tag anywhere.

  • (1.2-1.20180101.abcde, ???) or (1.2-20180101.abcde, ???)

Conceptual issues with tilde

There are two main issues with tilde:

  • It's one of a pair of operators., but we do not have its counterpart (shown as ':' below):
    • 1.2 < 1.2.1~1 < 1.2.1~2 < 1.2.1 (X~Z is less than all possible X)
    • 1.2 < 1.2:1 < 1.2:2 < 1.2.1 (X:Z is greater than X but less than all possible X.Y).
  • There may be a point where upstream has decided what to call the next release, but hasn't given you anything to put after the ~.

What to do?

I see four options:

  1. Don't change anything.
  2. Allow tilde but keep snapshot information in Release:. Requires the odd "post-prerelease snapshot" thing if you ever go from a snapshot to a prerelease. Forbid the packaging of tagged prereleases if prerelease snapshots for the same version were packaged.
  3. Allow tilde. Keep post-release snapshot information in Release:. Keep prerelease snapshot information in Version.
  4. Allow tilde, with post-release info in Release and prerelease info in a place decided by whether you ever intend to package snapshots.

Since people have declared that the first option is simply something they will ignore because they want tilde so much.

The second option just seems unreasonable.

The third option seems... inconsistent but at least possible to describe.

The fourth option is simply insane, but seems to be what the people who want tilde say because it appears they don't ever intend to package prerelease snapshots and don't care about that use case.

One thing is clear: allowing tilde does not simplify the guidelines. It does make some specific versioning cases look nicer. When you completely ignore the existence of snapshots, tilde certainly makes loads of sense.