microsoft/build-server-for-gradle

Compatibility with scala metals?

merisbahti opened this issue · 3 comments

Hey, I see that scala metals can use a custom BSP-compatible server (https://scalameta.org/metals/blog/2020/11/06/sbt-BSP-support/)

Is it possible to use build-server-for-gradle with metals?

jdneo commented

Maybe @Arthurm1 could answer this question.

@merisbahti Not yet
There is a Metals feature request here

The following needs to be done...

  1. Metals needs to support dependencyModules which I have a half-done PR for
  2. Some form of #113 needs to be merged
  3. Build-server-for-Gradle needs to be published to maven See #115
  4. Metals needs to take advantage of 3). Which should be fairly trivial

This would get Metals working locally but with minimal functionality. The following would still be missing...

  1. Diagnostics. e.g. you'd see no compile errors or warnings. Gradle team seem to be actively working on a Problems API which would return diagnostics. Should be fairly trivial to tie into once they've completed it.
  2. Run tests, debug, run main class. I'm not sure where the line is drawn here between Metals and this project. I'm hoping this issue would mean that it would be fairly easy to add debug support to this project.

Thanks for the response! That really answers my question, since we have a PR up already, we could close this issue.