From 97598efceaae1cbdf9d47796fe481a3b044a16c4 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Sat, 18 Aug 2018 10:04:50 -0700 Subject: [PATCH] Bump watch anti-entropy There have been reports that often a new build will be triggered immediately after the previous build even when none of the files have been modified since the start of the last build. This can happen when, for example, a program implements save with a rename. When that occurs, a deletion watch event may trigger the build but the corresponding creation event may be detected outside of the current 40ms window. By bumping this value to 500ms, we hopefully prevent the majority of these false triggers. For unusual workflows in which this longer quarantine period is an issue, the setting can be overridden. --- main/src/main/scala/sbt/Defaults.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 8d721792d..c410b17c6 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -264,7 +264,7 @@ object Defaults extends BuildCommon { concurrentRestrictions := defaultRestrictions.value, parallelExecution :== true, pollInterval :== new FiniteDuration(500, TimeUnit.MILLISECONDS), - watchAntiEntropy :== new FiniteDuration(40, TimeUnit.MILLISECONDS), + watchAntiEntropy :== new FiniteDuration(500, TimeUnit.MILLISECONDS), watchService :== { () => Watched.createWatchService() },