0
votes

The following is a section of the build.sbt file that I recently added to my project to build an API for the application.

libraryDependencies ++= Seq(
  "com.chuusai" %% "shapeless" % "2.3.1"
)

libraryDependencies ++= {
  val sprayVersion = "1.3.1"
  val akkaVersion = "2.3.4"
  Seq(
    "io.spray" % "spray-can" % sprayVersion,
    "io.spray" % "spray-routing" % sprayVersion,
    "io.spray" % "spray-testkit" % sprayVersion,
    "io.spray" % "spray-client" % sprayVersion,
    "io.spray" %% "spray-json"  % "1.3.1",
    "com.typesafe.akka" %% "akka-actor" % akkaVersion,
    "com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
    "com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
    "ch.qos.logback" % "logback-classic" % "1.0.12",
    "org.scalatest" %% "scalatest" % "3.0.4" % "test"
  )
}

Although, when importing the libraries the following errors are generated.

[error] (*:update) Conflicting cross-version suffixes in: com.chuusai:shapeless, com.typesafe.akka:akka-actor, com.typesafe.akka:akka-testkit
[error] (*:ssExtractDependencies) Conflicting cross-version suffixes in: com.chuusai:shapeless, com.typesafe.akka:akka-actor, com.typesafe.akka:akka-testkit

A suggestion for the suitable libraries, having compatibility is highly appreciated. I'm using Spark 2.2.0, Scala 2.11.11.

1
Found the combination.TheShark

1 Answers

0
votes

The combination should be :

libraryDependencies ++= Seq(
  "com.chuusai" %% "shapeless" % "2.3.1"
)

libraryDependencies ++= {
  val sprayVersion = "1.3.4"
  val akkaVersion = "2.5.4"
  Seq(
    "io.spray" %% "spray-can" % sprayVersion,
    "io.spray" %% "spray-routing" % sprayVersion,
    "io.spray" %% "spray-testkit" % sprayVersion,
    "io.spray" %% "spray-client" % sprayVersion,
    "io.spray" %% "spray-json"  % "1.3.3",
    "com.typesafe.akka" %% "akka-actor" % akkaVersion,
    "com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
    "com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
    "ch.qos.logback" % "logback-classic" % "1.0.12",
    "org.scalatest" %% "scalatest" % "3.2.0-SNAP7" % "test"
  )
}