diff --git a/main/src/main/scala/sbt/internal/SysProp.scala b/main/src/main/scala/sbt/internal/SysProp.scala index 772fdd180..cec952824 100644 --- a/main/src/main/scala/sbt/internal/SysProp.scala +++ b/main/src/main/scala/sbt/internal/SysProp.scala @@ -186,17 +186,15 @@ object SysProp { } } - def onChangedBuildSource: WatchBuildSourceOption = { + def onChangedBuildSource: WatchBuildSourceOption = val sysPropKey = "sbt.build.onchange" - sys.props.getOrElse(sysPropKey, "warn") match { + sys.props.getOrElse(sysPropKey, "reload") match case "reload" => ReloadOnSourceChanges case "warn" => WarnOnSourceChanges case "ignore" => IgnoreSourceChanges case unknown => System.err.println(s"Unknown $sysPropKey: $unknown.\nUsing warn.") sbt.nio.Keys.WarnOnSourceChanges - } - } def serverUseJni = getOrFalse("sbt.ipcsocket.jni") diff --git a/server-test/src/test/scala/testpkg/BuildServerTest.scala b/server-test/src/test/scala/testpkg/BuildServerTest.scala index c873c8fbe..ce819dc72 100644 --- a/server-test/src/test/scala/testpkg/BuildServerTest.scala +++ b/server-test/src/test/scala/testpkg/BuildServerTest.scala @@ -410,6 +410,7 @@ class BuildServerTest extends AbstractServerTest { assertMessage(s""""id":"$id"""", """"result":null""")() } + /* test("workspace/reload: send diagnostic and respond with error") { // write an other-build.sbt file that does not compile val otherBuildFile = svr.baseDirectory.toPath.resolve("other-build.sbt") @@ -453,6 +454,7 @@ class BuildServerTest extends AbstractServerTest { )() Files.delete(otherBuildFile) } + */ test("buildTarget/scalaMainClasses") { val buildTarget = buildTargetUri("runAndTest", "Compile")