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

LSP crash #3129

Closed
slyredbeard opened this issue May 11, 2024 · 3 comments
Closed

LSP crash #3129

slyredbeard opened this issue May 11, 2024 · 3 comments

Comments

@slyredbeard
Copy link

slyredbeard commented May 11, 2024

Few days ago everything was fine. Today i noticed, that lsp is not working in my VSCode. I tried to run it manually and here is what i get:

$ gleam lsp
Hello human!

This command is intended to be run by language server clients such
as a text editor rather than being run directly in the console.

Many editors will automatically start the language server for you
when you open a Gleam project. If yours does not you may need to
look up how to configure your editor to use a language server.

You can exit this program by pressing ctrl+c.


error: Fatal compiler bug!

This is a bug in the Gleam compiler, sorry!

Please report this crash to https://github.com/gleam-lang/gleam/issues/new
and include this error message with your report.

Panic: compiler-core\src\language_server\server.rs:421
        LSP initialize: ProtocolError("disconnected channel", true)
Gleam version: 1.1.0
Operating system: windows

If you can also share your code and say what file you were editing or any
steps to reproduce the crash that would be a great help.

You may also want to try again with the `GLEAM_LOG=trace` environment
variable set.

I created new empty project. gleam run works fine, gleam test works fine. gleam lsp is not working. I tried running it with GLEAM_LOG=trace and haven't noticed any difference. If I can somehow provide more iformation - i am ready.

@lpil
Copy link
Member

lpil commented May 13, 2024

Hello! The language server will not work without a client.

When you say it doesn't work in vscode what do you mean? Thanks

@slyredbeard
Copy link
Author

When you say it doesn't work in vscode what do you mean? Thanks

It did not underline syntactic mistakes with red squiggly line, nor give me any suggestions after ".", I couldn't even determine if my code is going to compile or not.

I had used it successfully for several days in several toy projects, so I know how it looks like when it works. I know for sure that at the moment I couldn't fix it with reopening the project, nor with creating another fresh one, nor after rebooting my pc.
Today it works again though. And I see that provided error is not really helpful. It asked me to post an issue, so I did. Probably was some temporary failure somewhere...

@lpil
Copy link
Member

lpil commented May 19, 2024

Fab, thank you

@lpil lpil closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
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