Why sbt does override scala version in subproject?

631 views Asked by At

I have failed to find any answers... that is why I'm here) Below is my case:

lazy val sevone = Project(id = "sevone",
base = file("sevone")) dependsOn nmsCommons
lazy val nmsCommons = Project(id = "nms-commons",
base = file("nms-commons"))

sevone project has 2.11.0 scalaVersion and nmsCommons has 2.10.2 scalaVersion, but when I'm trying to update/compile sevone project SBT ovverrides 2.10.2 to 2.11.0 and failed with

[error] (sevone/*:update) sbt.ResolveException: unresolved dependency: network-monitoring-system-commons#network-monitoring-system-commons_2.11;1.0: not found

1

There are 1 answers

0
Alexey Romanov On BEST ANSWER

Scala 2.10 and 2.11 aren't binary compatible (see https://typesafe.com/blog/scala-211-has-arrived). So it isn't possible for a 2.11 project to depend on a 2.10 project. See also Cross-Building in SBT documentation.