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

Send LSP error when GHC cannot be found #2713

Merged
merged 2 commits into from
Feb 18, 2022

Conversation

hasufell
Copy link
Member

No description provided.

bindist/wrapper.in Outdated Show resolved Hide resolved
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably spam the message five times, as lsp-clients usually restart if a language server exits with a non-zero exitcode.

@hasufell
Copy link
Member Author

This will probably spam the message five times, as lsp-clients usually restart if a language server exits with a non-zero exitcode.

That's the clients problem. I tested it in vim and VSCode and it appears fine.

Copy link
Collaborator

@pepeiborra pepeiborra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will spam 5 times like @fendor says, but it's hard to improve until we merge the bindist wrapper into the hls wrapper and make the latter able to send a WindowShowMessageRequest ... which might take a while.

@pepeiborra pepeiborra added the merge me Label to trigger pull request merge label Feb 14, 2022
@michaelpj
Copy link
Collaborator

Is there a reason to do this for this error but not for the others?

@hasufell
Copy link
Member Author

Is there a reason to do this for this error but not for the others?

We want to do it for the final error only. The script tries multiple methods to find a GHC version. Reporting all intermediate errors is gonna be excessive.

@michaelpj
Copy link
Collaborator

I see, so the other err_* functions are not in fact reporting errors.

Anyway, if you're into the idea, there's also window/logMessage.

@mergify mergify bot merged commit f1e146b into haskell:master Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants