Skip to content

Verify TASTy versions before releases #13447

Closed
@bishabosha

Description

@bishabosha

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions