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

Incorrect library update

Open PawelJ-PL opened this issue 5 years ago • 3 comments
trafficstars

Hi,

I've noticed that Scala Steward is trying to bump incorrect library. It generated MR in Gitlab with title Update async-http-client-backend-cats, ... to 2.2.9 from branch update/async-http-client-backend-cats-2.2.9, so it means that it will update async-http-client-backend-cats to version 2.2.9 from version 2.2.0

But it generated following diff:

   val cats = Seq(
-      "org.typelevel" %% "cats-core" % "2.2.0",
-      "org.typelevel" %% "cats-effect" % "2.2.0",
+      "org.typelevel" %% "cats-core" % "2.2.9",
+      "org.typelevel" %% "cats-effect" % "2.2.9",
       "com.olegpy" %% "meow-mtl-core" % "0.4.1" % "test"
    )

which is incorrect, because it is going to update packages cats-core and cats-effect to version 2.2.9 (which doesn't exist)

PawelJ-PL avatar Oct 29 '20 11:10 PawelJ-PL

Thanks for the report, @PawelJ-PL. Could you also show how the version of async-http-client-backend-cats is defined in your build.

fthomas avatar Oct 29 '20 14:10 fthomas

Sure. Sttp client dependencies:

val sttpClient = Seq(
    "com.softwaremill.sttp.client" %% "async-http-client-backend-cats",
    "com.softwaremill.sttp.client" %% "circe"
  ).map(_ % "2.2.0")

PawelJ-PL avatar Oct 29 '20 14:10 PawelJ-PL

Ok, your definition of sttpClient is one of the reason why Scala Steward bumped the cats-core and cats-effect versions instead of the sttp version. It currently cannot update the sttp version because there is nothing on the line ).map(_ % "2.2.0") that associates this version with sttp. This is a current limitation of Scala Steward. It would have updated it if the version were on the same line as the ModuleIDs.

fthomas avatar Oct 30 '20 14:10 fthomas