Skip to content

Better error message when trying to use an unsupported ghc version #453

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

Closed
Timmmm opened this issue Sep 8, 2021 · 2 comments
Closed

Better error message when trying to use an unsupported ghc version #453

Timmmm opened this issue Sep 8, 2021 · 2 comments
Labels
help wanted type: enhancement An enhancement to an already existing feature type: user experience An enhancement to the UX, e.g. better error handling

Comments

@Timmmm
Copy link

Timmmm commented Sep 8, 2021

I just installed Haskell on a Mac using ghcup, and said "yes" when asked to install the language server. It installed these:

.ghcup/bin/haskell-language-server-8.10.2
.ghcup/bin/haskell-language-server-8.10.2~1.3.0
.ghcup/bin/haskell-language-server-8.10.3
.ghcup/bin/haskell-language-server-8.10.3~1.3.0
.ghcup/bin/haskell-language-server-8.10.4
.ghcup/bin/haskell-language-server-8.10.4~1.3.0
.ghcup/bin/haskell-language-server-8.10.5
.ghcup/bin/haskell-language-server-8.10.5~1.3.0
.ghcup/bin/haskell-language-server-8.6.4
.ghcup/bin/haskell-language-server-8.6.4~1.3.0
.ghcup/bin/haskell-language-server-8.6.5
.ghcup/bin/haskell-language-server-8.6.5~1.3.0
.ghcup/bin/haskell-language-server-8.8.3
.ghcup/bin/haskell-language-server-8.8.3~1.3.0
.ghcup/bin/haskell-language-server-8.8.4
.ghcup/bin/haskell-language-server-8.8.4~1.3.0
.ghcup/bin/haskell-language-server-9.0.1
.ghcup/bin/haskell-language-server-9.0.1~1.3.0
.ghcup/bin/haskell-language-server-wrapper
.ghcup/bin/haskell-language-server-wrapper-1.3.0

However when I try to use this extension it crashes with a not very helpful error message (#429) because:

haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server"]
Cannot find any haskell-language-server exe, looked for: haskell-language-server-8.10.7, haskell-language-server

Not the best beginner experience!

@jneira jneira changed the title Cannot find haskell-language-server by default Better error message when trying to use an unsupported ghc version Sep 9, 2021
@jneira
Copy link
Member

jneira commented Sep 9, 2021

Hi, agree in the error message could be improved. The cause is the actual release of the lsp server (haskell-language-server) does not support ghc-8.10.7, next one will do. You can check the supported versions in the README: https://github.com/haskell/vscode-haskell#supported-ghc-versions

To improve the error message and be precise we should encode the supported versions in the code itself and remember to update each time we do a server release. Maybe there is another way though, pr's welcomed!

@jneira jneira added help wanted type: enhancement An enhancement to an already existing feature type: user experience An enhancement to the UX, e.g. better error handling labels Sep 9, 2021
@fendor
Copy link
Collaborator

fendor commented May 11, 2023

I think the error message has been improved. Closing, feel free to reopen or open a new one if there is something left to do.

@fendor fendor closed this as completed May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type: enhancement An enhancement to an already existing feature type: user experience An enhancement to the UX, e.g. better error handling
Projects
None yet
Development

No branches or pull requests

3 participants