Update IO library to sbt/IO v1.0.0-M1

This commit is contained in:
Martin Duhem 2015-08-31 01:51:03 +02:00
parent 650b37ff24
commit b4e27ce471
9 changed files with 22 additions and 22 deletions

View File

@ -100,7 +100,7 @@ lazy val utilComplete = (project in internalPath / "util-complete").
testedBaseSettings,
// Util.crossBuild,
name := "Util Completion",
libraryDependencies ++= Seq(jline, ioProj),
libraryDependencies ++= Seq(jline, sbtIO),
crossScalaVersions := Seq(scala210, scala211)
)
@ -135,7 +135,7 @@ lazy val utilCache = (project in internalPath / "util-cache").
settings(
commonSettings,
name := "Util Cache",
libraryDependencies ++= Seq(sbinary, sbtSerialization, scalaReflect.value, ioProj) ++ scalaXml.value
libraryDependencies ++= Seq(sbinary, sbtSerialization, scalaReflect.value, sbtIO) ++ scalaXml.value
)
// Builds on cache to provide caching for filesystem-related operations
@ -144,5 +144,5 @@ lazy val utilTracking = (project in internalPath / "util-tracking").
settings(
commonSettings,
name := "Util Tracking",
libraryDependencies ++= Seq(ioProj)
libraryDependencies ++= Seq(sbtIO)
)

View File

@ -6,6 +6,7 @@ package sbt
import java.io.{ File, FileNotFoundException }
import sbinary.{ DefaultProtocol, Format, Operations }
import scala.reflect.Manifest
import sbt.io.IO
object CacheIO {
def toBytes[T](format: Format[T])(value: T)(implicit mf: Manifest[Format[T]]): Array[Byte] =
@ -41,4 +42,4 @@ object CacheIO {
def typeHash[T](implicit mf: Manifest[T]) = mf.toString.hashCode
def manifest[T](implicit mf: Manifest[T]): Manifest[T] = mf
def objManifest[T](t: T)(implicit mf: Manifest[T]): Manifest[T] = mf
}
}

View File

@ -7,6 +7,7 @@ import java.io.{ File, IOException }
import sbinary.{ DefaultProtocol, Format }
import DefaultProtocol._
import scala.reflect.Manifest
import sbt.io.Hash
sealed trait FileInfo extends NotNull {
val file: File
@ -103,4 +104,4 @@ object FilesInfo {
implicit def hashInputsCache: InputCache[FilesInfo[HashFileInfo]] = hash.infosInputCache
implicit def modifiedInputsCache: InputCache[FilesInfo[ModifiedFileInfo]] = lastModified.infosInputCache
implicit def fullInputsCache: InputCache[FilesInfo[HashModifiedFileInfo]] = full.infosInputCache
}
}

View File

@ -7,6 +7,7 @@ import Types.:+:
import sbinary.{ DefaultProtocol, Format, Input, Output => Out }
import DefaultProtocol.ByteFormat
import java.io.{ File, InputStream, OutputStream }
import sbt.internal.io.Using
trait InputCache[I] {
type Internal
@ -59,4 +60,4 @@ class BasicCache[I, O](implicit input: InputCache[I], outFormat: Format[O]) exte
outFormat.writes(stream, out)
}
}
}
}

View File

@ -1,7 +1,7 @@
package sbt.complete
import java.io.File
import sbt.IO
import sbt.io.IO
/**
* These sources of examples are used in parsers for user input completion. An example of such a source is the
@ -56,4 +56,4 @@ class FileExamples(base: File, prefix: String = "") extends ExampleSource {
private def dirStartsWithPrefix(relativizedPath: String): Boolean =
(relativizedPath startsWith prefix) || (prefix startsWith relativizedPath)
}
}

View File

@ -5,6 +5,7 @@ package sbt
package complete
import java.io.File
import sbt.io.IO
object HistoryCommands {
val Start = "!"
@ -70,4 +71,4 @@ object HistoryCommands {
val actionParser: Parser[complete.History => Option[List[String]]] =
Start ~> (help | last | execInt | list | execStr) // execStr must come last
}
}

View File

@ -2,9 +2,8 @@ package sbt.complete
import org.specs2.mutable.Specification
import org.specs2.specification.Scope
import sbt.IO.withTemporaryDirectory
import java.io.File
import sbt.IO._
import sbt.io.IO._
class FileExamplesTest extends Specification {

View File

@ -9,7 +9,9 @@ import sbinary.Format
import scala.pickling.PicklingException
import scala.reflect.Manifest
import scala.collection.mutable
import IO.{ delete, read, write }
import sbt.io.IO.{ delete, read, write }
import sbt.io.{ IO, Path }
import sbt.internal.io.Using
import sbt.serialization._
object Tracked {
@ -251,4 +253,4 @@ object FileFunction {
}
}
}
}
}

View File

@ -6,21 +6,15 @@ object Dependencies {
lazy val scala211 = "2.11.7"
val bootstrapSbtVersion = "0.13.8"
// lazy val interfaceProj = "org.scala-sbt" % "interface" % bootstrapSbtVersion
lazy val ioProj = "org.scala-sbt" % "io" % bootstrapSbtVersion
// lazy val collectionProj = "org.scala-sbt" % "collections" % bootstrapSbtVersion
// lazy val logProj = "org.scala-sbt" % "logging" % bootstrapSbtVersion
// lazy val crossProj = "org.scala-sbt" % "cross" % bootstrapSbtVersion
lazy val sbtIO = "org.scala-sbt" %% "io" % "1.0.0-M1"
lazy val jline = "jline" % "jline" % "2.11"
// lazy val launcherInterface = "org.scala-sbt" % "launcher-interface" % "1.0.0-M1"
// lazy val ivy = "org.scala-sbt.ivy" % "ivy" % "2.3.0-sbt-927bc9ded7f8fba63297cddd0d5a3d01d6ad5d8d"
// lazy val jsch = "com.jcraft" % "jsch" % "0.1.46" intransitive ()
lazy val sbtSerialization = "org.scala-sbt" %% "serialization" % "0.1.2"
lazy val sbinary = "org.scala-tools.sbinary" %% "sbinary" % "0.4.2"
// lazy val junit = "junit" % "junit" % "4.11"
lazy val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value }
lazy val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
private def scala211Module(name: String, moduleVersion: String) =
Def.setting {
scalaVersion.value match {
@ -28,6 +22,7 @@ object Dependencies {
case _ => ("org.scala-lang.modules" %% name % moduleVersion) :: Nil
}
}
lazy val scalaXml = scala211Module("scala-xml", "1.0.1")
lazy val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.11.4"