-
Notifications
You must be signed in to change notification settings - Fork 337
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
Handle missing bsp info better #5813
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.
Looks like the Bill server that is used for some of the tests doesn't have something properly set, it's probably one of the capabilities.
Could you take a look?
tests.ServerLivenessMonitorLspSuite and tests.BillLspSuite consistently fail.
cf7e7ce
to
085ed43
Compare
else | ||
buildTarget.getId().getUri() | ||
|
||
name.replaceAll("[^a-zA-Z0-9]+", "-") |
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.
@tgodzik Should I change this so the non A->Z chars are always replaced with -
, not just when DisplayName
is not supplied?
The issue is that in FileDecoderProvider
Metals uses the display name to build up a URI to then display build target info to the user. If there is a non URI valid character then this URI is built incorrectly. You can see that issue also in #5816.
The other option would be to change the way build target info is displayed but that would probably involve changing each individual clients (vscode, vim etc) as well.
@tgodzik I've changed the test server setup to always supply The spec is here and says both |
WorksheetLspSuite fails but that looks as though it's down to artifact downloading? It just hangs when I try and run it locally on Windows so I can't check |
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.
LGTM!
085ed43
to
9202ed2
Compare
I rebased the PR, will merge tomorrow. |
Gradle BSP doesn't support Scala and also doesn't supply a DisplayName. BaseDirectory is also optional in the spec.
Not sure if this is the best way to dynamically create a DisplayName. Currently the ScalaTarget/JavaTarget data is extracted as required. It would probably be better to create classes to hold the info and then create unique DisplayNames for each target as it's not guaranteed that the BSP server supplied DisplayNames will be unique. But possibly not worth it though as I'd hope Gradle would support a DisplayName in next versions.
This is to get the Doctor and Build Info working and tree view partially working and to stop logging of stack traces when BSP server doesn't support certain requests