-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Got this error on more than one machine (both MacBooks) when upgrading to HLS 1.0.0:
Couldn't figure out what GHC version the project is using: Failed to download https://github.com/haskell/haskell-language-server/releases/download/1.0.0/haskell-language-server-wrapper-macOS.gz: ENOENT: no such file or directory, rename '/Users/lyle/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.0.0-darwin.download' -> '/Users/lyle/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.0.0-darwin'
In both cases I had changed my Stack resolver version to lts-17.4 so I would be using GHC 8.10.4. On the first machine, the process was a bit messy. I had changed the stack.yaml while VS Code was open. I had not attempted to build the project, so I think the new GHC wasn't even downloaded at first. So I learned from this and did things very cleanly on the second machine:
- Shut down VS Code
- Updated
stack.yamlto use resolverlts-17.4(GHC 8.10.4) instead oflts-17.2(GHC 8.10.3) - Ran
stack buildon the command line - project built successfully - Re-opened VS Code
At that point, the extension detected there was an update, and then reported that error above. I should note in this case there's also a hie.yaml file. I don't understand why it can't figure out what version of GHC is being used.
So I closed VS Code and opened it again. And then everything worked fine.
Is there a suggested ordering of operations when doing an update, to avoid such errors?