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

Running Scala Steward on a repo at the Guardian #7

Open
rtyley opened this issue Jun 12, 2024 · 0 comments
Open

Running Scala Steward on a repo at the Guardian #7

rtyley opened this issue Jun 12, 2024 · 0 comments

Comments

@rtyley
Copy link
Member

rtyley commented Jun 12, 2024

See the instructions at:

Minimum requirements

You don't need to use Java 21 LTS (ie #8), but the project does need to be able to build with it (due to guardian/scala-steward-public-repos#67). This means you need at least:

  • Scala: 2.12.18+, 2.13.11+, 3.3.1+
  • sbt: 1.9.0+
emdash-ie added a commit to guardian/dynamo-db-switches that referenced this issue Aug 1, 2024
This repository recently caused scala-steward to fail, because it
doesn’t currently meet the minimum required sbt and scala versions for
scala steward to work. (Those versions are outlined in [this
issue](guardian/maintaining-scala-projects#7).

This commit updates the sbt version in use to the newest versions and
the two scala versions in use to the latest patch versions for those
minor versions.

This should be sufficient to let scala-steward run on this repository: I
have managed to successfully run `sbt +test` locally with these changes
using Java 21.
emdash-ie added a commit to guardian/dynamo-db-switches that referenced this issue Aug 1, 2024
This repository recently caused scala-steward to fail, because it
doesn’t currently meet the minimum required sbt and scala versions for
scala steward to work. (Those versions are outlined in [this
issue](guardian/maintaining-scala-projects#7).

This commit updates the sbt version in use to the newest versions and
the two scala versions in use to the latest patch versions for those
minor versions.

This should be sufficient to let scala-steward run on this repository: I
have managed to successfully run `sbt +test` locally with these changes
using Java 21.
emdash-ie added a commit to guardian/discussion-avatar that referenced this issue Aug 7, 2024
Scala Steward [requires higher minimum versions of sbt and scala than
this repository is
using](guardian/maintaining-scala-projects#7),
and I think this is why it [recently broke on this
repository](https://github.com/guardian/scala-steward-public-repos/actions/runs/10265200458/job/28400891950).

In this commit I’ve attempted to update to newer scala and sbt versions
in the hope that it would be a straightforward update. Unfortunately
there’s a clash, as a number of dependencies now depend on
org.scala-lang.modules:scala-xml at incompatible versions with the
compiler’s dependency. (I.e. the compiler depends on
org.scala-lang.modules:scala-xml_2.12:2.2.0, but some dependencies here
depend on org.scala-lang.modules:scala-xml_2.12:1.x.)

This is the initial sbt output when you update scala and sbt:

> * org.scala-lang.modules:scala-xml_2.12:2.2.0 (early-semver) is selected over {1.3.0, 1.0.6}
>     +- org.scala-lang:scala-compiler:2.12.19              (depends on 2.2.0)
>     +- org.scalaz:scalaz-core_2.12:7.1.17                 (depends on 1.0.6)
>     +- org.scalatra:scalatra_2.12:2.6.3                   (depends on 1.0.6)
>     +- org.json4s:json4s-core_2.12:3.5.2                  (depends on 1.0.6)
>     +- net.liftweb:lift-json_2.12:3.5.0                   (depends on 1.3.0)

Unfortunately, the newest full release of scalatra_2.12 on maven central
is 2.8.4, which still depends on v1 of scala-xml. Also, that lift-json
dependency is a transitive dependency of com.gu.identity:identity-crypto
and others.
emdash-ie added a commit to guardian/fezziwig that referenced this issue Sep 6, 2024
I’d like to enable [Scala
Steward](https://github.com/guardian/scala-steward) on this repository,
to help us keep on top of dependency updates. According to [Running
Scala Steward on a repo at the
Guardian](guardian/maintaining-scala-projects#7),
this requires scala version 2.13.11 or greater. I’ve chosen 2.13.14 here
because it’s the newest version available.
rtyley added a commit to guardian/tagmanager that referenced this issue Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant