mirror of https://github.com/sbt/sbt.git
Add new closewatch mode
This commit is contained in:
parent
fff32db7ce
commit
707bf08c4e
|
|
@ -134,14 +134,14 @@ object Watched {
|
||||||
AttributeKey[Watched]("watched-configuration", "Configures continuous execution.")
|
AttributeKey[Watched]("watched-configuration", "Configures continuous execution.")
|
||||||
|
|
||||||
def createWatchService(): WatchService = {
|
def createWatchService(): WatchService = {
|
||||||
|
def closeWatch = new MacOSXWatchService()
|
||||||
sys.props.get("sbt.watch.mode") match {
|
sys.props.get("sbt.watch.mode") match {
|
||||||
case Some("polling") =>
|
case Some("polling") =>
|
||||||
new PollingWatchService(PollDelay)
|
new PollingWatchService(PollDelay)
|
||||||
case Some("nio") =>
|
case Some("nio") =>
|
||||||
FileSystems.getDefault.newWatchService()
|
FileSystems.getDefault.newWatchService()
|
||||||
case _ if Properties.isMac =>
|
case Some("closewatch") => closeWatch
|
||||||
// WatchService is slow on macOS - use old polling mode
|
case _ if Properties.isMac => closeWatch
|
||||||
new MacOSXWatchService(PollDelay)
|
|
||||||
case _ =>
|
case _ =>
|
||||||
FileSystems.getDefault.newWatchService()
|
FileSystems.getDefault.newWatchService()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ object Dependencies {
|
||||||
val baseScalaVersion = scala212
|
val baseScalaVersion = scala212
|
||||||
|
|
||||||
// sbt modules
|
// sbt modules
|
||||||
private val ioVersion = "1.1.4"
|
private val ioVersion = "1.1.5"
|
||||||
private val utilVersion = "1.1.3"
|
private val utilVersion = "1.1.3"
|
||||||
private val lmVersion = "1.1.4"
|
private val lmVersion = "1.1.4"
|
||||||
private val zincVersion = "1.1.3"
|
private val zincVersion = "1.1.3"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue