mirror of https://github.com/sbt/sbt.git
Fix TastyFiles added twice in Test
This commit is contained in:
parent
ab2b396543
commit
c1e7b9c3f8
|
|
@ -694,6 +694,10 @@ object Defaults extends BuildCommon {
|
||||||
else Def.task[Option[File]](None)
|
else Def.task[Option[File]](None)
|
||||||
}.value,
|
}.value,
|
||||||
scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeSourceModule(scalaVersion.value),
|
scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeSourceModule(scalaVersion.value),
|
||||||
|
auxiliaryClassFiles ++= {
|
||||||
|
if (ScalaArtifacts.isScala3(scalaVersion.value)) List(TastyFiles.instance)
|
||||||
|
else Nil
|
||||||
|
},
|
||||||
consoleProject / scalaCompilerBridgeBinaryJar := None,
|
consoleProject / scalaCompilerBridgeBinaryJar := None,
|
||||||
consoleProject / scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeSourceModule(
|
consoleProject / scalaCompilerBridgeSource := ZincLmUtil.getDefaultBridgeSourceModule(
|
||||||
appConfiguration.value.provider.scalaProvider.version
|
appConfiguration.value.provider.scalaProvider.version
|
||||||
|
|
@ -702,7 +706,7 @@ object Defaults extends BuildCommon {
|
||||||
// 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(
|
private[this] lazy val compileBaseGlobal: Seq[Setting[_]] = globalDefaults(
|
||||||
Seq(
|
Seq(
|
||||||
auxiliaryClassFiles := Nil,
|
auxiliaryClassFiles :== Nil,
|
||||||
incOptions := IncOptions.of(),
|
incOptions := IncOptions.of(),
|
||||||
classpathOptions :== ClasspathOptionsUtil.boot,
|
classpathOptions :== ClasspathOptionsUtil.boot,
|
||||||
console / classpathOptions :== ClasspathOptionsUtil.repl,
|
console / classpathOptions :== ClasspathOptionsUtil.repl,
|
||||||
|
|
@ -905,10 +909,6 @@ object Defaults extends BuildCommon {
|
||||||
compileAnalysisTargetRoot.value / compileAnalysisFilename.value
|
compileAnalysisTargetRoot.value / compileAnalysisFilename.value
|
||||||
},
|
},
|
||||||
externalHooks := IncOptions.defaultExternal,
|
externalHooks := IncOptions.defaultExternal,
|
||||||
auxiliaryClassFiles ++= {
|
|
||||||
if (ScalaArtifacts.isScala3(scalaVersion.value)) List(TastyFiles.instance)
|
|
||||||
else Nil
|
|
||||||
},
|
|
||||||
incOptions := {
|
incOptions := {
|
||||||
val old = incOptions.value
|
val old = incOptions.value
|
||||||
old
|
old
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
import xsbti.compile.TastyFiles
|
||||||
|
|
||||||
ThisBuild / scalaVersion := "3.0.0-M2"
|
ThisBuild / scalaVersion := "3.0.0-M2"
|
||||||
|
|
||||||
lazy val root = project.in(file("."))
|
TaskKey[Unit]("check") := {
|
||||||
|
assert((Compile / auxiliaryClassFiles).value == Seq(TastyFiles.instance))
|
||||||
|
assert((Test / auxiliaryClassFiles).value == Seq(TastyFiles.instance))
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
> check
|
||||||
> compile
|
> compile
|
||||||
|
|
||||||
$ exists target/scala-3.0.0-M2/classes/A.tasty
|
$ exists target/scala-3.0.0-M2/classes/A.tasty
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue