erg-lang / erg

A statically typed language compatible with Python
http://erg-lang.org
Apache License 2.0
2.7k stars 55 forks source link

Improve ELS client health checker #525

Closed mtshiba closed 1 month ago

mtshiba commented 2 months ago

Describe the code issue?

From: https://github.com/erg-lang/erg/discussions/523

In order to prevent the language server process from remaining behind when a client crashes, the current ELS periodically sends meaningless workspace/configuration requests to the client and terminates if there is no response for a certain period of time. However, some other language server implementations [1] resolve the same issue by directly monitoring the parent process, which is a more direct solution (the current implementation cannot handle cases where responses are delayed due to temporary client load).

[1] https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/ParentProcessWatcher.java

Additional context

No response

Erg version

0.6.44

Python version

None

OS

None