haskell / haskell/haskell-language-server

haskell-language-server hangs at 'Type checking the files'

Open
#2,226 7 comments 0 reactions 0 assignees View on GitHub
component: hie-bios type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

### Your environment
Output of `haskell-language-server --probe-tools` or `haskell-language-server-wrapper --probe-tools`:

```sh
haskell-language-server version: 1.2.0.0 (GHC: 8.10.4) (PATH: /nix/store/f18pwxhycvvnsim59bzrnspgzcbq82dw-haskell-language-server-1.2.0.0/bin/haskell-language-server)
Tool versions found on the $PATH
cabal: 3.4.0.0
stack: Not found
ghc: 8.10.4
```
Which OS do you use: Debian 10

Which lsp-client do you use: N/A

Describe your project (alternative: link to the project): https://github.com/jamespwilliams/ihp-blog, this is the default project generated by `ihp-new` (IHP is https://github.com/digitallyinduced/ihp)

Contents of `hie.yaml`:
```yaml
# Used by haskell-language-server to find GHC settings
cradle:
bios:
program: build/ihp-lib/.hie-bios
```

### Steps to reproduce

Clone https://github.com/jamespwilliams/ihp-blog, run `haskell-language-server -d .`.

### Expected behaviour

Not sure, but I expect some output rather than just hanging.

### Actual behaviour

`haskell-language-server` hangs at "Type checking the files". I've left it for half-an-hour and it's made no progress.

### Include debug information
Execute in the root of your project the command `haskell-language-server --debug .` and paste the logs here:

Debug output:

```
haskell-language-server version: 1.2.0.0 (GHC: 8.10.4) (PATH: /nix/store/f18pwxhycvvnsim59bzrnspgzcbq82dw-haskell-language-server-1.2.0.0/bin/haskell-language-server)
ghcide setup tester in /home/jpw/ihp/blog.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/jpw/ihp/blog
Found 15 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
(/home/jpw/ihp/blog/hie.yaml)

Step 3/4: Initializing the IDE
2021-09-21 13:44:53.214250551 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb
2021-09-21 13:44:53.214589829 [ThreadId 7] DEBUG hls: Done initializing exports map from hiedb (0)

Step 4/4: Type checking the files
```

Paste the logs from the lsp-client, e.g. for [VS Code](https://github.com/haskell/vscode-haskell#troubleshooting)

LSP logs:

N/A (not actually using a LSP yet)

strace logs:

Running `strace haskell-language-server -d .` yields the following at the end:

```
write(1, "tep 4/4: Type checking the files"..., 33tep 4/4: Type checking the files
) = 33
futex(0x864b108, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x864b110, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x6ecd438, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x862c40c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY
```

So it appears to be hanging on that final futex wait.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.