diff --git a/compile/ScalaInstance.scala b/compile/ScalaInstance.scala index a0ab64fe5..3eae59b4f 100644 --- a/compile/ScalaInstance.scala +++ b/compile/ScalaInstance.scala @@ -9,8 +9,10 @@ package xsbt * The 'actualVersion' field should be used to uniquely identify the compiler. It is obtained from the compiler.properties file.*/ final class ScalaInstance(val version: String, val loader: ClassLoader, val libraryJar: File, val compilerJar: File) extends NotNull { + require(version.indexOf(' ') < 0, "Version cannot contain spaces (was '" + version + "')") /** Gets the version of Scala in the compiler.properties file from the loader. This version may be different than that given by 'version'*/ lazy val actualVersion = ScalaInstance.actualVersion(loader)(" version " + version) + override def toString = "Scala instance{version label " + version + ", actual version " + actualVersion + ", library jar: " + libraryJar + ", compiler jar: " + compilerJar + "}" } object ScalaInstance {