mirror of https://github.com/sbt/sbt.git
Use the ordinary compiler classpath for scala-library
No longer pass `-bootclasspath /path/to/scala-library.jar` to the Scala compiler, put the library on the ordinary classpath.
This commit is contained in:
parent
48c23761dc
commit
d8d2b02e7e
|
|
@ -730,14 +730,14 @@ object Defaults extends BuildCommon {
|
|||
consoleProject / scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeSourceModule(
|
||||
appConfiguration.value.provider.scalaProvider.version
|
||||
),
|
||||
classpathOptions := ClasspathOptionsUtil.noboot(scalaVersion.value),
|
||||
console / classpathOptions := ClasspathOptionsUtil.replNoboot(scalaVersion.value),
|
||||
)
|
||||
// must be a val: duplication detected by object identity
|
||||
private[this] lazy val compileBaseGlobal: Seq[Setting[_]] = globalDefaults(
|
||||
Seq(
|
||||
auxiliaryClassFiles :== Nil,
|
||||
incOptions := IncOptions.of(),
|
||||
classpathOptions :== ClasspathOptionsUtil.boot,
|
||||
console / classpathOptions :== ClasspathOptionsUtil.repl,
|
||||
compileOrder :== CompileOrder.Mixed,
|
||||
javacOptions :== Nil,
|
||||
scalacOptions :== Nil,
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ private[sbt] object Load {
|
|||
val dependencyResolution = IvyDependencyResolution(ivyConfiguration)
|
||||
val si = ScalaInstance(scalaProvider.version, scalaProvider.launcher)
|
||||
val zincDir = BuildPaths.getZincDirectory(state, globalBase)
|
||||
val classpathOptions = ClasspathOptionsUtil.boot
|
||||
val classpathOptions = ClasspathOptionsUtil.noboot(si.version)
|
||||
val scalac = ZincLmUtil.scalaCompiler(
|
||||
scalaInstance = si,
|
||||
classpathOptions = classpathOptions,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
TaskKey[Unit]("check212") := checkCp(true)
|
||||
TaskKey[Unit]("check213") := checkCp(false)
|
||||
|
||||
def checkCp(auto: Boolean) = Def.task {
|
||||
val opts = compilers.value.scalac.classpathOptions
|
||||
assert(opts.autoBoot == auto, opts)
|
||||
assert(opts.filterLibrary == auto, opts)
|
||||
()
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
> set scalaVersion := "2.13.12"
|
||||
> check213
|
||||
> set scalaVersion := "2.12.18"
|
||||
> check212
|
||||
|
|
@ -57,7 +57,11 @@ private[sbt] object ZincComponentCompiler {
|
|||
scalaInstance: XScalaInstance,
|
||||
logger: Logger,
|
||||
): File = lock.synchronized {
|
||||
val raw = new RawCompiler(scalaInstance, ClasspathOptionsUtil.auto, logger)
|
||||
val raw = new RawCompiler(
|
||||
scalaInstance,
|
||||
ClasspathOptionsUtil.autoNoboot(scalaInstance.version),
|
||||
logger
|
||||
)
|
||||
val zinc =
|
||||
new ZincComponentCompiler(raw, manager, dependencyResolution, bridgeSources, logger)
|
||||
logger.debug(f0(s"Getting $bridgeSources for Scala ${scalaInstance.version}"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue