-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Instructions for Hello World #4496
Comments
Hi, thank you for the bug report! The HLS docs show which GHC version HLS is currently supporting: https://haskell-language-server.readthedocs.io/en/stable/support/ghc-version-support.html Also, following the See the That should give you a working installation. Regarding the second error, you seem to be running into this issue: haskell/cabal#10457 The last HLS release was some time ago, which is very unfortunate as we don't support the |
Looking at your examples in detail, it seems like you are actually trying to manage your HLS installations yourself in VSCode? This might be the reason why everything is crashing. The preferred way is to let GHCup handle that for you. On your first extension startup, VSCode asks you what you want to do, whether you want to use |
@fendor Thanks, I tried changing that (to Manage HLS installations with GHCup) and now when I create a fresh stack project I see this: |
I tried setting all the "recommended" versions in ghcup tui instead of all the latest versions, in particular including Are you actually not finding any of these issues reproduceable? I'm pretty sure I cleared out any relevant custom settings I had. I don't have any dependencies or custom changes to anything, I'm just using ETA: Actually it works fine if I only open |
Well, your initial issues were caused by improper setup, of course I have a hard time to reproduce :) However, we did find it! Stack support does have a couple of issues in HLS, see https://github.com/haskell/haskell-language-server/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22build%20tool%3A%20stack%22 for an overview. The issue you describe sounds familiar to me, it might be #366. To fix it, you have to run Currently, you often have an easier time using |
There seem to be a ten different versions of everything and just picking the latest never works. There's no clarity or documentation anywhere on which pieces are needed in order to get a working "Hello World" project, using either stack or cabal. I'm reporting this as an HLS issue because just picking the latest of everything besides HLS does seem to work if I don't care about editor integration.
Your environment
Which OS do you use?
Ubuntu 24.04
Which version of GHC do you use and how did you install it?
I've been jumping between the various versions in
ghcup tui
trying them out one-by-one.The latest one I see here is 9.12.1.
9.10.1 is the closest I've gotten to everything working.
How is your project built (alternative: link to the project)?
I tried both
cabal init
andstack new
.Which LSP client (editor/plugin) do you use?
VSCode with no settings modifications whatsoever
Which version of HLS do you use and how did you install it?
The latest one available from ghcup tui: 2.9.0.1
Have you configured HLS in any way (especially: a
hie.yaml
file)?No
What's wrong?
It takes excessive trial and error to find a combination of versions for tooling (ghc, hls, stack or cabal) where vscode doesn't complain and when vscode does complain, it gives no hints whatsoever as to how to fix it. There are no instructions anywhere for creating a new project which just works on opening vscode. Here's what I get when I use the latest of everything:
Even when I do manage to get the right combination of versions, I get this error when trying to autoformat:
I tried switching to stack and browsing a bit and eventually figured out it wanted me to use ghc 9.8.4 so I switched to that version. But now when I open vscode I see this error:
Any help figuring out the right version combination would be much appreciated
The text was updated successfully, but these errors were encountered: