Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify TASTy versions before releases #13447

Open
bishabosha opened this issue Sep 2, 2021 · 6 comments
Open

Verify TASTy versions before releases #13447

bishabosha opened this issue Sep 2, 2021 · 6 comments
Labels
area:infrastructure area:tasty-format issues relating to TASTy as a portable standard itype:enhancement

Comments

@bishabosha
Copy link
Member

bishabosha commented Sep 2, 2021

We need to verify before releases that TASTy is set to a correct version.

Here is a very simplistic approach that could be automated to ensure that
we don't accidentally release experimental TASTy in a stable release,
or stable TASTy in a Nightly release:

(mStable refers to the TastyFormat.MinorVersion of the most recent stable Scala release)

if MajorBump:
  raise "are you really sure?"
else if Nightly or (MinorBump and RC or Milestone):
  assert TastyFormat.ExperimentalVersion > 0
  assert TastyFormat.MinorVersion > mStable
else: # release is final
  assert ExperimentalVersion == 0
  if PatchBump:
    assert TastyFormat.MinorVersion == mStable
  else if MinorBump:
    assert TastyFormat.MinorVersion == mStable + 1

with the proposal above, the only clear weak link is that
TastyFormat.MinorVersion should be increased in a nightly release
before releasing the next Minor, but I propose that this is
difficult to miss as it should be clear that
merging a needs-minor-release PR needs a TASTy version bump

A next step would be to automate the weak-link I described above.

A simple way could be automating the creation of an issue whenever
a needs-minor-release PR is merged, otherwise it will probably
be too complex to analyse automatically (
requires analysing TreePickler, TastyFormat, API additions, Code synthesis changes, more)

@bishabosha bishabosha added itype:bug area:infrastructure area:tasty-format issues relating to TASTy as a portable standard labels Sep 2, 2021
@sjrd
Copy link
Member

sjrd commented Sep 2, 2021

M and RC versions should still be experimental. Imagine if a serious blocker is discovered during the RC cycle that requires a TASTy format change to fix it. If you've already used the non-experimental TASTy version in the RC release, you're stuck.

So the first line of the script above should be changed to

if Nightly or Milestone or RC or anything with a '-' in it:

@bishabosha
Copy link
Member Author

M and RC versions should still be experimental.

My suggestion then here is that the experimental should at least be increased within the same minor version, to account for new needs-minor-release PR's that were merged

@bishabosha
Copy link
Member Author

bishabosha commented Sep 2, 2021

So with the rule of RCs having experimental versions then this is what the future of releases could look like - I have included examples of both a patch release and a minor release.

each row represents the releases made each 6 weeks

Edit: removed diagram - see #13447 (comment) for updated diagram

@bishabosha
Copy link
Member Author

I have updated the diagram above with the potential future of the current state of things - the most tricky part is RCs for patch releases, if we insist on them having experimental TASTy then either we keep the same minor version and 3.1.1-RC1 can't depend on 3.1.0, or we have to do a weird step where we go to the next TASTy minor series and downgrade again, e.g. going from 28.2-1 for 3.1.1-RC1 to 28.1-0 for 3.1.1. What do you think @sjrd @smarter

@smarter
Copy link
Member

smarter commented Sep 3, 2021

I think it's fine for 3.1.1-RC1 to use the same tasty version as 3.1.0 (since the tasty format should be exactly the same between these two versions) as long as 3.1.1-RC1 doesn't let you use experimental features like a nightly does, but you still need to move from 28.2-1 to 28.1-0 when branching release-3.1.1 from master.

@bishabosha
Copy link
Member Author

bishabosha commented Sep 3, 2021

ok here is an updated diagram with past and future - hopefully this makes a coherent model:


        Stable             Beta             Nightly

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ┌───────────────┐                   ┌───────────────┐
   │ T: 28.0-0     │                   │ T: 28.1-1     │
   │ S: 3.0.0      │                   │ S: 3.0.1-NI-a │
   └───────────────┘ ┌───────────────┐ └───────────────┘
           │         │ T: 28.0-0     │         │
           │         │ S: 3.0.1-RC1  │         ▼
           │         └───────────────┘ ┌───────────────┐
           │                 │         │ T: 28.1-1     │
           │                 ▼         │ S: 3.0.2-NI-b │
           │         ┌───────────────┐ └───────────────┘
           │         │ T: 28.0-0     │         │
           ▼         │ S: 3.0.1-RC2  │         │
   ┌───────────────┐ └───────────────┘         │
   │ T: 28.0-0     │         │                 │
   │ S: 3.0.1      │         ▼                 │
   └───────────────┘ ┌───────────────┐         │
           │         │ T: 28.0-0     │         │
           │         │ S: 3.0.2-RC1  │         ▼
           │         └───────────────┘ ┌───────────────┐
           │                 │         │ T: 28.2-1     │
           │                 ▼         │ S: 3.1.0-NI-c │
           │         ┌───────────────┐ └───────────────┘
           │         │ T: 28.0-0     │         │
           ▼         │ S: 3.0.2-RC2  │         │
   ┌───────────────┐ └───────────────┘         │
   │ T: 28.0-0     │         │                 │
   │ S: 3.0.2      │         ▼                 │
   └───────────────┘ ┌───────────────┐         │
           │         │ T: 28.2-1     │         │
           │         │ S: 3.1.0-RC1  │         ▼
           │         └───────────────┘ ┌───────────────┐
           │                 │         │ T: 28.2-1     │
           │                 │         │ S: 3.1.1-NI-d │
           │      ┏━━━━━━━━┓ │         └───────────────┘
           │      ┃  past  ┃ │                 │
▣━━━━━━━━━━╋━━━━━━┻━━━━━━━━┻━╋━┳━━━━━━━━┳━━━━━━╋━━━━━━━━━▣
           │                 │ ┃ future ┃      │
           │                 │ ┗━━━━━━━━┛      │
           │                 ▼                 │
           │         ┌───────────────┐         │
           │         │ T: 28.1-2     │         │
           ▼         │ S: 3.1.0-RC2  │         │
   ┌───────────────┐ └───────────────┘         │
   │ T: 28.1-0     │         │                 │
   │ S: 3.1.0      │         ▼                 │
   └───────────────┘ ┌───────────────┐         │
           │         │ T: 28.1-0     │         │
           │         │ S: 3.1.1-RC1  │         ▼
           │         └───────────────┘ ┌───────────────┐
           │                 │         │ T: 28.3-1     │
           ▼                 │         │ S: 3.2.0-NI-e │
   ┌───────────────┐         │         └───────────────┘
   │ T: 28.1-0     │         │                 │
   │ S: 3.1.1      │         ▼                 │
   └───────────────┘ ┌───────────────┐         │
           │         │ T: 28.2-2     │         │
           │         │ S: 3.2.0-RC1  │         ▼
           │         └───────────────┘ ┌───────────────┐
           │                 │         │ T: 28.3-1     │
           │                 ▼         │ S: 3.2.1-NI-f │
           │         ┌───────────────┐ └───────────────┘
           │         │ T: 28.2-2     │
           ▼         │ S: 3.2.0-RC2  │
   ┌───────────────┐ └───────────────┘
   │ T: 28.2-0     │
   │ S: 3.2.0      │
   └───────────────┘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:infrastructure area:tasty-format issues relating to TASTy as a portable standard itype:enhancement
Projects
None yet
Development

No branches or pull requests

4 participants