vscode-haskell icon indicating copy to clipboard operation
vscode-haskell copied to clipboard

Failed to find the GHC version of this Cabal project. Error when calling cabal exec -v0 -- ghc --print-libdir

Open golddydev opened this issue 7 months ago • 3 comments

Your environment

hls: 2.9.0.1 cabal: 3.12.1.0 ghc: 9.4.8

Which OS do you use?

Ubuntu 22.04 Jammy

How is your project built (alternative: link to the project)?

cabal project

Which LSP client (editor/plugin) do you use?

Haskell Language server extension

Which version of HLS do you use and how did you install it?

Have you configured HLS in any way (especially: a hie.yaml file)?

No

Bug

I couldn't get hls working for my project.

Failed to find the GHC version of this Cabal project. Error when calling cabal exec -v0 -- ghc --print-libdir

golddydev avatar Apr 03 '25 07:04 golddydev

Hi, thank you for your bug report, please follow the instructions here and provide the logs from the extension: https://github.com/haskell/vscode-haskell?tab=readme-ov-file#investigating-and-reporting-problems

fendor avatar Apr 03 '25 07:04 fendor

Same for

Your environment hls: 2.9.0.1 cabal: 3.12.1.0 ghc: 9.6.6

Which OS do you use?

macOS Sequoia 15.5 (Apple M2 Max)

--

Also for

Your environment hls: 2.9.0.0 cabal: 3.10.3.0 ghc: 9.6.6

running on nix-shell (Nix 2.29.0)

Which OS do you use?

macOS Sequoia 15.5 (Apple M2 Max)

Bug

when configured to use HLS from PATH and passing the /nix/store executable path for haskell-language-server, when launching vscode from inside nix shell, haskell-language-server grows in memory indefinetly

ffakenz avatar Jun 11 '25 00:06 ffakenz

https://github.com/haskell/vscode-haskell?tab=readme-ov-file#investigating-and-reporting-problems

Also, what is the output of cabal exec -- ghc --print-libdir?

fendor avatar Jun 11 '25 07:06 fendor