-
-
Notifications
You must be signed in to change notification settings - Fork 388
Can't find interface-file declaration when loading a TemplateHaskell-enabled module #149
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
Hi, it is a shoot in the dark but maybe cleaning the cache of ghcide and hie-bios. where they save hie files, could help: they are in |
Thanks. I’ll ll try that later. I’m having the same issue in our private in-house repository too so there may be a real issue. I’ll try to make a smaller reproducer. |
I made a tiny reproducer: https://github.com/maoe/hls-reproducer. This project builds fine with cabal but if you run
|
And if you replace |
Thanks for the small reproducer, i hope it will help to identify the cause |
Currently available workaround for this issue is to define myId in a separate module. See maoe/hls-reproducer@c4add31 |
And current master (4e7b2fc) of ghcide again silently fails:
|
Loading the hls-reproducer example in VSCode with ghcide HEAD works fine for me. The command line is a diagnostic tool, but not always equivalent to loading in an IDE. Trying to build threadscope with Nix gets stuck in:
|
@maoe can you load the module |
@jneira I just tried haskell-language-server 0.2 (7ad18cf) and a fairly recent ghcide (035019d) with VSCode 1.46.1 on macOS. I used GHC 8.10.1 except for HIE. "languageServerHaskell.hieVariant": "haskell-language-server"This reproduces the error. "languageServerHaskell.hieVariant": "ghcide"This also reproduces the error. The ghcide extension instead of the Haskell Language Server extensionI couldn't get the ghcide extension working. It prints a lot of errors as follows: "languageServerHaskell.hieVariant": "haskell-language-server"It works as expected. Because HIE doesn't support 8.10 I used 8.8.3 for this demonstration. |
The obvious question would be if hls works with GHC 8.8.3. The answer is no. It fails in the same way as GHC 8.10.1. |
I confirmed that ghcide from wz1000/ghcide on the hls-3 branch fixes this issue. For those who are eager to try, add the following snippet to cabal.project when building hls: source-repository-package
type: git
location: https://github.com/wz1000/ghcide.git
tag: 493e960a7aa73f64ce3b631c69f6a60aa3a5b5f0 |
I still see this issue in our in-house codebase even with the patched ghcide. I'll try to make a reproducer. |
I can reproduce this issue with https://github.com/jbransen/hls-bug using
|
FWIW I tried some intermediate commit of haskell/ghcide#836 with hls and it fixed the issue in our codebase. I had to disable a few plugins to build hls though. So I think #463 is going to fix this issue. |
I can confirm that #530 seems to have solved this! Latest master now works fine for my bigger projects. |
@jbransen great! thanks for confirming it |
Still not at a point where all our deps are back in stackage but we’re getting closer.
Current master (2310e10) of HLS fails to load threadscope like this:
Steps to reproduce:
FWIW current master of ghcide fails silently on the same module:
The text was updated successfully, but these errors were encountered: