-
-
Notifications
You must be signed in to change notification settings - Fork 389
HLS Uses Wrong GHC for Stack Builds #1782
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
Comments
Thank you for the report, Emily! This is related to implicit cradle, as it uses Could you try to add explicit |
@Ailrun Explicitly adding a |
It is using implicit-hie, I missed the line at https://github.com/haskell/haskell-language-server/blob/master/exe/Wrapper.hs#L149 |
Oh, that's the root of the mismatch. @pepeiborra, could you take a look? |
EDIT: It didn't, commit was completely fine. |
Maybe it did, maybe it didn't. Feel free to bisect it and send a patch. I'm not inclined to look at this any time soon since I don't use stack. |
EDIT: nice, forget everything I wrote, I can't read, invocation uses the fallback correctly, see https://github.com/haskell/haskell-language-server/blob/master/exe/Wrapper.hs#L149 |
Could it be? Shouldn't this line https://github.com/haskell/haskell-language-server/blob/master/exe/Wrapper.hs#L149 just be |
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 1.1.0.0 (GHC: 8.10.4) (PATH: /Users/emilypi/.ghcup/bin/haskell-language-server-wrapper-1.1.0) (GIT hash: f1c096927186a93d8e3ccd4fe8385cc1b070350b) Tool versions found on the $PATH cabal: 3.4.0.0 stack: 2.5.1 ghc: 8.8.4
Which OS do you use:
MacOS Big Sur
Which lsp-client do you use:
Emacs
Describe your project (alternative: link to the project):
All of
stack.yaml
,cabal.project
,*.cabal
.See: https://github.com/kadena-io/pact
Contents of
hie.yaml
:NA
Steps to reproduce
Manage a GHC in $PATH that does not match the existing GHC defined by the stack LTS in the
stack.yaml
.Expected behaviour
When generating an implicit
hie.yaml
, if the Stack build is preferred, then HLS should not use $PATH GHC, but rather, defer to the GHC defined for the LTS.Actual behaviour
See here: $PATH GHC is reported, but the stack build results in an implicit cradle for 8.8.3 (the GHC associated with the Stack lts) but the build is initiated with $PATH GHC, resulting in an out of sync build:
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
The text was updated successfully, but these errors were encountered: