Merge pull request #4137 from eed3si9n/wip/servertest2

Uncomment server customization in test
This commit is contained in:
Dale Wijnand 2018-05-02 16:19:45 +01:00 committed by GitHub
commit 464a55be3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 14 deletions

View File

@ -1,23 +1,23 @@
// import sbt.internal.ServerHandler
import sbt.internal.server.{ ServerHandler, ServerIntent }
lazy val root = (project in file("."))
.settings(
Global / serverLog / logLevel := Level.Debug,
// custom handler
// Global / serverHandlers += ServerHandler({ callback =>
// import callback._
// import sjsonnew.BasicJsonProtocol._
// import sbt.internal.protocol.JsonRpcRequestMessage
// ServerIntent(
// {
// case r: JsonRpcRequestMessage if r.method == "lunar/helo" =>
// jsonRpcNotify("lunar/oleh", "")
// ()
// },
// PartialFunction.empty
// )
// }),
Global / serverHandlers += ServerHandler({ callback =>
import callback._
import sjsonnew.BasicJsonProtocol._
import sbt.internal.protocol.JsonRpcRequestMessage
ServerIntent(
{
case r: JsonRpcRequestMessage if r.method == "lunar/helo" =>
jsonRpcNotify("lunar/oleh", "")
()
},
PartialFunction.empty
)
}),
name := "handshake",
scalaVersion := "2.12.3",