haskell / haskell/vscode-haskell

Figure out ghc project version even if ghc is not installed

Open
#557 8 comments 0 reactions 0 assignees View on GitHub
type: enhancement type: setup
Dominant language
TypeScript
Stars
597
Forks
98
PR merge metrics
No merged PRs in 30d

Description

Invoking `haskell-language-server-wrapper --project-ghc-version` may fail with:

```
$ haskell-language-server-wrapper --project-ghc-version 326ms  Fri 17:36
Found "/home/hasufell/git/ghcup-hs/hie.yaml" for "/home/hasufell/git/ghcup-hs/a"
Failed to get project GHC version: CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Error when calling cabal exec -v0 -- ghc --print-libdir","","cabal: Cannot find the program 'ghc'. User-specified path 'ghc-8.10.1' does\nnot refer to an executable and the program is not on the system path.\n\n"]}
```

when the ghc in question is not installed. That means the extension is currently unable to set up a project GHC, unless it is already installed *somewhere*.

This is cabal specific, but rather unergonomic.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.