scala-dev icon indicating copy to clipboard operation
scala-dev copied to clipboard

Release Scala 2.12.21

Open SethTisue opened this issue 9 months ago • 1 comments

Variables to be expanded in this template (or set and export them in a local terminal, so that you can copy/paste the commands below without replacing anything):

SCALA_VER_BASE="2.12.21"
SCALA_VER_SUFFIX=""
SCALA_SHA=b7cc68ac7c5b38f8e891fefa874b6404ab96b239
DIST_SHA=450fdb92d02224ada9fca536143265fbcaad7392
SCALA_VER="2.12.21"

Key links:

  • scala/scala milestone: https://github.com/scala/scala/milestones/2.12.21
  • scala/bug milestone: https://github.com/scala/bug/milestones/2.12.21
  • scala/scala-dev milestone: https://github.com/scala/scala-dev/milestones/2.12.21
  • Discourse topic: https://contributors.scala-lang.org/t/scala-2-12-21-release-planning/6753
  • release notes draft: https://github.com/scala/scala-dev/pull/922

N weeks before the release

  • [x] Wind down PR queue. There has to be enough time after the last (non-trivial) PR is merged and the next phase. The core of the eco-system needs time to prepare for the final!
  • [x] Triage scala/bug and scala/scala-dev tickets
  • [x] Create next scala/scala milestone, move the magical "Merge to 2.13.x" description to it (so Scabot uses it as default for new PRs), move pending PRs
  • [x] Create next scala/bug milestone, move pending issues
  • [x] Create next scala/scala-dev milestone, move pending issues
  • [x] Check PRs assigned to the milestone, also check WIP
  • [x] Announce expected release date and current nightly "release candidate" (nightly sha-mangled version) at https://scala-ci.typesafe.com/artifactory/scala-integration/ on https://contributors.scala-lang.org/c/announcements
  • [x] Also notify Scala Center advisory board members of the upcoming release, so they can help test if they want (Seth can handle this, if asked)

Release announcement / notes

  • [x] Review merged PRs, make sure release-notes label is applied appropriately
  • [x] PRs with release-notes label must have excellent title & description (title will be pasted literally in release note bullet list)
  • [x] Draft release notes (PR and self-merge, so others can comment there rather than on the commits)
    • Starting point: gh api --paginate -X GET search/issues -f q='repo:scala/scala is:pull-request is:merged milestone:2.12.14 label:release-notes' -q '.items[] | " * \(.title) ([#\(.number)](\(.html_url)) by [@\(.user.login)](\(.user.html_url)))"'
  • [x] On contributors thread, link to release note file and request feedback

N days before release

  • [x] Announce no more PRs will be merged unless last-minute regressions are found. Re-iterate current nightly sha version for testing.
  • [x] Community build
    • JDK 8: https://scala-ci.typesafe.com/job/scala-2.13.x-jdk8-integrate-community-build/????
    • JDK 11: https://scala-ci.typesafe.com/job/scala-2.13.x-jdk11-integrate-community-build/????
    • JDK 17: https://scala-ci.typesafe.com/job/scala-2.13.x-jdk17-integrate-community-build/????
    • JDK 21: https://scala-ci.typesafe.com/job/scala-2.13.x-jdk21-integrate-community-build/????
    • JDK 25: https://scala-ci.typesafe.com/job/scala-2.13.x-jdk25-integrate-community-build/????
  • [x] Green nightly builds on GitHub Actions: https://github.com/scala/scala/actions/runs/19667043954
  • [x] Check any merged PRs accidentally assigned to the next milestone in this branch, and re-assign them to this milestone
  • [x] Merge in any older release branch
  • [x] Check module versioning (is everything in versions.properties up to date?)
    • including make sure the version of scala-asm we're using is using latest ASM
  • ~On major release, bump PickleFormat version~
  • [x] Test on Akka customer codebase(s), if applicable
  • [x] Close the scala/scala and scala/bug milestones

Allow time for testing

How much time is sufficient? A week is a bare minimum. Two weeks is a better "normal" amount. We should also respect requests from Scala Center advisory board members, if they explicitly ask for additional testing time. (In the past, we sometimes only waited a day or two, but this was overly optimistic in presuming that people had been testing nightlies all along.)

Be mindful of others' schedules; even minor releases make work downstream (for Scala.js and Scala Native, for the Scala 3 team, for compiler plugin authors, and so on). And a botched release might make unexpected work for ourselves as well as for others. So it's better not to release on a Friday or even a Thursday, or too close to a major holiday. And it's best to release while everyone in both America and Europe is awake. (First thing in the morning in America is a good choice.)

Stage! (point of soft no-return)

Once sufficient time for community testing has passed, it's time to stage the release!

We call this "soft" no-return because even staged artifacts can end up in local caches and cause confusion.

  • [x] Trigger a custom build on travis
    • Select the correct branch
    • Custom config: before_script: export SCALA_VER_BASE=2.12.21 SCALA_VER_SUFFIX=
    • Check the build status on https://github.com/scala/scala/commits/2.13.x
    • If you get a failure from Sonatype (e.g., "Server redirected too many times"), you may need to recreate the traivis secrets for sonatype
  • [x] Create the scala/scala tag locally: git tag -s -m "Scala 2.12.21" v2.12.21 b7cc68ac7c5b38f8e891fefa874b6404ab96b239
  • [x] Create scala-dist tag locally: git tag -s -m "Scala 2.12.21" v2.12.21 450fdb92d02224ada9fca536143265fbcaad7392
  • [x] Sanity check jar/pom
    • https://central.sonatype.com/publishing
  • [x] Check that JARs haven't mysteriously bloated — compare sizes to previous release. We have no other backstop for this.

Release! (point of hard no-return)

"Hard" no-return because Maven Central is forever. Tags, too, should be treated as forever, even though they can technically be deleted and re-pushed.

  • [x] Push scala/scala tag: git push https://github.com/scala/scala.git v2.12.21
  • [x] Push scala/scala-dist tag: git push https://github.com/scala/scala-dist.git v2.12.21
  • [x] Publish the deployment on https://central.sonatype.com/publishing

Find the release on Maven Central

  • [x] https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.21/
  • [x] On GitHub, use "Create release from tag" button. Set the title to [WIP] Scala 2.12.21] and the release notes to Work in progress: this release is not yet announced. See https://contributors.scala-lang.org/t/?.
    • https://github.com/scala/scala/releases/tag/v2.12.21
    • this is required for the scala-dist jobs below to upload the artifacts
  • [x] Once the build is available, trigger three scala-dist jobs on travis (https://app.travis-ci.com/github/scala/scala-dist) with custom config. Must use full-length SHAs!
    • before_script: export version=2.12.21 scala_sha=b7cc68ac7c5b38f8e891fefa874b6404ab96b239 mode=release
      • scala-dist job: https://app.travis-ci.com/github/scala/scala-dist/builds/?
      • Downstream appveyor job: see https://ci.appveyor.com/project/scala/scala-dist/history
      • Downstream scala-dist-smoketest job: see https://app.travis-ci.com/github/scala/scala-dist-smoketest/builds
      • Once finished, check the artifacts at https://github.com/scala/scala/releases/tag/v2.12.21. Rename the .deb file to scala-SCALA_VER.deb (https://github.com/scala/scala-dev/issues/921).
    • before_script: export version=2.12.21 scala_sha=b7cc68ac7c5b38f8e891fefa874b6404ab96b239 mode=archives: https://app.travis-ci.com/github/scala/scala-dist/builds/?
    • before_script: export version=2.12.21 scala_sha=b7cc68ac7c5b38f8e891fefa874b6404ab96b239 mode=update-api: https://app.travis-ci.com/github/scala/scala-dist/builds/?

After everything is on Maven Central and the GitHub release

  • [x] Prepare PR to https://github.com/scala/scala-lang/ (using scala/make-release-notes, which requires the release on Maven Central and on the GitHub release)
    • _config.yml (update scalaversion or devscalaversion)
    • _data/scala-releases.yml
    • new files in _downloads and _posts
  • [x] Prepare PR to https://github.com/scala/docs.scala-lang/ (refer to PR from previous release as a guide) -_config.yml
    • api/all.md
    • overviews/FAQ/index.md
    • contribute/bug-reporting-guide.md
    • perhaps _overviews/jdk-compatibility/overview.md (online version: https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html)
  • [x] Pre-announce the release on https://contributors.scala-lang.org/c/announcements
  • [x] ~On major releases only: (manually) update the current symlink for the API docs~
    • ~https://github.com/scala/scala-dist/blob/2.13.x/scripts/jobs/release/website/update-api#L15~
  • [x] Check that the API docs are published
    • According to Fabien, there is a cron job running 3x / day (03:30, 12:20, 21:20) that syncs the files over to the web server
    • https://www.scala-lang.org/api/2.12.21/ (also https://www.scala-lang.org/api/2.13.x/) should have new version
    • if they don't show up, review the archives and update-api scala-dist job logs. ssh to chara.epfl.ch and poke around.

Prepare downstream

Wait for downstream

Before proceeding any further, wait for the ecosystem to catch up.

  • Downstream publishing:
    • [x] Wait for Scala.js to support the new release
    • [x] Wait for Scala Native to support the new release
    • [x] Wait for scalameta to publish
    • [x] Wait for scalafix to publish
    • [x] Wait for Metals to publish
    • [x] Wait for kind-projector to publish
    • [x] Wait for scoverage to publish
    • [x] Wait for scala-debug-adapter to publish
  • Downstream signoffs:
    • [x] Ask the Scala Center to sign off (Seb)
    • [x] Ask VirtusLab to sign off (Tomasz)

We have promised to wait 48 non-weekend hours, minimum.

If there are delays downstream, at some point it may make sense to go ahead and announce anyway, since news of the release will already be spreading in the community.

Announcements

  • [x] On the GitHub release, add the release notes
    • https://github.com/scala/scala/releases/tag/v2.12.21
  • [x] Merge the scala-lang PR and the docs.scala-lang.org PR
    • [x] wait for them to arrive on the websites and make sure they look okay
      • if the scala-lang changes don't show up, possible troubleshooting steps include:
        • see if https://scala-webapps.epfl.ch/jenkins/view/All/job/production_scala-lang.org-builder/ has run a job yet to actually publish the changes
        • see note above about permissions to trigger a job
  • [x] Scala Users discourse https://users.scala-lang.org
  • [x] Use Typefully to announce on these three platforms together:
  • [x] Discord: link to release notes in #links channel
    • [x] consider also saying something in #scala-contributors channel
  • [x] Unblock the release in Scala Steward by PRing an update to default.scala-steward.conf
  • [x] Add the release to SDKMAN
    • as per the documentation at https://sdkman.io/vendors
    • URL provided must be in .zip format, .tgz doesn't work
    • sample command: curl -X POST -H "Consumer-Key: xxx" -H "Consumer-Token: xxx" -H "Content-Type: application/json" -H "Accept: application/json" -d '{"candidate": "scala", "version": "2.13.18", "url": "https://github.com/scala/scala/releases/download/v2.13.18/scala-2.13.18.zip"}' https://vendors.sdkman.io/release
    • replace both xxxs with the credential information provided to Seth by Marco Vermeulen (marco at sdkman dot io)
    • [x] test afterwards with sdk list scala and sdk install scala <version> (these should work immediately once the POST succeeds)
    • to correct mistakes, PATCH and DELETE are also available
  • [x] Announce on https://reddit.com/r/scala

Afterwards

  • [x] sbt: if it's a 2.12.x release, open PR updating version
  • [x] Scala 3: open PR updating version:
    • two places to update:
      • project/Build.scala
      • community-build/community-projects/stdLib213 (after updating https://github.com/dotty-staging/scala to the release tag)
    • https://github.com/scala/scala3/pulls
  • [x] Scastie: open PR adding new version (modeled on https://github.com/scalacenter/scastie/pull/538)
    • note that the PR won't be mergeable until kind-projector has published; and if kind-projector's version number has changed, ScalaTarget.scala will need updating
  • ~If it's a major release:~
    • ~Update latestSpecVersion in spec/_config.yml on the old branch, so that spec is marked as no longer current~
    • ~Ditto for the nightly build and spec links in _data/footer.yml and _data/doc-nav-header.yml on docs.scala-lang.org~
  • (Akka) Fortify:
    • [ ] Publish scala-fortify-plugin
    • [ ] Update scala-fortify
    • [ ] Update scala-fortify-docs
  • [ ] (Akka) Notify eng-updates
  • [x] Create a scala/scala PR to:
    • [x] update starr.version in /versions.properties
    • [x] update Global / baseVersion in /build.sbt
    • [x] update mimaReferenceVersion in /project/MimaFilters.scala
    • [x] clear out mimaFilters in /project/MimaFilters.scala, except the one(s) labeled "KEEP"
    • ~spec/_config.yml, if it's a major release~
  • [x] Once that PR is merged and a new nightly has published, ./advance scala (and PR it) in the community build
  • [x] Update https://contributors.scala-lang.org thread
  • [x] Create https://contributors.scala-lang.org thread for the next release

You're done!

  • [ ] Close this ticket and close the scala-dev milestone

SethTisue avatar Mar 24 '25 23:03 SethTisue

I finished most of the remaining items

SethTisue avatar Dec 11 '25 22:12 SethTisue