Stream: compiler development

Topic: language server hanging after editor quit


view this post on Zulip drew (May 29 2024 at 14:54):

Is it a known issue that the LSP seems to keep running after quitting neovim? I'm seeing it hang around and often consume 100% of CPU. I'm on macos and roc nightly pre-release, built from commit 9fcd5a3fe88 on Mon May 27 09:12:19 UTC 2024.

view this post on Zulip drew (May 29 2024 at 14:54):

anecdotally it _seems_ to only happen after i issue a hover command. could be simply that any command triggers this behavior?

view this post on Zulip drew (May 29 2024 at 14:56):

here's a sample i just took from a hung process via activity monitor https://gist.github.com/drewolson/f395cfea7d2eb3f28a09fc932e110f20

view this post on Zulip drew (May 29 2024 at 14:57):

it actually might be related to trying to run LSP commands on modules rather than apps? i'm not totally sure what is causing it.

view this post on Zulip drew (May 29 2024 at 14:58):

also, slightly tangential, a very simple application with one extracted module that just reads a command line arg via weaver seems to take almost ~500ms to build. i feel like this was faster before:

view this post on Zulip drew (May 29 2024 at 14:58):

```$ roc build
0 errors and 0 warnings found in 434 ms
while successfully building:

main```

view this post on Zulip drew (May 29 2024 at 15:09):

here's the project, btw https://gist.github.com/drewolson/a52171c918f7044d8675bc4176bd7676

view this post on Zulip Agus Zubiaga (May 31 2024 at 03:46):

Yeah, this is a know issue. If you import a package module from a non-app module, the LSP will hang waiting for the shorthand to be resolved.

view this post on Zulip Agus Zubiaga (May 31 2024 at 03:47):

Currently, there’s no mechanism to find the root module so we can resolve packages. I plan to work on this next month, but I want to wrap up module params first.


Last updated: Jul 06 2025 at 12:14 UTC