SBT keeps failing with improper append errors. Im using the exact format of build files I have seen numerous times.
build.sbt:
lazy val backend = (project in file("backend")).settings(
name := "backend",
libraryDependencies ++= (Dependencies.backend)
).dependsOn(api).aggregate(api)
dependencies.scala:
import sbt._
object Dependencies {
lazy val backend = common ++ metrics
val common = Seq(
"com.typesafe.akka" %% "akka-actor" % Version.akka,
"com.typesafe.akka" %% "akka-cluster" % Version.akka,
"org.scalanlp.breeze" %% "breeze" % Version.breeze,
"com.typesafe.akka" %% "akka-contrib" % Version.akka,
"org.scalanlp.breeze-natives" % Version.breeze,
"com.google.guava" % "guava" % "17.0"
)
val metrics = Seq("org.fusesource" % "sigar" % "1.6.4")
Im Im not quite why SBT is complaining
error: No implicit for Append.Values[Seq[sbt.ModuleID], Seq[Object]] found,
so Seq[Object] cannot be appended to Seq[sbt.ModuleID]
libraryDependencies ++= (Dependencies.backend)
^
There's an error in common
: you want to replace this line
"org.scalanlp.breeze-natives" % Version.breeze,
with this line
"org.scalanlp" %% "breeze-natives" % Version.beeze,
"org.scalanlp.breeze-natives" % Version.breeze
is a GroupArtifactID
not a ModuleID
.
This causes common
to become a Seq[Object]
instead of a Seq[ModuleID]
.
And therefore also Dependencies.backend
to be a Seq[Object]
Which ultimately can't be appended (via ++=
) to libraryDependencies
(defined as a SettingKey[Seq[ModuleID]]
) because there is no available Append.Values[Seq[sbt.ModuleID], Seq[Object]]
.
One of common
or metrics
is not a Seq[sbt.ModuleID]
. You could find out which with a type ascription:
val common: Seq[sbt.ModuleID] = ...
val metrics: Seq[sbt.ModuleID] = ...
My money is on common
, this line doesn't have enough %
s in it:
"org.scalanlp.breeze-natives" % Version.breeze
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With