akka-grpc icon indicating copy to clipboard operation
akka-grpc copied to clipboard

Sbt version conflict on scala-java8-compat.

Open counter2015 opened this issue 3 years ago • 2 comments

Versions used

Akka grpc version: 2.1.4

// plugins.sbt
addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "2.1.4")

Expected Behavior

It should compile well with this dependency.

val sttpClient = Seq(
    "com.softwaremill.sttp.client3" %% "core"                           %  "3.6.2",
    "com.softwaremill.sttp.client3" %% "async-http-client-backend-zio1" %  "3.6.2",
    "com.softwaremill.sttp.client3" %% "circe"                          %  "3.6.2"
  )

Actual Behavior

sbt found version conflict.

found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error] 
[error] 	* org.scala-lang.modules:scala-java8-compat_2.13:1.0.2 (early-semver) is selected over 0.9.0
[error] 	    +- com.softwaremill.sttp.client3:core_2.13:3.6.2      (depends on 1.0.2)
[error] 	    +- com.typesafe.akka:akka-actor_2.13:2.6.9            (depends on 0.9.0)
[error] 

Relevant logs

The conflict is lead by com.lightbend.akka.grpc:akka-grpc-runtime_2.13:2.1.4

Here is the part of output of sbt dependencyTree

info]   | +-com.lightbend.akka.grpc:akka-grpc-runtime_2.13:2.1.4 [S]
[info]   | | +-com.google.protobuf:protobuf-java:3.19.4
[info]   | | +-com.thesamet.scalapb:scalapb-runtime_2.13:0.11.10 [S]
[info]   | | | +-com.google.protobuf:protobuf-java:3.19.2 (evicted by: 3.19.4)
[info]   | | | +-com.google.protobuf:protobuf-java:3.19.4
[info]   | | | +-com.thesamet.scalapb:lenses_2.13:0.11.10 [S]
[info]   | | | | +-org.scala-lang.modules:scala-collection-compat_2.13:2.6.0 (evicted..
[info]   | | | | +-org.scala-lang.modules:scala-collection-compat_2.13:2.7.0 [S]
[info]   | | | | 
[info]   | | | +-org.scala-lang.modules:scala-collection-compat_2.13:2.6.0 (evicted b..
[info]   | | | +-org.scala-lang.modules:scala-collection-compat_2.13:2.7.0 [S]
[info]   | | | 
[info]   | | +-com.typesafe.akka:akka-discovery_2.13:2.6.9 [S]
[info]   | | | +-com.typesafe.akka:akka-actor_2.13:2.6.9 [S]
[info]   | | |   +-com.typesafe:config:1.4.0 (evicted by: 1.4.2)
[info]   | | |   +-com.typesafe:config:1.4.2
[info]   | | |   +-org.scala-lang.modules:scala-java8-compat_2.13:0.9.0 [S]

https://mvnrepository.com/artifact/com.lightbend.akka.grpc/akka-grpc-runtime_2.13/2.1.4 image

Would it be better to update the versions of all components that akka-grpc used ?

counter2015 avatar Jun 21 '22 04:06 counter2015

This was updated in Akka 2.6.16 (https://github.com/akka/akka/pull/30375), and that might be a good reason to update the required Akka version in Akka gRPC.

Would you be interested in preparing a PR?

raboof avatar Jun 21 '22 08:06 raboof

@raboof I will try to submit a PR this week.

counter2015 avatar Jun 21 '22 09:06 counter2015

sbt-akka-grpc 2.1.5 resolve this

counter2015 avatar Aug 23 '22 06:08 counter2015