haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.65k stars 355 forks source link

HLS building forever with no notion of progress #4283

Closed TotallyNotChase closed 3 months ago

TotallyNotChase commented 3 months ago

Your environment

Which OS do you use? ArchLinux

Which version of GHC do you use and how did you install it? GHC 9.6.4 and GHC 9.2.8

How is your project built (alternative: link to the project)? cabal https://github.com/mlabs-haskell/clb

Which LSP client (editor/plugin) do you use?

vscode-oss+vscode-haskell/ Which version of HLS do you use and how did you install it?

2.7.0.0 from ghcup Have you configured HLS in any way (especially: a hie.yaml file)? No

What's wrong?

HLS is building forever with no update on progress. Equivalent to "Progress: X/Y" with X not changing at all in VSCode. Tries with command line too (haskell-language-server src/Clb.hs) with no end in sight.

Is there any way to at least find the progress? cabal build doesn't take nearly as long.

Debug information

michaelpj commented 3 months ago

I think this is ultimately https://github.com/haskell/hie-bios/issues/405. If you run with a higher logging level you should get the process output from cabal in your logs, but ideally we would just track this progress in hie-bios and report it up.

TotallyNotChase commented 3 months ago

I have run HLS with --debug and I still get nothing.

The last line simply notes down where the interface directory will be and that's the end of the logs while HLS keeps running forever

wz1000 commented 3 months ago

This could be #4046, can you try HLS 2.8.0.0?

TotallyNotChase commented 3 months ago

I noticed that if I let it run for 4+ hours (haskell-language-server src/Clb.hs), it finally succeeds. But when I run it again, nothing is cached and it runs forever once again.

TotallyNotChase commented 3 months ago

Looks like HLS 2.8.0.0 works!

Does that imply it was fixed in #4046 ?

michaelpj commented 3 months ago

Seems plausible! Sounds like it's fixed anyway.