Hi all,
We have a problem in ENSIME whereby sbt 0.13.7 is upgrading the project's scala version without our permission.
https://github.com/ensime/ensime-server/issues/897
Basically, in order to provision a client's machine for running the ensime server, we generate a build.sbt like this
===================
import sbt._
import IO._
import java.io._
scalaVersion := "2.11.5"
resolvers += Resolver.sonatypeRepo("snapshots")
libraryDependencies += "org.ensime" %% "ensime" % "0.9.10-SNAPSHOT"
val saveClasspathTask = TaskKey[Unit]("saveClasspath", "Save the classpath to a file")
saveClasspathTask := {
val managed = (managedClasspath in Runtime).value.map(_.data.getAbsolutePath)
val unmanaged = (unmanagedClasspath in Runtime).value.map(_.data.getAbsolutePath)
val out = file("classpath_2.11.5_0.9.10-SNAPSHOT")
write(out, (unmanaged ++ managed).mkString(File.pathSeparator))
}
================
and then we run `sbt saveClasspath`
In this example, the project's scalaVersion of 2.11.5 is being overridden by the scala version of its dependencies, which are on 2.11.6.
Using
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = false) }
(or `true`, I'm not really sure which side the override is coming from) makes no difference.
Best regards,
Sam