mirror of https://github.com/sbt/sbt.git
Add toString for ScalaInstance and verify that version does not contain spaces
This commit is contained in:
parent
94a0fb5916
commit
80e1a4f60f
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue