Fixes failing tests

Tests were failing because of bintray migration. Lightbend forgot
to move dependencies. This fixes it by upgrading to more modern
library dependencies.
This commit is contained in:
Amina Adewusi 2021-04-30 16:37:07 +01:00
parent 3ef1c5508b
commit b27ea623a5
4 changed files with 59 additions and 69 deletions

View File

@ -1,18 +1,11 @@
ThisBuild / useCoursier := false ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.13.5"
version := "0.1.0-SNAPSHOT"
organization := "default"
name := "whatDependsOn" name := "whatDependsOn"
scalaVersion := "2.9.1"
resolvers += "typesafe maven" at "https://repo.typesafe.com/typesafe/maven-releases/"
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
"com.codahale" % "jerkson_2.9.1" % "0.5.0", "co.fs2" %% "fs2-core" % "1.0.4",
"org.codehaus.jackson" % "jackson-mapper-asl" % "1.9.10" // as another version of asl "org.typelevel" %% "cats-effect" % "3.1.0"
) )
val check = TaskKey[Unit]("check") val check = TaskKey[Unit]("check")
@ -23,36 +16,36 @@ check := {
require(sanitize(expected) == sanitize(output), s"Tree should have been [\n${sanitize(expected)}\n] but was [\n${sanitize(output)}\n]") require(sanitize(expected) == sanitize(output), s"Tree should have been [\n${sanitize(expected)}\n] but was [\n${sanitize(output)}\n]")
val withVersion = val withVersion =
(whatDependsOn in Compile) (Compile / whatDependsOn)
.toTask(" org.codehaus.jackson jackson-core-asl 1.9.11") .toTask(" org.typelevel cats-core_2.13 2.6.0")
.value .value
val expectedGraphWithVersion = val expectedGraphWithVersion = {
"""org.codehaus.jackson:jackson-core-asl:1.9.11 """org.typelevel:cats-core_2.13:2.6.0 [S]
| +-com.codahale:jerkson_2.9.1:0.5.0 [S] |+-org.typelevel:cats-effect-kernel_2.13:3.1.0 [S]
| | +-default:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] |+-org.typelevel:cats-effect-std_2.13:3.1.0 [S]
|| +-org.typelevel:cats-effect_2.13:3.1.0 [S]
|| +-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]
|| ||
| +-org.codehaus.jackson:jackson-mapper-asl:1.9.11 |+-org.typelevel:cats-effect_2.13:3.1.0 [S]
| +-com.codahale:jerkson_2.9.1:0.5.0 [S] |+-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]""".stripMargin
| | +-default:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] }
| |
| +-default:whatdependson_2.9.1:0.1.0-SNAPSHOT [S]
| """.stripMargin
checkOutput(withVersion, expectedGraphWithVersion) checkOutput(withVersion.trim, expectedGraphWithVersion.trim)
val withoutVersion = val withoutVersion =
(whatDependsOn in Compile) (Compile / whatDependsOn)
.toTask(" org.codehaus.jackson jackson-mapper-asl") .toTask(" org.typelevel cats-core_2.13")
.value .value
val expectedGraphWithoutVersion = val expectedGraphWithoutVersion =
"""org.codehaus.jackson:jackson-mapper-asl:1.9.11 """org.typelevel:cats-core_2.13:2.6.0 [S]
| +-com.codahale:jerkson_2.9.1:0.5.0 [S] |+-org.typelevel:cats-effect-kernel_2.13:3.1.0 [S]
| | +-default:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] |+-org.typelevel:cats-effect-std_2.13:3.1.0 [S]
|| +-org.typelevel:cats-effect_2.13:3.1.0 [S]
|| +-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]
|| ||
| +-default:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] |+-org.typelevel:cats-effect_2.13:3.1.0 [S]
| |+-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]""".stripMargin
|org.codehaus.jackson:jackson-mapper-asl:1.9.10 (evicted by: 1.9.11)
| +-default:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] checkOutput(withoutVersion.trim, expectedGraphWithoutVersion.trim)
| """.stripMargin
checkOutput(withoutVersion, expectedGraphWithoutVersion)
} }

View File

@ -1,13 +1,11 @@
ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.9.1" ThisBuild / scalaVersion := "2.13.5"
name := "whatDependsOn" name := "whatDependsOn"
resolvers += "typesafe maven" at "https://repo.typesafe.com/typesafe/maven-releases/"
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
"com.codahale" % "jerkson_2.9.1" % "0.5.0", "co.fs2" %% "fs2-core" % "1.0.4",
"org.codehaus.jackson" % "jackson-mapper-asl" % "1.9.10" // as another version of asl "org.typelevel" %% "cats-effect" % "3.1.0"
) )
val check = TaskKey[Unit]("check") val check = TaskKey[Unit]("check")
@ -18,37 +16,36 @@ check := {
require(sanitize(expected) == sanitize(output), s"Tree should have been [\n${sanitize(expected)}\n] but was [\n${sanitize(output)}\n]") require(sanitize(expected) == sanitize(output), s"Tree should have been [\n${sanitize(expected)}\n] but was [\n${sanitize(output)}\n]")
val withVersion = val withVersion =
(whatDependsOn in Compile) (Compile / whatDependsOn)
.toTask(" org.codehaus.jackson jackson-core-asl 1.9.10") .toTask(" org.typelevel cats-core_2.13 2.6.0")
.value .value
val expectedGraphWithVersion = val expectedGraphWithVersion = {
"""org.codehaus.jackson:jackson-core-asl:1.9.10 """org.typelevel:cats-core_2.13:2.6.0 [S]
| +-com.codahale:jerkson_2.9.1:0.5.0 [S] |+-org.typelevel:cats-effect-kernel_2.13:3.1.0 [S]
| | +-whatdependson:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] |+-org.typelevel:cats-effect-std_2.13:3.1.0 [S]
|| +-org.typelevel:cats-effect_2.13:3.1.0 [S]
|| +-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]
|| ||
| +-org.codehaus.jackson:jackson-mapper-asl:1.9.10 |+-org.typelevel:cats-effect_2.13:3.1.0 [S]
| +-com.codahale:jerkson_2.9.1:0.5.0 [S] |+-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]""".stripMargin
| | +-whatdependson:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] }
| |
| +-whatdependson:whatdependson_2.9.1:0.1.0-SNAPSHOT [S]
| """.stripMargin
checkOutput(withVersion, expectedGraphWithVersion) checkOutput(withVersion.trim, expectedGraphWithVersion.trim)
val withoutVersion = val withoutVersion =
(whatDependsOn in Compile) (Compile / whatDependsOn)
.toTask(" org.codehaus.jackson jackson-mapper-asl") .toTask(" org.typelevel cats-core_2.13")
.value .value
val expectedGraphWithoutVersion = val expectedGraphWithoutVersion =
"""org.codehaus.jackson:jackson-mapper-asl:1.9.10 """org.typelevel:cats-core_2.13:2.6.0 [S]
| +-com.codahale:jerkson_2.9.1:0.5.0 [S] |+-org.typelevel:cats-effect-kernel_2.13:3.1.0 [S]
| | +-whatdependson:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] |+-org.typelevel:cats-effect-std_2.13:3.1.0 [S]
|| +-org.typelevel:cats-effect_2.13:3.1.0 [S]
|| +-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]
|| ||
| +-whatdependson:whatdependson_2.9.1:0.1.0-SNAPSHOT [S] |+-org.typelevel:cats-effect_2.13:3.1.0 [S]
| |+-whatdependson:whatdependson_2.13:0.1.0-SNAPSHOT [S]""".stripMargin
|org.codehaus.jackson:jackson-mapper-asl:[1.9.0,2.0.0) (evicted by: 1.9.10)
| +-com.codahale:jerkson_2.9.1:0.5.0 [S] checkOutput(withoutVersion.trim, expectedGraphWithoutVersion.trim)
| +-whatdependson:whatdependson_2.9.1:0.1.0-SNAPSHOT [S]
| """.stripMargin
checkOutput(withoutVersion, expectedGraphWithoutVersion)
} }