Zinc 1.4.0-M6

This commit is contained in:
Eugene Yokota 2020-06-14 15:55:37 -04:00
parent c3d6260f52
commit 5a37ef14fc
6 changed files with 16 additions and 5 deletions

View File

@ -954,6 +954,7 @@ lazy val mainProj = (project in file("main"))
exclude[IncompatibleTemplateDefProblem]("sbt.internal.server.LanguageServerProtocol"),
exclude[DirectMissingMethodProblem]("sbt.Classpaths.warnInsecureProtocol"),
exclude[DirectMissingMethodProblem]("sbt.Classpaths.warnInsecureProtocolInModules"),
exclude[MissingClassProblem]("sbt.internal.ExternalHooks*"),
)
)
.configure(

View File

@ -196,7 +196,13 @@ object Defaults extends BuildCommon {
val ih = app.provider.scalaProvider.launcher.ivyHome
val coursierCache = csrCacheDirectory.value
val javaHome = Paths.get(sys.props("java.home"))
Vector(base.toPath, boot.toPath, coursierCache.toPath, ih.toPath, javaHome)
Map(
"BASE" -> base.toPath,
"SBT_BOOT" -> boot.toPath,
"CSR_CACHE" -> coursierCache.toPath,
"IVY_HOME" -> ih.toPath,
"JAVA_HOME" -> javaHome,
)
},
fileConverter := MappedFileConverter(rootPaths.value, allowMachinePath.value),
fullServerHandlers := {

View File

@ -222,7 +222,7 @@ object Keys {
private[sbt] val externalHooks = taskKey[ExternalHooks]("The external hooks used by zinc.")
val fileConverter = settingKey[FileConverter]("The file converter used to convert between Path and VirtualFile")
val allowMachinePath = settingKey[Boolean]("Allow machine-specific paths during conversion.")
val rootPaths = settingKey[Seq[NioPath]]("The root paths used to abstract machine-specific paths.")
val rootPaths = settingKey[Map[String, NioPath]]("The root paths used to abstract machine-specific paths.")
private[sbt] val uncachedStamper = settingKey[ReadStamps]("The stamper to create timestamp or hash.")
private[sbt] val reusableStamper = settingKey[ReadStamps]("The stamper can be reused across subprojects and sessions.")

View File

@ -5,6 +5,7 @@
* Licensed under Apache License 2.0 (see LICENSE)
*/
/*
package sbt.internal
import java.nio.file.{ Path, Paths }
@ -20,6 +21,7 @@ import sbt.nio.file.{ FileAttributes, FileTreeView, RecursiveGlob }
import sbt.nio.{ FileChanges, FileStamp, FileStamper }
import sbt.util.InterfaceUtil.jo2o
import xsbti.{ VirtualFile, VirtualFileRef }
import xsbti.api.AnalyzedClass
import xsbti.compile._
import xsbti.compile.analysis.Stamp
@ -160,7 +162,9 @@ private[sbt] object ExternalHooks {
}
}.toSet)
}
override def lookupAnalyzedClass(binaryClassName: String): Option[AnalyzedClass] = None
}
new DefaultExternalHooks(Optional.of(lookup), Optional.empty[ClassFileManager])
}
}
*/

View File

@ -14,7 +14,7 @@ object Dependencies {
private val ioVersion = nightlyVersion.getOrElse("1.4.0-M6")
private val lmVersion =
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.4.0-M1")
val zincVersion = nightlyVersion.getOrElse("1.4.0-M5")
val zincVersion = nightlyVersion.getOrElse("1.4.0-M6")
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion

View File

@ -6,7 +6,7 @@ TaskKey[Unit]("checkJavaFailures") := {
// First error should be on a specific line/file
val first = ps(0)
assert(first.position.line.get == 3, s"First failure position is not line 3, failure = $first")
val expected = "${0}/src/main/java/bad.java"
val expected = "${BASE}/src/main/java/bad.java"
val sourcePath = first.position.sourcePath.get
assert(sourcePath == expected, s"$sourcePath == $expected was false")
}
@ -19,7 +19,7 @@ TaskKey[Unit]("checkScalaFailures") := {
// First error should be on a specific line/file
val first = ps(0)
assert(first.position.line.get == 2, s"First failure position is not line 2, failure = $first")
val expected = "${0}/src/main/scala/bad.scala"
val expected = "${BASE}/src/main/scala/bad.scala"
val sourcePath = first.position.sourcePath.get
assert(sourcePath == expected, s"$sourcePath == $expected was false")
}