Repository navigation
Conversation
On an abnormal monitored-build exit, the server formats the exit reason and sends an error show-message containing that text plus a pointer to the build diagnostics and output. When the text mentions dependencies, the message also says to check dependencies and that running mix deps.get is a possible recovery step. A normal exit still produces no popup, and a rebuild that was already pending is still scheduled. Fixes elixir-lsp#1025
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
When the project build crashes, for example after a branch switch leaves dependencies out of date, the editor never warns that the language server has stopped working. The failure is only written to the language server log, so the needed recovery step is easy to miss.
The build monitor already receives the abnormal exit and continues into the existing result handling, which records diagnostics, but that path never sent a message to the client. Ordinary compiler diagnostics and a normal build completion are left without a popup, so a Mix exception stays invisible in the editor.
Summary of the fix
On an abnormal monitored-build exit, the server formats the exit reason and sends an error show-message containing that text plus a pointer to the build diagnostics and output. When the text mentions dependencies, the message also says to check dependencies and that running mix deps.get is a possible recovery step. A normal exit still produces no popup, and a rebuild that was already pending is still scheduled.
Tests
./scripts/tcp_to_stdio_bridge.exscould not run in this environment for the elixir-ls change (./scripts/tcp_to_stdio_bridge.exs is not executable).apps/language_server/test/server_test.exs.Fixes #1025