-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Project indexing doesn't finish, probably due to "type" import? #2025
Comments
Does it reproduce if you use the
|
I tried the following steps, there are no errors when running hiedb from command line..
|
But it looks like |
|
I think this is because they were indexed in the step when I opened vscode. |
Doesn't |
Sorry, I missed that it's indexing in tmp dir, so that makes my explanation not-make-sense.
114 exactly matches the number of files in our project backend$ git ls-files 'src/*.hs' | wc -l
114 Could it be that I'm using old version of hiedb when trying to reproduce this on command line? |
Just managed to reproduce this like this:
head-error.mp4 |
The reason I am trying to repro with hiedb is so that we can scope down the issue and move it to the right project. Alternatively, you can try to build HLS with profiling and run it with |
Thanks, will try later today. |
Can you maybe share a bit of info how you're building with profiling? |
I just build with cabal. To enable profiling, you can do
|
I managed to compile hls with profiling and RTS flag -xc built in (via |
You can point the IDE to a bash wrapper that calls the HLS binary and tees stderr to a temp file. |
Ok, this was an interesting exercise 😆 In the end I added debug traces to all usages of head and found that my reproducer triggers this head:
The input |
It sounds like there could be more than one problem: indexing runs in a background thread whereas code actions run in the LSP handler thread |
I remember having an issue a long time ago with head seeming to mess up the session somehow, perhaps your patch to |
I'm using recent version of hls and I'm hitting this bug during indexing of my project.
It seems to be related to "type" imports.
I tried to find which
head
call in hls codebase could be behind this, but there are too manyhead
calls to know for sure.If you could help me identify which occurrence of
head
might be causing this issue, I could try to fix itYour environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:$ haskell-language-server-wrapper --probe-tools haskell-language-server version: 1.2.0.0 (GHC: 8.8.4) (PATH: /home/jhrcek/.local/bin/haskell-language-server-wrapper) (GIT hash: 92e4bad5b6c5432938ae0842e9ddd569bf0cdff8) Tool versions found on the $PATH cabal: 3.4.0.0 stack: 2.7.1 ghc: 8.8.4
Which OS do you use:
Linux, Fedora 34
Which lsp-client do you use:
VS Code
Describe your project (alternative: link to the project):
N/A
Steps to reproduce
This screenshot should sum it up just fine
Expected behaviour
Project indexing should finish
Actual behaviour
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:This command runs fine and doesn't print anything related. But nevertheless the VSCode ui gets stuck on indexing.
Paste the logs from the lsp-client, e.g. for VS Code
Pasting just few log lines that surround the
Prelude.head: empty list
error..LSP logs:
The text was updated successfully, but these errors were encountered: