Skip to content

Commit

Permalink
Try updating sbt and scala to fix Scala Steward
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emdash-ie committed Aug 7, 2024
1 parent 5f51075 commit 770bfb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ enablePlugins(
organization := "com.gu"
name := "avatar-api"
version := "1.0"
scalaVersion := "2.12.8"
scalaVersion := "2.12.19"

val ScalatraVersion = "2.6.3"
val ScalatraVersion = "2.8.4"
val jettyVersion = "9.4.53.v20231009"
val json4sVersion = "3.5.2"
val logbackVersion = "1.2.13"
val logstashEncoderVersion = "7.3"
val servletApiVersion = "3.1.0"
val scalazVersion = "7.1.17"
val scalazVersion = "7.3.8"
val identityVersion = "4.31"
val typesafeConfigVersion = "1.2.1"
val amazonawsVersion = "1.12.668"
Expand Down
2 changes: 1 addition & 1 deletion api/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.3
sbt.version=1.10.1

0 comments on commit 770bfb1

Please sign in to comment.