Skip to content

Figure out ghc project version even if ghc is not installed #557

Open
@hasufell

Description

@hasufell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementAn enhancement to an already existing featuretype: setupIssues related with the extension setup, including binaries downloads

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions