From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70927: 30.0.50; track-changes assertion when shutting down eglot Date: Tue, 14 May 2024 11:14:42 +0200 Message-ID: <87jzjwg3gd.fsf@gmx.de> References: <871q65xsi6.fsf@stebalien.com> <86v83gx6md.fsf@gnu.org> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35278"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70927@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Steven Allen , Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 14 11:17:08 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s6oHT-0008vy-2H for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 May 2024 11:17:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6oGX-0002pJ-A1; Tue, 14 May 2024 05:16:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6oGT-0002mw-1g for bug-gnu-emacs@gnu.org; Tue, 14 May 2024 05:16:05 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6oGP-0003kR-QJ for bug-gnu-emacs@gnu.org; Tue, 14 May 2024 05:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6oGQ-00052S-Hq for bug-gnu-emacs@gnu.org; Tue, 14 May 2024 05:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 May 2024 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70927 X-GNU-PR-Package: emacs Original-Received: via spool by 70927-submit@debbugs.gnu.org id=B70927.171567811119331 (code B ref 70927); Tue, 14 May 2024 09:16:02 +0000 Original-Received: (at 70927) by debbugs.gnu.org; 14 May 2024 09:15:11 +0000 Original-Received: from localhost ([127.0.0.1]:38106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6oFR-00051Q-Po for submit@debbugs.gnu.org; Tue, 14 May 2024 05:15:11 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:45349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6oFN-00050y-Pe for 70927@debbugs.gnu.org; Tue, 14 May 2024 05:15:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1715678084; x=1716282884; i=michael.albinus@gmx.de; bh=hRfNft4yH4yEbhR288pCNIggEP6gSyHu3NHhk8wcUNg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=XucKdE95QtlvEiR756SAFgjZJv/C1SNQA4LcgljX6LWZNlUqDOOKqpHUvk15bDT0 x+a5BgtRRffn9haDsrupxrrQRi5nSNzewtjJZLuQHBaBSnO1gWUdJMG5czlQrGvIQ iw8m9yb9Z3la27v/Rq9MuOUwFv4K6DejBisNdZoM5bEFN1lB73DYcxNqB96Uy/cUJ icJ0mOw7ftTJOQbc0uaN7jN39Y/rTa79l01TInyS/0/uhwFvzhQdLndwYTxU/RQqQ 7wkBuujOSGN6sSmFTKHIO7lLdMxG7OGIHgAeinKpkZFRnpDwRnggeVUseBXKCfkpm ZAdrCSDyDnuQn7KDIg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.4]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N0oBx-1sTrLK3FRd-00wnB1; Tue, 14 May 2024 11:14:43 +0200 In-Reply-To: <86v83gx6md.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 14 May 2024 09:14:18 +0300") X-Provags-ID: V03:K1:kRUZsLfjpwIHGtuX/c59Kt5+qW5fIvBglIFSwfbFa3dUjQzJCR6 toELSknF5eAe+00/UiE89pDpSe9Gw2sM7FHp2FpGsTFHNE4th6jEEQVOHAJcM3JSSaHS6ox HrGrJkrHQUfnrzq3lYqFnp4qvCKVAHQXUi/K1EwKe1AZGpG8DTUtl4N201WGBRKoJ8equSk z5kF9zAcV39UdZ+8UVhVg== UI-OutboundReport: notjunk:1;M01:P0:pjjYSAekYsc=;k3/vxSADbBlpr69GOd5BzTzlatk WO6CH3h29sVCj3dExC2V67Dx4VYYyItYtrBsNnh2fmKOXblHI9JJQ7rMoP6e+cqfreHPROKx3 SS+al2oZomhCgS2O4aHPXFysbafTUaHQv6DZctQCWet5cIel2FDmFupCq1PPSdz5FFnlRTc2e d+G9yLmv3hHOjrhk3oATIQ7VYAT4ucyMEL/GsGZKHjzUJagTRucGeczAwdORvvcD8DJ9AHM+T jCJjXe3KWsk5J/8vDB8uwC1FNn0E/jI4JWp3XQB8VnhKZC9UuPNbfxhjVRhQZApxueaodE2ab DO3o52zv3W1VR/q07q5iJCxBOWF85VVw5McfZ6d18UrVwSuhAHr1J9p7gzXBy3CvvP4Yj11eg k4IH/QQTkBek+0PRW/gsR/DQDNTJTwSkZeQ3NNyGWSxuqCWnBP6Pv16IyJHPSfTGye3k+TuI5 eUkj4ubPxlGPxeLV4LQDjfXjBzrqplDgzcuttuhu+DYY8DnB2v3FiqBoDsZsez77BVezv6Dyu qoDHLS0oVTwPNx/0owJmq0VXJABi6Z7lXkKn6YMKdPWFBnNHbIrNbMGf2Gq+PWtXePErrU8MX oY/0H8E25UOQo3d4eqCj4nL4xpePj2wAN4si11wj3RjcV14WLbmvrJcwBPtth8xZx42kI4V5I jXcVbDvLQhH/Yo1/AGV9+m3ePnd0nEtBfgwBdDtbGmbCD2q3Q5p9lSKaEmR5gpZiAGKLRFIbe WRZ/C/f7CQWsWkLCmVJPQhO+LIGvGD97V/bxRvHPpAc2MP65u/euiSocQziuOenjiFTWZdlv X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285002 Archived-At: Eli Zaretskii 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`. >>=20 >> Backtrace: >>=20 >> cl--assertion-failed((memq id track-changes--trackers)) >> track-changes-fetch(nil #) >> eglot--track-changes-fetch(nil) >> eglot--signal-textDocument/didChange() >> eglot--request(# :shut= down nil :timeout 1.5) >> eglot-shutdown(#) >> eglot--managed-mode(-1) >> eglot--managed-mode-off() >> kill-current-buffer() >> funcall-interactively(kill-current-buffer) >> command-execute(kill-current-buffer) >>=20 >> Reproduction: >>=20 >> 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=C3=A3o 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(#) (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':"=20 (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 () #)() handler-bind-1(#f(compiled-function () # 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.