tooltitude / support

Tooltitude Support
https://www.tooltitude.com
Other
21 stars 0 forks source link

Does not work in vscode ssh mode #42

Closed ykl1377 closed 3 months ago

ykl1377 commented 3 months ago

It works fine on my macpro, but it doesn't work properly in vscode ssh mode

Tooltitude Version: v0.86.3

OS Version: debian 10

VS Code Version: 1.92.1

Go Version: 1.22.5

Code Repository (if open source):

What did you try to do?

Is there anything interesting in the tooltitude output channel? (should be open if you are reporting error from within VS Code)

Steps to reproduce

2024-08-09T15:31:32.198272Z INFO lsp_notification{method="exit"}: new 2024-08-09T15:31:32.198291Z INFO lsp_notification{method="exit"}: close time.busy=9.41µs time.idle=10.5µs 2024-08-09T15:31:32.198969Z ERROR Error while reading a message: EOF Reached thread 'main' panicked at /home/builder/actions-runner/_work/lang-tk/lang-tk/lang-tk-core/crates/lsp/src/raw.rs:269:44: called Result::unwrap() on an Err value: RecvError stack backtrace: 2024-08-09T15:31:32.203426Z INFO Tooltitude language server started 2024-08-09T15:31:32.203451Z INFO Setting up server. full_lsp=false 2024-08-09T15:31:32.203879Z INFO lsp_request{method="initialize" id=0}: new 2024-08-09T15:31:32.204127Z INFO lsp_request{method="initialize" id=0}: close time.busy=235µs time.idle=12.5µs 2024-08-09T15:31:32.204515Z INFO lsp_notification{method="initialized"}: new 2024-08-09T15:31:32.204559Z INFO lsp_notification{method="initialized"}: close time.busy=39.7µs time.idle=4.36µs 2024-08-09T15:31:32.206112Z INFO lsp_notification{method="textDocument/didOpen"}: new 2024-08-09T15:31:32.206134Z INFO lsp_notification{method="textDocument/didOpen"}: close time.busy=17.6µs time.idle=4.54µs 2024-08-09T15:31:32.206380Z INFO lsp_response{id=0}: new 2024-08-09T15:31:32.206392Z INFO lsp_response{id=0}: close time.busy=6.65µs time.idle=5.46µs 2024-08-09T15:31:32.206909Z INFO lsp_response{id=1}: new 2024-08-09T15:31:32.206930Z INFO lsp_response{id=1}: close time.busy=9.20µs time.idle=12.6µs 2024-08-09T15:31:32.209305Z INFO sync_mods: new 2024-08-09T15:31:32.209336Z INFO sync_mods:download_mods: new 2024-08-09T15:31:32.209339Z INFO sync_mods:download_mods: Downloading deps for "/home/xxx/source/xxx/xxx" note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. thread '' panicked at /home/builder/actions-runner/_work/lang-tk/lang-tk/lang-tk-core/crates/lsp/src/raw.rs:249:41: called Result::unwrap() on an Err value: RecvError stack backtrace: 2024-08-09T15:31:32.297080Z INFO lsp_request{method="textDocument/codeAction" id=1}: new 2024-08-09T15:31:32.297130Z INFO lsp_request{method="textDocument/codeAction" id=1}: close time.busy=33.8µs time.idle=17.6µs 2024-08-09T15:31:32.300001Z INFO lsp_request{method="textDocument/inlayHint" id=2}: new 2024-08-09T15:31:32.300021Z INFO lsp_request{method="textDocument/inlayHint" id=2}: close time.busy=15.6µs time.idle=4.52µs [Error - 11:31:32 PM] Server process exited with code 101. 2024-08-09T15:31:32.427607Z INFO sync_mods:download_mods: close time.busy=218ms time.idle=3.96µs 2024-08-09T15:31:32.427642Z INFO sync_mods:list_mod_data: new 2024-08-09T15:31:32.427648Z INFO sync_mods:list_mod_data:list_vendored: new 2024-08-09T15:31:32.427662Z INFO sync_mods:list_mod_data:list_vendored: close time.busy=11.3µs time.idle=2.78µs 2024-08-09T15:31:32.427666Z INFO sync_mods:list_mod_data:get_go_env: new 2024-08-09T15:31:32.433486Z INFO sync_mods:list_mod_data:get_go_env: close time.busy=5.82ms time.idle=2.83µs 2024-08-09T15:31:32.433511Z INFO sync_mods:list_mod_data:list_mods: new 2024-08-09T15:31:32.536625Z INFO lsp_request{method="textDocument/codeLens" id=3}: new 2024-08-09T15:31:32.536666Z INFO lsp_request{method="textDocument/codeLens" id=3}: close time.busy=23.2µs time.idle=20.1µs 2024-08-09T15:31:32.675875Z INFO sync_mods:list_mod_data:list_mods: close time.busy=242ms time.idle=3.61µs

tooltitude-support commented 3 months ago

Thanks for your feedback!

The cancelled error which you highlighted, isn't really an error. It's a way to cancel request in the LSP.

This one seem to be the real error: [Error - 11:31:32 PM] Server process exited with code 101. Do you have logs around that?

P.S. I work in a remote ssh mode all the time, and it works fine for me, so it should be something specific either to your project, or to configuration of your machine.

tooltitude-support commented 3 months ago

called Result::unwrap() on an Err value: RecvError

This seems to be relevant. I have seen panics related to that, but they are pretty rare, and I am don't know what they are caused by. Do you have anything related to shutdown in the output? Do you use hardlinks in the structure of your project?

tooltitude-support commented 3 months ago

[Error - 11:31:32 PM] Server process exited with code 101.

So this message has timestamp 31:32, i.e. likely after the full log, i.e. messages are printed out of order. My guess is that the process is terminated due to some error which I would like to find in the logs.

tooltitude-support commented 3 months ago

Also, often it's much easier to solve problems like this via chat. Consider joining our discord and contacting the tooltitude-support account directly: https://discord.gg/f9MHBXsVwr

ykl1377 commented 3 months ago

called Result::unwrap() on an Err value: RecvError

This seems to be relevant. I have seen panics related to that, but they are pretty rare, and I am don't know what they are caused by. Do you have anything related to shutdown in the output? Do you use hardlinks in the structure of your project?

It should be caused by the soft links. My old working directory is "/home/xxxx/source/word_base", "/home/xxxx" is a soft link, this situation does not work. After I copy the project directory outside like "/home/word_base", it worked normally.

Could you help confirm why soft links are not supported?

ykl1377 commented 3 months ago

[Error - 11:31:32 PM] Server process exited with code 101.

So this message has timestamp 31:32, i.e. likely after the full log, i.e. messages are printed out of order. My guess is that the process is terminated due to some error which I would like to find in the logs.

When I restart the language server, this error will be reported. It should be normal.

tooltitude-support commented 3 months ago

It should be caused by the soft links. My old working directory is "/home/xxxx/source/word_base", "/home/xxxx" is a soft link, this situation does not work. After I copy the project directory outside like "/home/word_base", it worked normally.

Thanks a lot! This is very helpful. Will investigate what's going on there further.

Could you help confirm why soft links are not supported?

It's not intended behavior. It was just my guess of what might be causing this issue based on my previous experience.

tooltitude-support commented 3 months ago

@ykl1377 Kind of reproduced it. If I open via a symlink, no code lenses are shown, but I don't see any errors like the one mentioned by you. Will investigate further

tooltitude-support commented 3 months ago

@ykl1377 Reproduced and fixed it. It wasn't the bug which I was thinking about. It's fixed now, and available in 0.87.1, which is out now. Please update, and let us now if it still reproduces.

ykl1377 commented 3 months ago

@ykl1377 Reproduced and fixed it. It wasn't the bug which I was thinking about. It's fixed now, and available in 0.87.1, which is out now. Please update, and let us now if it still reproduces.

It works fine after the update, thanks.

tooltitude-support commented 3 months ago

@ykl1377 Ok. Thanks. Closing the issue.