-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make sbt server extensible #3975
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 request, 1 question
rest LGTM
*/ | ||
|
||
package sbt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you make these sbt.internal.server
please so we can break their API, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are exposing this out to plugins, then it needs to be public, no?
Are we saying that people can extend it, but the extension is not guaranteed to work down the line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's exposed with 0 compatibility promises. caveat emptor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine if it's presented as an experimental/beta functionality.
lazy val fallback: ServerHandler = ServerHandler({ handler => | ||
ServerIntent( | ||
{ case x => handler.log.debug(s"Unhandled notification received: ${x.method}") }, | ||
{ case x => handler.log.debug(s"Unhandled request received: ${x.method}") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any particular reason not to print the whole object like before?
Fixes sbt#3890 Here's an example: ```scala 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 ) ```
woohoo! |
sorry I only realised during the sbt meeting that you'd pushed the last commit 2 days ago.. :-/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woot, looking forward to give this a spin! Thanks 😄
This is a good first step to have bsp support in sbt, thanks for doing it. 👍 |
Hasn't this been released in an sbt version? This is blocking me from implementing a bsp prototype in sbt. |
@eed3si9n Would be really helpful if we can get this in a release soon so that I can work on the bsp prototype plugin ^^ |
Yea. We'll try to get some 1.2.0 milestone out soonish. |
Fixes #3890
Here's an example: