[Feature] Integrate with build server protocol
Hi,
I think that it would be great if eclipse.jdt.ls supported build server protocol.
It would allow integration with other build tools like sbt, mill, bleep, bazel via bazel-bsp and possibly others in the future.
Recently, Microsoft created a build server for gradle that jdtls could also take advantage of when integrating with gradle.
We have integrated a client of Gradle build server inside the vscode-gradle extension. As long as user installs the extension, the gradle projects will be imported via the build server approach.
From the JDT.LS side, I think one thing we can consider doing is to setup a generic BSP based client with a set of contribution points, which can make other BSP based server integrate easily.
We have integrated a client of Gradle build server inside the vscode-gradle extension. As long as user installs the extension, the gradle projects will be imported via the build server approach.
I appreciate the effort and the work that you put into that but the usefulness of this is quite limited as it only applies to vscode, while there are many more editors that could integrate with LSP: nvim, sublime, kakune, helix to name a few. LSP is editor agnostic, so let's not limit jdtls only to vscode.
From the JDT.LS side, I think one thing we can consider doing is to setup a generic BSP based client with a set of contribution points, which can make other BSP based server integrate easily.
That would be great. Although, could you clarify what kind of extension points you have in mind? I thought that since BSP is a protocol it is enough to support that one protocol, and benefit from being able to integrate with multiple different server implementations.
the usefulness of this is quite limited as it only applies to vscode
Hmm... Yes and no. The main part of the integration is an importer, which is a jar bundle of the JDT.LS: https://github.com/microsoft/vscode-gradle/tree/develop/extension/jdtls.ext/com.microsoft.gradle.bs.importer.
This major component is not VS Code specific. There are some code to integrate with the VS Code UI, like displaying the build server output, trace... But that part is very tiny and simple.
The reason that we not put the java implementation part into the jdtls is that we are still evaluating this solution and not decided to replace the Buildship (the current Gradle project support) with it for now.
could you clarify what kind of extension points you have in mind?
I haven't thoroughly thought about it yet. Roughly, I'm thinking that the JDT.LS could have a base BSP project importer, this importer will hold a bsp client that communicates with the build server.
Based on that, different Build server contributor inherits the importer and implements it based on the build server's capability.