Undeprecate ScalaInstance.libraryJar, which will be reliable for modularized Scala.

This commit is contained in:
Mark Harrah 2013-04-08 09:21:40 -04:00
parent b560ef280e
commit b990a29c09
2 changed files with 3 additions and 7 deletions

View File

@ -1314,7 +1314,6 @@ object Classpaths
def unmanagedScalaLibrary: Initialize[Task[Seq[File]]] = def unmanagedScalaLibrary: Initialize[Task[Seq[File]]] =
Def.taskDyn { Def.taskDyn {
if(autoScalaLibrary.value && scalaHome.value.isDefined) if(autoScalaLibrary.value && scalaHome.value.isDefined)
// TODO: what goes here when Scala library is modularized?
Def.task { scalaInstance.value.libraryJar :: Nil } Def.task { scalaInstance.value.libraryJar :: Nil }
else else
Def.task { Nil } Def.task { Nil }

View File

@ -7,16 +7,14 @@ package sbt
import xsbti.ArtifactInfo.{ScalaCompilerID, ScalaLibraryID, ScalaOrganization} import xsbti.ArtifactInfo.{ScalaCompilerID, ScalaLibraryID, ScalaOrganization}
/** Represents the source for Scala classes for a given version. The reason both a ClassLoader and the jars are required /** Represents the source for Scala classes for a given version. The reason both a ClassLoader and the jars are required
* is that the compiler requires the location of the library/compiler jars on the (boot)classpath and the loader is used * is that the compiler requires the location of the library jar on the (boot)classpath and the loader is used
* for the compiler itself. * for the compiler itself.
* The 'version' field is the version used to obtain the Scala classes. This is typically the version for the maven repository. * The 'version' field is the version used to obtain the Scala classes. This is typically the version for the maven repository.
* The 'actualVersion' field should be used to uniquely identify the compiler. It is obtained from the compiler.properties file. * The 'actualVersion' field should be used to uniquely identify the compiler. It is obtained from the compiler.properties file.
* *
* This should be constructed via the ScalaInstance.apply methods. The primary constructor is deprecated. * This should be constructed via the ScalaInstance.apply methods. The primary constructor is deprecated.
**/ **/
final class ScalaInstance(val version: String, val loader: ClassLoader, final class ScalaInstance(val version: String, val loader: ClassLoader, val libraryJar: File,
@deprecated("Only `allJars` and `jars` can be reliably provided for modularized Scala.", "0.13.0")
val libraryJar: File,
@deprecated("Only `allJars` and `jars` can be reliably provided for modularized Scala.", "0.13.0") @deprecated("Only `allJars` and `jars` can be reliably provided for modularized Scala.", "0.13.0")
val compilerJar: File, val compilerJar: File,
@deprecated("Only `allJars` and `jars` can be reliably provided for modularized Scala.", "0.13.0") @deprecated("Only `allJars` and `jars` can be reliably provided for modularized Scala.", "0.13.0")
@ -106,8 +104,7 @@ object ScalaInstance
private def compilerJar(scalaHome: File) = scalaJar(scalaHome, "scala-compiler.jar") private def compilerJar(scalaHome: File) = scalaJar(scalaHome, "scala-compiler.jar")
private def libraryJar(scalaHome: File) = scalaJar(scalaHome, "scala-library.jar") private def libraryJar(scalaHome: File) = scalaJar(scalaHome, "scala-library.jar")
@deprecated("No longer used.", "0.13.0") def scalaJar(scalaHome: File, name: String) = new File(scalaLib(scalaHome), name)
def scalaJar(scalaHome: File, name: String) = new File(scalaHome, "lib" + File.separator + name)
@deprecated("No longer used.", "0.13.0") @deprecated("No longer used.", "0.13.0")
def optScalaJar(scalaHome: File, name: String): List[File] = def optScalaJar(scalaHome: File, name: String): List[File] =