mirror of https://github.com/sbt/sbt.git
Fix compiler bridge name
This commit is contained in:
parent
bb8133eaba
commit
ba7ffa5d4d
|
|
@ -13,15 +13,22 @@ import Locate.DefinesClass
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
import sbt.internal.librarymanagement.{ ComponentManager, IvyConfiguration }
|
import sbt.internal.librarymanagement.{ ComponentManager, IvyConfiguration }
|
||||||
import sbt.librarymanagement.{ ModuleID, CrossVersion }
|
import sbt.librarymanagement.{ ModuleID, CrossVersion, VersionNumber }
|
||||||
import sbt.util.Logger
|
import sbt.util.Logger
|
||||||
|
|
||||||
object Compiler {
|
object Compiler {
|
||||||
val DefaultMaxErrors = 100
|
val DefaultMaxErrors = 100
|
||||||
|
private[sbt] def defaultCompilerBridgeSource(sv: String): ModuleID =
|
||||||
private[sbt] def scalaCompilerBridgeSource: ModuleID =
|
VersionNumber(sv) match {
|
||||||
ModuleID(xsbti.ArtifactInfo.SbtOrganization, "compiler-bridge",
|
case VersionNumber(ns, _, _) if (ns.size == 3) && (ns(0) == 2) && (ns(1) <= 10) => scalaCompilerBridgeSource2_10
|
||||||
ComponentCompiler.incrementalVersion, Some("component")).cross(CrossVersion.binary).sources()
|
case _ => scalaCompilerBridgeSource2_11
|
||||||
|
}
|
||||||
|
private[sbt] def scalaCompilerBridgeSource2_10: ModuleID =
|
||||||
|
ModuleID(xsbti.ArtifactInfo.SbtOrganization, "compiler-bridge_2.10",
|
||||||
|
ComponentCompiler.incrementalVersion, Some("component")).sources()
|
||||||
|
private[sbt] def scalaCompilerBridgeSource2_11: ModuleID =
|
||||||
|
ModuleID(xsbti.ArtifactInfo.SbtOrganization, "compiler-bridge_2.11",
|
||||||
|
ComponentCompiler.incrementalVersion, Some("component")).sources()
|
||||||
|
|
||||||
/** Inputs necessary to run the incremental compiler. */
|
/** Inputs necessary to run the incremental compiler. */
|
||||||
final case class Inputs(compilers: Compilers, config: Options, incSetup: IncSetup)
|
final case class Inputs(compilers: Compilers, config: Options, incSetup: IncSetup)
|
||||||
|
|
@ -103,7 +110,7 @@ object Compiler {
|
||||||
{
|
{
|
||||||
val scalaProvider = app.provider.scalaProvider
|
val scalaProvider = app.provider.scalaProvider
|
||||||
val instance = ScalaInstance(scalaProvider.version, scalaProvider.launcher)
|
val instance = ScalaInstance(scalaProvider.version, scalaProvider.launcher)
|
||||||
val sourceModule = scalaCompilerBridgeSource
|
val sourceModule = scalaCompilerBridgeSource2_11
|
||||||
compilers(instance, cpOptions, None, ivyConfiguration, sourceModule)
|
compilers(instance, cpOptions, None, ivyConfiguration, sourceModule)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@ object Defaults extends BuildCommon {
|
||||||
val _ = clean.value
|
val _ = clean.value
|
||||||
IvyActions.cleanCachedResolutionCache(ivyModule.value, streams.value.log)
|
IvyActions.cleanCachedResolutionCache(ivyModule.value, streams.value.log)
|
||||||
},
|
},
|
||||||
scalaCompilerBridgeSource := Compiler.scalaCompilerBridgeSource
|
scalaCompilerBridgeSource := Compiler.defaultCompilerBridgeSource(scalaVersion.value)
|
||||||
)
|
)
|
||||||
// must be a val: duplication detected by object identity
|
// must be a val: duplication detected by object identity
|
||||||
private[this] lazy val compileBaseGlobal: Seq[Setting[_]] = globalDefaults(Seq(
|
private[this] lazy val compileBaseGlobal: Seq[Setting[_]] = globalDefaults(Seq(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue