The message "Project requires GHC but it isn't installed" is misleading. #1594
Labels
build tool: stack
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
The message "Project requires GHC but it isn't installed" is shown even though stack is correctly installed and available on the PATH within the VS Code Terminal.
Possibly related issues: #1593 , #236
Which lsp-client do you use:
VS Sodium
Steps to reproduce
Open a directory NOT containing a stack project. Open a file with the .hs extension.
Setup: Ghc is installed via stack, with the aliases
alias ghc='stack ghc --'
andalias ghci='stack ghci --'
Expected behaviour
VS Code checks that stack is installed when opening standalone .hs files, and if so, uses it instead of ghc.
Or/And the error message is helpful. For instance:
For standalone .hs/.lhs files, ghc must be installed and on the PATH.
In case you were trying to open a .hs/.lhs file within a stack project, make sure that you are opening the root directory of your stack project within VS Code.
Actual behaviour
The user gets the message "Project requires GHC but it isn't installed" and wonders why this is showing up, since stack is installed (possibly even with an alias for ghc & ghci).
Note: To be fair, the readme does mention that "For standalone .hs/.lhs files, ghc must be installed and on the PATH.", but one would assume, that having a working version of stack installed would also be sufficient.
The text was updated successfully, but these errors were encountered: