-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Error on module with Persistent's quasi-quote expressions #392
Comments
Maybe it will be fixed with TH full support: haskell/ghcide#836 |
That is merged already on ghcice repo. When can we expect it to be merged with HLS? |
So we can assume the issue is fixed then, no? |
@fabioluz master (and the incoming 0.6 release) already includes the th improvements from ghcide, could you give a try? |
@jneira It shows the same error.
Debug output:
I have this stand-alone ghc-8.0.2 on the $PATH, which was installed via apt-get. Is it possible it is causing issues? |
Thanks for trying it. |
I'm also getting on all files that use TemplateHaskell:
With Haskell Language Server 0.6.0, GHC 8.8.4. |
I get the "Unexpected usage error" on haskell-language-server version: 0.8.0.0 (GHC: 8.6.5) on NixOS 20.09.2642.88f00e7e12d (Nightingale) The files that fail have Using the diagnostic mode I can extract the complete error message:
Also, as a workaround, I switched to GHC 8.10.2 where everything works fine with (This workaround comes at a price, though. EDIT: for completeness sake: Moving to GHC 8.10.2 solved the issue together with a workaround regarding filepaths (cf. #481 (comment)) |
I cannot currently give a more full diagnosis, but I will say I am interested in this bug being fixed. Hls is failing in a TemplateHaskell file on 0.8.0.0 with GHC 8.6.5. I am using reflex-dom on nix and so I am unable to switch to a newer version of GHC. |
Heads up: This issue arises when using an HLS binary in a project that was not compiled with the same GHC binary that is being used to compile the project. I'm assuming that this is reason for the badly-linked glibc. My issue arose from running an HLS binary in an Obelisk and but failing to compile my HLS binary in nix-shell. This occurred even_though the two binaries were both GHC-8.6.5, which is extremely frustrating of course. I don't know of a good workaround currently sadly - the actual way to fix this is to add a haskell-language-server derivation to your nix environment. My quickfix was to hop into nix-shell and go back 100 commits at a time from hls's repo's head until hls compiled (for me at HEAD in an obelisk project, this was ^100). Some related work for those looking for a more permanent solution: |
I am gonna close this issue as all compiler crashes seems to have the same root cause:
If any of you think the issue should not be included generically feel free to reopen it (with a brief explanation if possible) |
Subject of the issue
Module with TH code used for generating Persistent entities shows the following error:
It is very similar to the issue that was once solved here (the same file with no changes) https://github.com/haskell/ghcide/issues/581
Your environment
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
https://github.com/fabioluz/tripper - be aware it uses nix. If you don't have nix, it might take a bit to compile the first time.
Steps to reproduce
Wait for HLS to initialize.
Expected behaviour
No errors should be shown? Intellisense should work normally.
Actual behaviour
Errors are shown in the console. Intellisense is not working correctly.
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: