Skip to content

Add debug provider to build server capabilities#161

Merged
jastice merged 6 commits intobuild-server-protocol:masterfrom
er1c:debug-provider
Mar 2, 2021
Merged

Add debug provider to build server capabilities#161
jastice merged 6 commits intobuild-server-protocol:masterfrom
er1c:debug-provider

Conversation

@er1c
Copy link
Copy Markdown
Contributor

@er1c er1c commented Feb 15, 2021

This attempts to address #145

Specifically, looking to improve how metals can support debug support: https://github.com/adpi2/metals/pull/1/files#diff-2249f2a7f1d0baedcc556404e0eb12adcd38f5fdb4d0d640d662643bc3de5b1fR514

TODO:

  • Add an explicit json deserialization test for BuildTargetCapabilities to verify backward compatability

Copy link
Copy Markdown
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution! This is a good improvement. The implementation looks good. Can you please update specification.md to match the implementation?

For better or worse, there's a lot of repetition in adding new BSP features 😅

@er1c er1c requested a review from olafurpg February 16, 2021 19:26
@er1c
Copy link
Copy Markdown
Contributor Author

er1c commented Feb 16, 2021

@olafurpg thanks, I've attempted to add the correct information to specification.md

Copy link
Copy Markdown
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 thank you! cc/ @tgodzik does this look ok from Metals perspective?

@tgodzik
Copy link
Copy Markdown
Collaborator

tgodzik commented Feb 17, 2021

I think we should already be able to use canRun/canDebug - I didn't realise we had that. And since we implement both that and debug I don't imagine it would be super useful in case of Metals. I do believe it's a worthwhile addition and might be useful in the future.

@er1c
Copy link
Copy Markdown
Contributor Author

er1c commented Feb 17, 2021

I think we should already be able to use canRun/canDebug - I didn't realise we had that. And since we implement both that and debug I don't imagine it would be super useful in case of Metals. I do believe it's a worthwhile addition and might be useful in the future.

FYI: canDebug is only added/available as part of this PR, so I'm not sure I understand your comment about it not being useful to Metals. The example is https://github.com/adpi2/metals/pull/1/files#diff-2249f2a7f1d0baedcc556404e0eb12adcd38f5fdb4d0d640d662643bc3de5b1fR514 - which needs to be updated to be based upon the BSP capabilities rather than just .isBloop.

Copy link
Copy Markdown
Member

@adpi2 adpi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@er1c er1c requested a review from jastice February 22, 2021 18:15
@er1c
Copy link
Copy Markdown
Contributor Author

er1c commented Feb 25, 2021

I got a deserialization failure when trying

    val legacyJson =
      """
        |{
        |  "canCompile": true,
        |  "canTest": true,
        |  "canRun": true
        |}""".stripMargin

against the scala code - java worked, but still need to look into that issue, so please don't merge until I can add this backward compatible test

Update

I got this fixed and added an explicit test. I had to add in circe-generic-extras that adds support for default values on the scala side.

@er1c er1c force-pushed the debug-provider branch 2 times, most recently from 92720b0 to f862ef3 Compare February 26, 2021 00:23
Copy link
Copy Markdown
Member

@jastice jastice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the compat fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal] - Can we add a DebugAdaptorProvider (or something similiar) into the BuildServerCapabilities?

5 participants