-
-
Notifications
You must be signed in to change notification settings - Fork 389
HLS often cannot find a .hi.core
file in ~/.cache/ghcide/
#4145
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
I also hit this with our project. I am using hls 2.0.0.0, GHC 9.6.3 and VSCodium 1.84.2 and haskell plugin 2.4.3. I am using a hie-bios program integrating with buck2 in a multi-component project. For me this usually happened when opening a file from a component that wasn't yet loaded:
Seems like every component gets a new cache directory each time. Is this to be expected? |
This behavior should have been made less likely after #4076 Though the bug is still present and we're tracking it in #4093 I was trying to find the exact place in the code where the
I think this is the standard behavior. When you include module from different component, cabal needs a different set of flags (coming up with cabal flags to make the project build is the job of hie-bios) to be able to build the project and the flags are reflected in the hash, which is appended to the directory name, so that's why you see new directory being created in the cache dir. |
Thank you for the bug report! @wz1000 will have a closer look at this issue. |
happen in HLS codebase too, it is very common if we are using the multi-repl in cabal 3.12
|
Some how it does not write out some files. I wonder if only FOI branch would write out the *.hi.core
The core file is writtern at |
The fail case would be the following,
|
Your environment
Which OS do you use?
MacOS 11.7.10 and 14
Which version of GHC do you use and how did you install it?
9.2.8 via ghcup (0.1.22.0)
How is your project built (alternative: link to the project)?
cabal (or nix + cabal)
https://github.com/plow-technologies/inferno
Which LSP client (editor/plugin) do you use?
vscode (v1.87.2) + Haskell plugin (v2.4.3)
Which version of HLS do you use and how did you install it?
2.7.0.0 via ghcup
Have you configured HLS in any way (especially: a
hie.yaml
file)?No
Steps to reproduce
I cannot reproduce it myself deterministically, but it happens so often that I'm opening a bug report. Today I tried on a fresh laptop, fresh ghcup + ghc + hls install, fresh install of vscode's Haskell plugin, and within an hour I saw this error again. Here's the steps:
.hi.core
file in~/.cache/ghcide/
...Expected behaviour
No such error.
Actual behaviour
I see a red squiggle on the first line of the file, with the error:
Debug information
The vscode output window for Haskell shows some errors, but I don't know if they are related:
Thank you for all your awesome work 🙌
EDIT: Clearing the
~/.cache/ghcide/
and~/.cache/hie-bios/
directories helps for a while, but the error is back soon.The text was updated successfully, but these errors were encountered: