Bump io to 1.3.0-M3

I had to turn off -Xfatal-warnings in commandProj because after updating
io, commandProj depends on the deprecated EventMonitor class. In #4335,
I stop using EventMonitor, but deprecate the Watched class which is both
defined and used (as an unused attribute key) in commandProj. I think we
can probably get rid of Watched in 1.4.x and certainly in a hypothetical
2.x, so hopefully we can restore -Xfatal-warnings sooner than later.

I also had to replace uses of IO.classLocationFile with
IO.classLocationPath to avoid compilation failures due to
-Xfatal-warnings.
This commit is contained in:
Ethan Atkins 2018-08-24 13:10:18 -07:00
parent 04e63936b3
commit 6725b39a84
7 changed files with 10 additions and 8 deletions

View File

@ -459,6 +459,8 @@ lazy val commandProj = (project in file("main-command"))
name := "Command",
libraryDependencies ++= Seq(launcherInterface, sjsonNewScalaJson.value, templateResolverApi),
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
// Removing -Xfatal-warnings is necessary because BasicKeys contains a Key for a deprecated class.
Compile / scalacOptions -= "-Xfatal-warnings",
managedSourceDirectories in Compile +=
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",

View File

@ -125,8 +125,8 @@ private[sbt] object ForkTests {
acceptorThread.start()
val fullCp = classpath ++: Seq(
IO.classLocationFile[ForkMain],
IO.classLocationFile[Framework]
IO.classLocationPath[ForkMain].toFile,
IO.classLocationPath[Framework].toFile
)
val options = Seq(
"-classpath",

View File

@ -69,7 +69,7 @@ final class Eval(
backing: Option[File]
) {
def this(mkReporter: Settings => Reporter, backing: Option[File]) =
this(Nil, IO.classLocationFile[Product] :: Nil, mkReporter, backing)
this(Nil, IO.classLocationPath[Product].toFile :: Nil, mkReporter, backing)
def this() = this(s => new ConsoleReporter(s), None)
backing.foreach(IO.createDirectory)

View File

@ -42,7 +42,7 @@ private[sbt] object SbtParser {
""".stripMargin
private final val defaultClasspath =
sbt.io.Path.makeString(sbt.io.IO.classLocationFile[Product] :: Nil)
sbt.io.Path.makeString(sbt.io.IO.classLocationPath[Product].toFile :: Nil)
/**
* Provides the previous error reporting functionality in

View File

@ -9,7 +9,7 @@ object Dependencies {
val baseScalaVersion = scala212
// sbt modules
private val ioVersion = "1.2.1"
private val ioVersion = "1.3.0-M3"
private val utilVersion = "1.3.0-M2"
private val lmVersion = "1.2.1"
private val zincVersion = "1.2.2"

View File

@ -31,8 +31,8 @@ object ForkTest extends Properties("Fork") {
lazy val genRelClasspath = nonEmptyListOf(path)
lazy val requiredEntries =
IO.classLocationFile[scala.Option[_]] ::
IO.classLocationFile[sbt.exit.type] ::
IO.classLocationPath[scala.Option[_]].toFile ::
IO.classLocationPath[sbt.exit.type].toFile ::
Nil
lazy val mainAndArgs =
"sbt.exit" ::

View File

@ -250,7 +250,7 @@ object TestFramework {
scalaInstance: ScalaInstance,
tempDir: File
): ClassLoader = {
val interfaceJar = IO.classLocationFile(classOf[testing.Framework])
val interfaceJar = IO.classLocationPath(classOf[testing.Framework]).toFile
val interfaceFilter = (name: String) =>
name.startsWith("org.scalatools.testing.") || name.startsWith("sbt.testing.")
val notInterfaceFilter = (name: String) => !interfaceFilter(name)