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

Bug #130: Support for JSON-RPC-like Debug Server Protocol's RPC #131

Merged
merged 5 commits into from Nov 29, 2017

Conversation

Projects
None yet
5 participants
@jonahgraham
Contributor

jonahgraham commented Nov 13, 2017

This provides the supporting RPC implementation for VSCode's Debug Protocol
as defined https://github.com/Microsoft/vscode-debugadapter-node/blob/master/debugProtocol.json

See the class comment on DebugMessageTypeAdapterFactory for details on
mapping between Debug Server Protocol and JSON-RPC 2.0.

Signed-off-by: Jonah Graham jonah@kichwacoders.com

@eclipsewebmaster

This comment has been minimized.

Show comment
Hide comment
@eclipsewebmaster
Collaborator

eclipsewebmaster commented Nov 13, 2017

@mickaelistria

This comment has been minimized.

Show comment
Hide comment
@mickaelistria

mickaelistria Nov 16, 2017

Contributor

@svenefftinge @spoenemann @akosyakov Is there anything I can do to help on this topic? I'm eager to see progress there and can allocate most of my time.

Contributor

mickaelistria commented Nov 16, 2017

@svenefftinge @spoenemann @akosyakov Is there anything I can do to help on this topic? I'm eager to see progress there and can allocate most of my time.

@svenefftinge

This comment has been minimized.

Show comment
Hide comment
@svenefftinge

svenefftinge Nov 17, 2017

Contributor

@jonahkichwacoders thanks for the PR.
Could we vote you in as a committer and maintainer of this part?

Contributor

svenefftinge commented Nov 17, 2017

@jonahkichwacoders thanks for the PR.
Could we vote you in as a committer and maintainer of this part?

@spoenemann

Thank you for this proposal! The code seems to me of very high quality. I would support your nomination as a committer :-)

Are you planning to also implement service interfaces with corresponding data structures in the style of org.eclipse.lsp4j.services.LanguageServer? Or have you already done that?

@spoenemann

This comment has been minimized.

Show comment
Hide comment
@spoenemann

spoenemann Nov 17, 2017

Member

@eclipsewebmaster

Issue tracker reference:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=130

That makes no sense. Has probably been triggered by Jonahs mention of Bug #130. So better use the term "issue" in this context :-D

Member

spoenemann commented Nov 17, 2017

@eclipsewebmaster

Issue tracker reference:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=130

That makes no sense. Has probably been triggered by Jonahs mention of Bug #130. So better use the term "issue" in this context :-D

@jonahgraham

This comment has been minimized.

Show comment
Hide comment
@jonahgraham

jonahgraham Nov 17, 2017

Contributor

Could we vote you in as a committer and maintainer of this part?

Yes.

Contributor

jonahgraham commented Nov 17, 2017

Could we vote you in as a committer and maintainer of this part?

Yes.

@jonahgraham

This comment has been minimized.

Show comment
Hide comment
@jonahgraham

jonahgraham Nov 17, 2017

Contributor

Thank you for this proposal! The code seems to me of very high quality. I would support your nomination as a committer :-)

Thanks.

Are you planning to also implement service interfaces with corresponding data structures in the style of org.eclipse.lsp4j.services.LanguageServer? Or have you already done that?

I am planning to create a PR in the coming days with the equivalent for the debug protocol. It is generated from the debug protocol json schema. Originally I was going to put it in a plug-in called org.eclipse.dsp4j, but based on your other comments, perhaps org.eclipse.lsp4j.debug would make more sense.

Contributor

jonahgraham commented Nov 17, 2017

Thank you for this proposal! The code seems to me of very high quality. I would support your nomination as a committer :-)

Thanks.

Are you planning to also implement service interfaces with corresponding data structures in the style of org.eclipse.lsp4j.services.LanguageServer? Or have you already done that?

I am planning to create a PR in the coming days with the equivalent for the debug protocol. It is generated from the debug protocol json schema. Originally I was going to put it in a plug-in called org.eclipse.dsp4j, but based on your other comments, perhaps org.eclipse.lsp4j.debug would make more sense.

@jonahgraham

This comment has been minimized.

Show comment
Hide comment
@jonahgraham

jonahgraham Nov 17, 2017

Contributor

So better use the term "issue" in this context :-D

OK.

Contributor

jonahgraham commented Nov 17, 2017

So better use the term "issue" in this context :-D

OK.

@spoenemann

This comment has been minimized.

Show comment
Hide comment
@spoenemann

spoenemann Nov 17, 2017

Member

It seems like the word "bug" is not necessary for triggering the Bugzilla bot, see eclipse/kapua#131

Member

spoenemann commented Nov 17, 2017

It seems like the word "bug" is not necessary for triggering the Bugzilla bot, see eclipse/kapua#131

Issue #130: Add new tests to check every possible ordering of JSON
The DSP implementation created some new tests for checking every order
of fields in a JSON message. This commit adapts the same test for LSP
messages.

Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
@jonahgraham

This comment has been minimized.

Show comment
Hide comment
@jonahgraham

jonahgraham Nov 23, 2017

Contributor

@spoenemann I have updated the code with all your feedback and it is again ready for review.

This update has the next part too, the service protocol files. As the DSP has a Json Schema that defines it, the DebugProtocol.java, IDebugProtocolClient and IDebugProtocolServer are auto-generated using a generator derived from the typescript generator used by vscode. Please see the instructions for the generator in the root of the org.eclipse.lsp4j.debug plug-in. I don't know if the licensing of the generator allows it to live in the lsp4j code base. I also don't know if continuing to generate it automatically as the protocol evolves is the best plan either, so perhaps the generator is only useful to bootstrap the project?

Contributor

jonahgraham commented Nov 23, 2017

@spoenemann I have updated the code with all your feedback and it is again ready for review.

This update has the next part too, the service protocol files. As the DSP has a Json Schema that defines it, the DebugProtocol.java, IDebugProtocolClient and IDebugProtocolServer are auto-generated using a generator derived from the typescript generator used by vscode. Please see the instructions for the generator in the root of the org.eclipse.lsp4j.debug plug-in. I don't know if the licensing of the generator allows it to live in the lsp4j code base. I also don't know if continuing to generate it automatically as the protocol evolves is the best plan either, so perhaps the generator is only useful to bootstrap the project?

@spoenemann

Excellent!

As long as the main source for the DSP is a JSON schema, it totally makes sense to generate the Java code from it. Ideally, the generator would be in this project (org.eclipse.lsp4j.generator), but probably we cannot just copy the code from Microsoft/vscode-debugadapter-node or a derived version of it. We can leave that problem for later and first make this PR ready for merge.

jonahgraham added some commits Nov 13, 2017

Issue #130: Support for JSON-RPC-like Debug Server Protocol
This provides the supporting RPC implementation for VSCode's Debug Protocol
as defined https://github.com/Microsoft/vscode-debugadapter-node/blob/master/debugProtocol.json

See the class comment on DebugMessageTypeAdapter for details on
mapping between Debug Server Protocol and JSON-RPC 2.0.

See DebugProtocol/IDebugProtocolClient/IDebugProtocolServer for the Java
Service Interfaces and supporting types.

Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Issue #136: Test demonstrating misbehaving Exception Handler
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Issue #136: Fix for missing response error object
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Fix minor Javadoc warnings
These are warnings always seen when running gradle build

Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
@jonahgraham

This comment has been minimized.

Show comment
Hide comment
@jonahgraham

jonahgraham Nov 28, 2017

Contributor

@spoenemann Its ready, I have hopefully addressed all your concerns adequately. With the generation of DebugProtocol.xtend and using the existing generator as the second-pass generator makes it much easier to read DebugProtocol.xtend and the generated javadoc still looks fine.

Contributor

jonahgraham commented Nov 28, 2017

@spoenemann Its ready, I have hopefully addressed all your concerns adequately. With the generation of DebugProtocol.xtend and using the existing generator as the second-pass generator makes it much easier to read DebugProtocol.xtend and the generated javadoc still looks fine.

@spoenemann

Looks good to me, thanks again!

A further improvement would be to generate @NonNull annotations from the required properties in the schema, but I'll create a separate issue for that.

* <p>
* Auto-generated from debugProtocol.json schema version 1.24.0. Do not edit manually.
*/
class DebugProtcol {

This comment has been minimized.

@spoenemann

spoenemann Nov 29, 2017

Member

I think this class could be removed now.

@spoenemann

spoenemann Nov 29, 2017

Member

I think this class could be removed now.

@spoenemann spoenemann merged commit 0cacee9 into eclipse:master Nov 29, 2017

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