Skip to content

Debug Adapter Server / Client update #267

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

Merged
merged 17 commits into from
Aug 1, 2020

Conversation

david-driscoll
Copy link
Member

@david-driscoll david-driscoll commented Jul 28, 2020

This updates to the latest version of the Debug Adapter Protocol bringing in some of the missing pieces, cancellation, progress and a few other things.

Also adds support for a Server / Client pair exactly like Language Server Protocol has, these are super awesome in testing scenarios.

  • The initialization process is handled.
  • Progress can be sent from the server to the client.
  • Cancellation is now supported
    • This required some gymnastics to get right
    • The cancel handler (implemented by IServerProgressManager will get essentially empty requests for request cancellation, as they get re-routed down the normal cancellation path as provided by the rest of the json rpc bits.
  • The data sent from the server to the client includes the LSP error codes, which are used to re-hydrate the proper exception types on the client side.

Minor change to some types (though they are really only used on the the internals) to include a method, this was to properly fix serialization of DAP responses.

@david-driscoll david-driscoll changed the title Feature/dap server client Debug Adapter Server / Client update Jul 28, 2020
@david-driscoll david-driscoll changed the title Debug Adapter Server / Client update [wip] Debug Adapter Server / Client update Jul 28, 2020
@david-driscoll
Copy link
Member Author

cc @TylerLeonhardt @rjmholt

@david-driscoll david-driscoll changed the title [wip] Debug Adapter Server / Client update Debug Adapter Server / Client update Jul 29, 2020
@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #267 into master will increase coverage by 0.34%.
The diff coverage is 67.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
+ Coverage   63.75%   64.10%   +0.34%     
==========================================
  Files         356      374      +18     
  Lines       11418    12394     +976     
  Branches     1315     1419     +104     
==========================================
+ Hits         7280     7945     +665     
- Misses       3704     3978     +274     
- Partials      434      471      +37     
Impacted Files Coverage Δ
src/Dap.Protocol/Models/Module.cs 0.00% <0.00%> (ø)
src/Dap.Protocol/Serialization/ContractResolver.cs 0.00% <0.00%> (ø)
src/Dap.Testing/LanguageServerTestBase.cs 0.00% <0.00%> (ø)
src/JsonRpc.Testing/AggregateSettler.cs 100.00% <ø> (ø)
src/JsonRpc.Testing/SettlePipeline.cs 100.00% <ø> (ø)
src/JsonRpc.Testing/Settler.cs 84.37% <ø> (ø)
...nRpc/Generation/GenerateHandlerMethodsAttribute.cs 0.00% <ø> (ø)
src/JsonRpc/RequestRouterBase.cs 87.17% <ø> (ø)
src/JsonRpc/Server/Messages/ParseError.cs 0.00% <0.00%> (ø)
src/Server/LspServerReceiver.cs 60.60% <0.00%> (ø)
... and 75 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c6bbaf...40e8319. Read the comment docs.

@TylerLeonhardt
Copy link
Collaborator

Some things I wanna make sure are addressed are:

@david-driscoll
Copy link
Member Author

I knew there were pieces I need to make sure got updated, thanks I'll look at this tonight.

@david-driscoll
Copy link
Member Author

@TylerLeonhardt have any thoughts on how to make it so those requests are more flexible?

I can make it a Dictionary or add a [JsonExtensionData] property... however none of those will be "strongly" typed. Re-defining it honestly seems like the better approach. Perhaps if you derived from the requests themselves and added the properties you want.... I'm not sure.

I didn't get to the second point today, I'll look at that tomorrow.

@david-driscoll david-driscoll merged commit 00dafaa into master Aug 1, 2020
@david-driscoll david-driscoll deleted the feature/dap-server-client branch August 1, 2020 04:53
@TylerLeonhardt
Copy link
Collaborator

👀👀👀👀👀👀

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.

2 participants