Skip to content

Couldn't figure out GHC version when upgrading #351

@lylek

Description

@lylek

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.yaml to use resolver lts-17.4 (GHC 8.10.4) instead of lts-17.2 (GHC 8.10.3)
  • Ran stack build on 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    os: macOSmacOS related issuestype: bugA bug or unintended effect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions