dalance/svls

Server crashes

Artentus opened this issue · 5 comments

I'm on Windows 10, installed svls using Cargo and use it in VsCode with the extension.
But unfortunately it's not working, I just get an error message:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', backend.rs:71:66

From glancing at the code it looks like something to do with paths.
Maybe it's related to Windows? Windows is weird with paths.

I'd try to debug this myself but I'm not sure how to debug a language server.

Have you tried running svlint (externally to svls) on your testcase?
We can't see enough information from that panic message.

Yes I have, svlint is working just fine.
I also installed svls on Linux in the meantime and it works as expected there.

I can see the same error in vscode as below, is there a solution to fix this?

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src\backend.rs:71:66
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Info  - 10:32:13 AM] Connection to server got closed. Server will restart.
[Info  - 10:32:13 AM] server initialized
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src\backend.rs:71:66
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Info  - 10:32:15 AM] Connection to server got closed. Server will restart.
[Info  - 10:32:15 AM] server initialized
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src\backend.rs:71:66
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Info  - 10:32:15 AM] Connection to server got closed. Server will restart.
[Info  - 10:32:15 AM] server initialized
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src\backend.rs:71:66
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Info  - 10:32:16 AM] Connection to server got closed. Server will restart.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src\backend.rs:71:66
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Info  - 10:32:16 AM] server initialized
[Error - 10:32:17 AM] The svls language server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.```

Path handling on Windows seems to wrong.
I fixed it, and released v0.2.7.

It's working now, thanks!