guardian / facia-scala-client

Low level client for the Facia JSON API
Other
2 stars 1 forks source link

Fix release so that it does not attempt to use Scala 2.12 #320

Closed rtyley closed 3 months ago

rtyley commented 3 months ago

After https://github.com/guardian/facia-scala-client/pull/318 dropped support for Scala 2.12, release 8.0.1 correctly no longer published Scala 2.12 artifacts, but unfortunately the 'root' project (which does not have any code!) was still defaulting to using Scala 2.12, because that is the default sbt uses if no scalaVersion is set.

The next time we tried to do a release (https://github.com/guardian/facia-scala-client/pull/319#issuecomment-2263535032) the automated-compatibility checking failed, because it saw that one project was using Scala 2.12, and so it attempted to download all the non-existent Scala 2.12 artifacts for release 8.0.1[^1] - and failed.

To fix this, we can simply ensure that all modules in this sbt build default to Scala 2.13, not 2.12 - ie particularly, the 'root' module!

Testing

We ran a preview release on this PR, and the automated-compatibility checking succeeded 👍 :

image

[^1]: This behaviour seems like a bug in sbt-version-policy?! sbt-version-policy is already aware of the publish / skip := true flag, so should know that root does not have any artifacts...

gu-scala-library-release[bot] commented 3 months ago

@rtyley has published a preview version of this PR with release workflow run #30, based on commit 6574ed36b79d042aae135058f84898fd9eef8ef2:

8.0.2-PREVIEW.fix-release-process-so-that-it-does-not-attempt-to-use-scala-212.2024-08-02T1015.6574ed36

Want to make another preview release? Click 'Run workflow' in the [GitHub UI](https://github.com/guardian/facia-scala-client/actions/workflows/release.yml), specifying the fix-release-process-so-that-it-does-not-attempt-to-use-scala-2.12 branch, or use the [GitHub CLI](https://cli.github.com/) command: gh workflow run release.yml --ref fix-release-process-so-that-it-does-not-attempt-to-use-scala-2.12
Want to make a full release after this PR is merged? Click 'Run workflow' in the [GitHub UI](https://github.com/guardian/facia-scala-client/actions/workflows/release.yml), leaving the branch as the default, or use the [GitHub CLI](https://cli.github.com/) command: gh workflow run release.yml