mirror of https://github.com/sbt/sbt.git
Merge pull request #8211 from eed3si9n/wip/reload
[2.x] Auto reload by default
This commit is contained in:
commit
a40fd7e7dd
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue