Merge pull request #4075 from eed3si9n/wip/bump

bump IO and Zinc
This commit is contained in:
eugene yokota 2018-04-06 18:10:07 -04:00 committed by GitHub
commit 8f6e2fe371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 13 deletions

View File

@ -15,7 +15,7 @@ import ast.parser.Tokens
import reporters.{ ConsoleReporter, Reporter }
import scala.reflect.internal.util.{ AbstractFileClassLoader, BatchSourceFile }
import Tokens.{ EOF, NEWLINE, NEWLINES, SEMI }
import java.io.File
import java.io.{ File, FileNotFoundException }
import java.nio.ByteBuffer
import java.net.URLClassLoader
import java.security.MessageDigest
@ -509,21 +509,18 @@ private[sbt] object Eval {
if (f.isDirectory)
(f listFiles classDirFilter) foreach { x =>
fileModifiedHash(x, digester)
} else digester.update(bytes(JavaMilli.getModifiedTimeOrZero(f)))
} else digester.update(bytes(getModifiedTimeOrZero(f)))
digester.update(bytes(f.getAbsolutePath))
}
// This uses NIO instead of the JNA-based IO.getModifiedTimeOrZero for speed
object JavaMilli {
import java.nio.file.{ Files, NoSuchFileException }
def getModifiedTimeOrZero(f: File): Long =
try {
Files.getLastModifiedTime(f.toPath).toMillis
} catch {
case e: NoSuchFileException => 0L
}
}
def getModifiedTimeOrZero(f: File): Long =
try {
sbt.io.JavaMilli.getModifiedTime(f.getPath)
} catch {
case _: FileNotFoundException => 0L
}
def fileExistsBytes(f: File): Array[Byte] =
bytes(f.exists) ++

View File

@ -8,10 +8,10 @@ object Dependencies {
val baseScalaVersion = scala212
// sbt modules
private val ioVersion = "1.1.5"
private val ioVersion = "1.1.6"
private val utilVersion = "1.1.3"
private val lmVersion = "1.1.4"
private val zincVersion = "1.1.3"
private val zincVersion = "1.1.4"
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion