Skip to content
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

refactor: DAP via LSP messages #109

Merged
merged 29 commits into from
Mar 26, 2021

Conversation

slavek-kucera
Copy link
Contributor

No description provided.

@slavek-kucera slavek-kucera marked this pull request as ready for review March 4, 2021 09:19
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
Copy link
Contributor

@michalbali256 michalbali256 left a comment

Choose a reason for hiding this comment

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

Nice PR.

Do you think you could add one more test that would simulate running macro tracer while receiving LSP requests? This is the first PR that allows simultaneous processing of DAP and LSP requests and the test could detect some hard-to-discover bugs in combination with TSAN in the future.

language_server/src/dap/dap_message_wrappers.h Outdated Show resolved Hide resolved
language_server/src/dispatcher.h Show resolved Hide resolved
language_server/src/lsp/channel.cpp Outdated Show resolved Hide resolved
language_server/src/main.cpp Show resolved Hide resolved
language_server/src/main.cpp Outdated Show resolved Hide resolved
ret = lsp_dispatcher.run_server_loop();
auto msg = channel.read();
if (!msg.has_value())
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I understand, the language server ends when the input pipe is destroyed. That is somewhat incompliant with the LSP spec which says that the server should exit after exit notification.

When we didn't have the exit mechanizm implemented correctly in the past, we had problems on Mac OS, where the language_server executable would never end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you sure it was due to the pipe not being closed rather then the server getting stuck somewhere else?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I am not sure, I just think we should try it somewhere. But I do not have Mac available..

language_server/test/blocking_queue_test.cpp Outdated Show resolved Hide resolved
parser_library/include/debugger.h Show resolved Hide resolved
parser_library/include/sequence.h Outdated Show resolved Hide resolved
parser_library/src/debugging/debugger.cpp Outdated Show resolved Hide resolved
Signed-off-by: Slavomir Kucera <slavomir.kucera@broadcom.com>
@slavek-kucera
Copy link
Contributor Author

Regarding the extra test - I think there is an existing problem where debug_lib_provider holds on to a reference to an object that could be dead. This PR certainly won't help with that, so I am thinking of moving to shared_ptr in the future.

@sonarqubecloud
Copy link

@michalbali256 michalbali256 merged commit 044acad into eclipse-che4z:development Mar 26, 2021
@slavek-kucera slavek-kucera deleted the dap-via-lsp branch April 26, 2021 13:57
@github-actions
Copy link

🎉 This PR is included in version 0.13.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Jun 1, 2021

🎉 This PR is included in version 0.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants