Skip to content

The message "Project requires GHC but it isn't installed" is misleading. #1594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fmehta opened this issue Mar 19, 2021 · 1 comment
Closed
Labels
build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@fmehta
Copy link
Contributor

fmehta commented Mar 19, 2021

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 --' and alias 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.

@Ailrun
Copy link
Member

Ailrun commented Mar 19, 2021

Duplicate of #692.

@Ailrun Ailrun closed this as completed Mar 19, 2021
@Ailrun Ailrun added build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. type: setup labels Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants