Skip to content

HLint code-action fails #98

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
jul1u5 opened this issue Dec 17, 2020 · 1 comment
Closed

HLint code-action fails #98

jul1u5 opened this issue Dec 17, 2020 · 1 comment

Comments

@jul1u5
Copy link

jul1u5 commented Dec 17, 2020

Hi,

I am using Doom Emacs 27.1 on NixOS and I am unable to apply any HLint suggestions. I get this error:

LSP :: Please open an issue in lsp-mode for implementing `21782:hlint:applyOne'.

(error "ExitFailure 1")

As per the error message, I was not sure if I should file an issue here or in lsp-mode. Since I was using Haskell LSP, I thought that filing an issue here would be more appropriate. Let me know if that's not the case.

I also noticed that this message appears in *lsp-haskell::stderr* buffer:

Missing file: /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ghc-8.10.2/lib/ghc-8.10.2/settings

It seems that the Nix hash for GHC was supposed to be substituted here but failed for some reason. GHC is actually in /nix/store/4gz77sky04mdw54lcg7h9xpjnsd8873h-ghc-8.10.2 and /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ghc-8.10.2 doesn't exist.

I tried to apply HLint suggestion on VS Code and it worked there. So, I think that the issue is with lsp-haskell or lsp-mode.

@jul1u5
Copy link
Author

jul1u5 commented Dec 17, 2020

I actually get the same issue with VS Code. I mistakenly applied a non-hlint suggestion which worked and thought that Emacs was at fault. However, applying anything of the form Apply hint: ... also fails on VS Code.

So, the issue is probably with haskell-language-server itself or with Nix.

EDIT: this seems to be the root cause haskell/haskell-language-server#591 and alanz/ghc-exactprint#96

@jul1u5 jul1u5 closed this as completed Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant