You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Errors encountered when parsing cabal file ./hirane.cabal:
hirane.cabal:27:7: error:
unexpected 'L'
expecting space, comma, white space or end of input
26 | Embedded.Hirane.List
27 | Language.Hirane.AST
| ^
Actual behaviour
It just shows a generic message:
Failed to find the GHC version of this Cabal project. Error when calling cabal exec -v0 -- ghc --print-libdir
Include debug information
Execute in the root of your project the command haskell-language-server-wrapper --debug . and paste the logs here (you can find the executable location here):
Debug output:
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.9.0.0 x86_64 ghc-9.6.6
Current directory: /home/user/haskell/hirane
Operating system: linux
Arguments: ["--debug","."]
Cradle directory: /home/user/haskell/hirane
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.12.1.0
stack: Not found
ghc: 9.6.6
Consulting the cradle to get project GHC version...
2024-11-27T20:54:34.546282Z | Debug | cabal exec -v0 -- ghc --print-libdir
Failed to find the GHC version of this Cabal project.
Error when calling cabal exec -v0 -- ghc --print-libdir
Errors encountered when parsing cabal file ./hirane.cabal:
hirane.cabal:27:7: error:
unexpected 'L'
expecting space, comma, white space or end of input
26 | Embedded.Hirane.List
27 | Language.Hirane.AST
| ^
Paste the contents of extension specific log, you can check instructions about how to find it here
The issue is that this error is shown before HLS is actually launched.
This error is most likely produced by haskell-language-server-wrapper, trying to decide which GHC version to use to compile your project with.
Consequentially, we don't have a VFS, we don't know which file is responsible for loading the cradle, thus, we can't really display a diagnostic. To implement this, we would need to expand the LSP features implemented by the wrapper.
Moreover, the pop-up can only display newline characters, no other kind of formatting is supported.
If we displayed the full error message, it would be completely unreadable.
In the future, the situation might be improved via the cabal path command, as this doesn't resolve the .cabal file, allowing the wrapper to launch the HLS binary and getting proper diagnostics.
Moreover, the pop-up can only display newline characters, no other kind of formatting is supported.
If we displayed the full error message, it would be completely unreadable.
As a very low tech solution, could the pop-up show a button that when clicked opens a new temporary file which contains the full error text?
Another idea I have is that it could point out that the user can run cabal build manually to see the full error.
Your environment
Which OS do you use: NixOS
Steps to reproduce
Expected behaviour
The error should be shown. In my case:
Actual behaviour
It just shows a generic message:
Include debug information
Execute in the root of your project the command
haskell-language-server-wrapper --debug .
and paste the logs here (you can find the executable location here):Debug output:
Paste the contents of extension specific log, you can check instructions about how to find it here
Extension log:
The text was updated successfully, but these errors were encountered: