[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 1b5ed29 21/24: Really ensure eglot--shutdown dele
From: |
João Távora |
Subject: |
[elpa] externals/eglot 1b5ed29 21/24: Really ensure eglot--shutdown deletes a process completely |
Date: |
Sat, 26 May 2018 14:31:18 -0400 (EDT) |
branch: externals/eglot
commit 1b5ed29552d327ebcbf4b45d87eee663df2e3168
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Really ensure eglot--shutdown deletes a process completely
* eglot.el (eglot-lsp-server): rename slot "moribund" to
"shutdown-requested"
(eglot--connect): Don't check if shutdown was requested here.
(eglot--process-sentinel): Set shutdown-requested to
:sentinel-done here.
(eglot-shutdown): use eglot--shutdown-requested. Improve check
for process liveness.
---
eglot.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/eglot.el b/eglot.el
index b83e772..cc3fae1 100644
--- a/eglot.el
+++ b/eglot.el
@@ -184,9 +184,9 @@ deferred to the future."
(capabilities
:documentation "JSON object containing server capabilities."
:accessor eglot--capabilities)
- (moribund
+ (shutdown-requested
:documentation "Flag set when server is shutting down."
- :accessor eglot--moribund)
+ :accessor eglot--shutdown-requested)
(project
:documentation "Project associated with server."
:initarg :project :accessor eglot--project)
@@ -307,7 +307,7 @@ class SERVER-CLASS."
(run-hook-with-args 'eglot-connect-hook server)
(setq connect-success server))
(unless (or connect-success
- (not (process-live-p proc)) (eglot--moribund server))
+ (not (process-live-p proc)))
(eglot-shutdown server)))))
(defvar eglot--command-history nil
@@ -454,7 +454,8 @@ INTERACTIVE is t if called interactively."
(eglot--process server)))
(delete-process proc)
;; Consider autoreconnecting
- (cond ((eglot--moribund server))
+ (cond ((eglot--shutdown-requested server)
+ (setf (eglot--shutdown-requested server) :sentinel-done))
((not (eglot--inhibit-autoreconnect server))
(eglot--warn "Reconnecting after unexpected server exit")
(eglot-reconnect server))
@@ -959,15 +960,17 @@ function with the server still running."
(eglot--message "Asking %s politely to terminate" (eglot--name server))
(unwind-protect
(let ((eglot-request-timeout 3))
- (setf (eglot--moribund server) t)
+ (setf (eglot--shutdown-requested server) t)
(eglot--request server :shutdown nil)
;; this one is supposed to always fail, hence ignore-errors
(ignore-errors (eglot--request server :exit nil)))
;; Turn off `eglot--managed-mode' where appropriate.
(dolist (buffer (eglot--managed-buffers server))
(with-current-buffer buffer (eglot--managed-mode-onoff server -1)))
- (when (process-live-p (eglot--process server))
- (eglot--warn "Brutally deleting non-compliant server %s" (eglot--name
server))
+ (while (progn (accept-process-output nil 0.1)
+ (not (eq (eglot--shutdown-requested server) :sentinel-done)))
+ (eglot--warn "Sentinel for %s still hasn't run, brutally deleting it!"
+ (eglot--process server))
(delete-process (eglot--process server)))))
(cl-defmethod eglot-handle-notification
- [elpa] externals/eglot 8d4c2c3 13/24: Demote unvisited diagnostics logging to debug level, (continued)
- [elpa] externals/eglot 8d4c2c3 13/24: Demote unvisited diagnostics logging to debug level, João Távora, 2018/05/26
- [elpa] externals/eglot 85c5353 11/24: Add cquery support for C/C++ projects, João Távora, 2018/05/26
- [elpa] externals/eglot d40a458 14/24: Log debug messages through eglot--debug, João Távora, 2018/05/26
- [elpa] externals/eglot 17a3257 03/24: Do Rust's RLS hack properly with new class-based API, João Távora, 2018/05/26
- [elpa] externals/eglot 3aa2958 06/24: Add a complex RLS test, João Távora, 2018/05/26
- [elpa] externals/eglot 07078da 08/24: Rework eglot-tests.el for better debuggability, João Távora, 2018/05/26
- [elpa] externals/eglot 0462130 15/24: New RLS tests, João Távora, 2018/05/26
- [elpa] externals/eglot e1d7ff3 09/24: Disable file-watching tests on Travis, João Távora, 2018/05/26
- [elpa] externals/eglot c8e7ab0 16/24: Don't rely on Flymake's idle timer for textDocument/didChange, João Távora, 2018/05/26
- [elpa] externals/eglot 99ca690 17/24: Simpify eglot--server-receive, João Távora, 2018/05/26
- [elpa] externals/eglot 1b5ed29 21/24: Really ensure eglot--shutdown deletes a process completely,
João Távora <=
- [elpa] externals/eglot 897cbc3 24/24: * eglot.el (Version): Bump to 0.5, João Távora, 2018/05/26
- [elpa] externals/eglot ec10de2 23/24: Another unstable test on Travis, João Távora, 2018/05/26
- [elpa] externals/eglot d0fb9d2 22/24: Merge branch 'cquery-support' into master, João Távora, 2018/05/26
- [elpa] externals/eglot 97db670 19/24: Get rid of eglot--obj, an uninteresting abstraction, João Távora, 2018/05/26
- [elpa] externals/eglot 5e3804b 20/24: Add a new test., João Távora, 2018/05/26
- [elpa] externals/eglot 94c008d 18/24: Cleanup deferred request mechanism with a readable log, João Távora, 2018/05/26
- [elpa] externals/eglot 18176f3 02/24: Use an EIEIO class to represent a server., João Távora, 2018/05/26
- [elpa] externals/eglot eccb7d1 10/24: Merge branch 'use-eieio-server-defclass', João Távora, 2018/05/26