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

Support exit notification #16

Closed
etherbob opened this issue Dec 1, 2023 · 3 comments
Closed

Support exit notification #16

etherbob opened this issue Dec 1, 2023 · 3 comments

Comments

@etherbob
Copy link

etherbob commented Dec 1, 2023

Per a report from another user who tested out building and running fuzzy_rubby_server standalone:

I could manage to build and install the LSP by:
git clone the project
cd to the project directory
build the executable : cargo build --release --target=aarch64-apple-darwin
symlink the .../fuzzy_ruby_server/bin/fuzzy_darwin-arm64 binary into the standard bin/. directory
configure BBEdit to use this binary for the ruby language
The LSP seems to be working as expected and logged in the LanguageServerProtocol-Ruby.txt file.
But there is a caveat: BBEdit will freeze when quitting, probably due to the LSP not behaving as expected when asked to shutdown.
I suspect the LSP does not respond to the Exit Notification.
{"jsonrpc":"2.0","id":2,"method":"shutdown"}Content-Length: 38

{"jsonrpc":"2.0","result":null,"id":2}Content-Length: 33

{"jsonrpc":"2.0","method":"exit"} ...
If this is indeed the cause, it should be reported to the developer.

With the disclaimer that I've not done anything in rust before, but I didn't see anything in the server to handle "exit" requests. I also couldn't tell for certain if TowerLSP is supposed to handle exit requests without any additional implementation.

@etherbob
Copy link
Author

etherbob commented Dec 1, 2023

Ahh, might indeed be a TowerLSP issue.

@pheen
Copy link
Owner

pheen commented Jul 4, 2024

It should be responding to shutdown requests. As a backup, Fuzzy grabs the editor process and watches it and will automatically shut down when the editor process is no longer available. https://github.com/pheen/fuzzy_ruby_server/blob/master/src/main.rs#L42-L58

@pheen pheen closed this as completed Jul 4, 2024
@etherbob
Copy link
Author

@pheen I might be misundersatnding but per ebkalderon/tower-lsp#399 and reports from other users it is not responding to exit requests and the editor itself is hanging waiting for the server to exit.

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

No branches or pull requests

2 participants