Merge pull request #4071 from eed3si9n/wip/closewatch

Use MacOSXWatchService instead of PollingWatchService
This commit is contained in:
eugene yokota
2018-04-06 04:34:30 -04:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
@@ -134,14 +134,14 @@ object Watched {
AttributeKey[Watched]("watched-configuration", "Configures continuous execution.")
def createWatchService(): WatchService = {
def closeWatch = new MacOSXWatchService()
sys.props.get("sbt.watch.mode") match {
case Some("polling") =>
new PollingWatchService(PollDelay)
case Some("nio") =>
FileSystems.getDefault.newWatchService()
case _ if Properties.isMac =>
// WatchService is slow on macOS - use old polling mode
new PollingWatchService(PollDelay)
case Some("closewatch") => closeWatch
case _ if Properties.isMac => closeWatch
case _ =>
FileSystems.getDefault.newWatchService()
}
+1 -1
View File
@@ -8,7 +8,7 @@ object Dependencies {
val baseScalaVersion = scala212
// sbt modules
private val ioVersion = "1.1.4"
private val ioVersion = "1.1.5"
private val utilVersion = "1.1.3"
private val lmVersion = "1.1.4"
private val zincVersion = "1.1.3"