all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 70927@debbugs.gnu.org, "João Távora" <joaotavora@gmail.com>,
	"Steven Allen" <steven@stebalien.com>,
	"Stefan Monnier" <monnier@iro.umontreal.ca>
Subject: bug#70927: 30.0.50; track-changes assertion when shutting down eglot
Date: Tue, 14 May 2024 11:14:42 +0200	[thread overview]
Message-ID: <87jzjwg3gd.fsf@gmx.de> (raw)
In-Reply-To: <86v83gx6md.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 14 May 2024 09:14:18 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

Hi,

>> When `eglot-autoshutdown` is set, killing eglot buffers fails with a
>> track-changes assertion because, from what I can tell,
>> `eglot--signal-textDocument/didChange` is called when
>> `eglot--track-changes` is `nil`.
>> 
>> Backtrace:
>> 
>>   cl--assertion-failed((memq id track-changes--trackers))
>>   track-changes-fetch(nil #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_136>)
>>   eglot--track-changes-fetch(nil)
>>   eglot--signal-textDocument/didChange()
>>   eglot--request(#<eglot-lsp-server eglot-lsp-server-10d3578e408f> :shutdown nil :timeout 1.5)
>>   eglot-shutdown(#<eglot-lsp-server eglot-lsp-server-10d3578e408f>)
>>   eglot--managed-mode(-1)
>>   eglot--managed-mode-off()
>>   kill-current-buffer()
>>   funcall-interactively(kill-current-buffer)
>>   command-execute(kill-current-buffer)
>> 
>> Reproduction:
>> 
>> 1. Start emacs with `emacs -Q`.
>> 2. Run `M-: (setopt eglot-autoshutdown t) RET`
>> 3. Open any file you have an LSP server for and run `M-x eglot RET`.
>> 4. Kill the buffer.
>
> Thanks, I added Stefan and João to the discussion.

Btw, the corresponding (?) test fails as well:

--8<---------------cut here---------------start------------->8---
# make -C test eglot-tests
Test eglot-test-auto-shutdown backtrace:
  set-buffer(#<killed buffer>)
  (save-current-buffer (set-buffer buffer) (buffer-string))
  (princ (save-current-buffer (set-buffer buffer) (buffer-string)) 'ex
  (let ((buffer (car tail))) (eglot--test-message "contents of `%s':" 
  (while tail (let ((buffer (car tail))) (eglot--test-message "content
  (let ((tail buffers)) (while tail (let ((buffer (car tail))) (eglot-
  (cond (noninteractive (let ((tail buffers)) (while tail (let ((buffe
  (let ((buffers (delq nil (list (process-buffer (jsonrpc--process ser
  (progn (let ((buffers (delq nil (list (process-buffer (jsonrpc--proc
  (if (not test-body-successful-p) (progn (let ((buffers (delq nil (li
  (let ((server (car tail))) (if (jsonrpc-running-p server) (progn (co
  (while tail (let ((server (car tail))) (if (jsonrpc-running-p server
  (let ((tail new-servers)) (while tail (let ((server (car tail))) (if
  (let ((eglot-autoreconnect nil)) (let ((tail new-servers)) (while ta
  (unwind-protect (let ((eglot-autoreconnect nil)) (let ((tail new-ser
  (unwind-protect (let ((process-environment (cons (format "XDG_CONFIG
  (let* ((fixture-directory (make-nearby-temp-file "eglot--fixture-" t
  eglot--call-with-fixture((("project" ("thingy.c" . "int main() {retu
  (let (server buffer) (eglot--call-with-fixture '(("project" ("thingy
  #f(lambda () [typescript-mode-abbrev-table typescript-mode-syntax-ta
  #f(compiled-function () #<bytecode 0xe07b6c3d31b780b>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0xe07b6c3d31b780b>
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name eglot-test-auto-shutdown :documentati
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
  ert-run-tests-batch((not (tag :unstable)))
  ert-run-tests-batch-and-exit((not (tag :unstable)))
  eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test eglot-test-auto-shutdown condition:
    (error "Selecting deleted buffer")
   FAILED   3/49  eglot-test-auto-shutdown (0.229999 sec) at lisp/progmodes/eglot-tests.el:344
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.





  reply	other threads:[~2024-05-14  9:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13 22:21 bug#70927: 30.0.50; track-changes assertion when shutting down eglot Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found] ` <handler.70927.B.17156389167471.ack@debbugs.gnu.org>
2024-05-13 22:25   ` bug#70927: Acknowledgement (30.0.50; track-changes assertion when shutting down eglot) Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 18:49     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 20:51       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 22:09         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14  6:14 ` bug#70927: 30.0.50; track-changes assertion when shutting down eglot Eli Zaretskii
2024-05-14  9:14   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-14  9:34     ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzjwg3gd.fsf@gmx.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70927@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=steven@stebalien.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.