From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69809: 30.0.50; flymake: error in process sentinel Date: Wed, 17 Jul 2024 15:08:51 +0200 Message-ID: References: <867chv3mtf.fsf@gnu.org> <87le696o86.fsf@catern.com> <86v81bktv5.fsf@gnu.org> Reply-To: Eshel Yaron 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="7571"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: gerd.moellmann@gmail.com, Spencer Baugh , Eli Zaretskii , 69809@debbugs.gnu.org, sbaugh@catern.com To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 17 15:09:28 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 1sU4PP-0001fA-Io for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Jul 2024 15:09:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU4Oy-0007MW-K8; Wed, 17 Jul 2024 09:09:00 -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 1sU4Ox-0007Ep-19 for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2024 09:08:59 -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 1sU4Ow-0002aX-LB for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2024 09:08:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sU4Oz-0000f5-Mg for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2024 09:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jul 2024 13:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69809 X-GNU-PR-Package: emacs Original-Received: via spool by 69809-submit@debbugs.gnu.org id=B69809.17212217412537 (code B ref 69809); Wed, 17 Jul 2024 13:09:01 +0000 Original-Received: (at 69809) by debbugs.gnu.org; 17 Jul 2024 13:09:01 +0000 Original-Received: from localhost ([127.0.0.1]:35258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sU4Oy-0000en-4e for submit@debbugs.gnu.org; Wed, 17 Jul 2024 09:09:00 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:60824 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sU4Ov-0000ef-UR for 69809@debbugs.gnu.org; Wed, 17 Jul 2024 09:08:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1721221734; bh=OIUOpvz6v8C2gQL/mnTRAV9p4bmmBZeLWM4LAGHeZOs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RoBiqMYJAQrghg3xq8eBaxeebR5QUx3d1KXw21SuLcanrp4j+HGU70PXKBE6QhkfB /KoiPhwxrmCbnYgTCUtaPXib8ipZu5SBBTJP8tajvw83NQBGY0R00hpadTEMohIjgR ODubMvOPJwQkkBqqKIsv5gy29PJwPQ3Oi1D2On77Cg2bNv/24qvaSshKcRj483OuBc x015ugUG5EdkOWDM0De8KPC5g10vf+H6j2yVD8Z7CDxFuShgsGopfItive/+t8Evlq Z8aLR407aG2et6KftM/ILhA2nluFVN4cJluw/odSIn6hFtRkSyvqkOEYurMPrfyI97 m86nnS32J8Img== In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Wed, 17 Jul 2024 10:07:30 +0100") 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:288922 Archived-At: Hi Jo=C3=A3o, Jo=C3=A3o T=C3=A1vora writes: > On Wed, Jul 17, 2024 at 9:20=E2=80=AFAM Jo=C3=A3o T=C3=A1vora wrote: >> >> On Wed, Jul 17, 2024 at 7:12=E2=80=AFAM Eshel Yaron = wrote: >> >> > > Yes, this seems good for emacs-30. Thanks Eshel! >> > Great, thanks. Since this is a change in eglot.el, let me also ask Jo= =C3=A3o >> > before installing: Jo=C3=A3o, any objections to the change above? >> >> I'd like to understand what problem it is solving. > > I've read a bit of the thread. There seems to be an error involved, > but I didn't see a backtrace for this error. Can someone produce it? Sure, here's one (also see the recipe I posted upthread): --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (error "Can=E2=80=99t find state for flymake-= cc in =E2=80=98flymake--state=E2=80=99") signal(error ("Can=E2=80=99t find state for flymake-cc in =E2=80=98flymak= e--state=E2=80=99")) error("Can't find state for %s in `flymake--state'" flymake-cc) (or (gethash backend flymake--state) (error "Can't find state for %s in `= flymake--state'" backend)) (let ((state (or (gethash backend flymake--state) (error "Can't find stat= e for %s in `flymake--state'" backend))) expected-token) (cond ((null state= ) (flymake-error "Unexpected report from unknown backend %s" backend)) ((le= t* ((cl-x state)) (progn (or (let* ((cl-x cl-x)) (progn (and (memq (type-of= cl-x) cl-struct-flymake--state-tags) t))) (signal 'wrong-type-argument (li= st 'flymake--state cl-x))) (aref cl-x 3))) (flymake-error "Unexpected repor= t from disabled backend %s" backend)) ((progn (setq expected-token (let* ((= cl-x state)) (progn (or (let* ((cl-x cl-x)) (progn (and (memq (type-of cl-x= ) cl-struct-flymake--state-tags) t))) (signal 'wrong-type-argument (list 'f= lymake--state cl-x))) (aref cl-x 1)))) (null expected-token)) (flymake-erro= r "Unexpected report from stopped backend %s" backend)) ((not (or (eq expec= ted-token token) force)) (flymake-error "Obsolete report from backend %s wi= th explanation %s" backend explanation)) ((eq :panic report-action) (flymak= e--disable-backend backend explanation)) ((not (listp report-action)) (flym= ake--disable-backend backend (format "Unknown action %S" report-action)) (f= lymake-error "Expected report, but got unknown key %s" report-action)) (t (= flymake--publish-diagnostics report-action :backend backend :state state :r= egion region) (if flymake-check-start-time (progn (flymake--log-1 :debug 'f= lymake "backend %s reported %d diagnostics in %.2f second(s)" backend (leng= th report-action) (float-time (time-since flymake-check-start-time))))))) (= let* ((cl-x state)) (or (let* ((cl-x cl-x)) (progn (and (memq (type-of cl-x= ) cl-struct-flymake--state-tags) t))) (signal 'wrong-type-argument (list 'f= lymake--state cl-x))) (let* ((v cl-x)) (aset v 2 t))) (if (and flymake-show= -diagnostics-at-end-of-line (not (cl-set-difference (flymake-running-backen= ds) (flymake-reporting-backends)))) (progn (flymake--update-eol-overlays)))= (flymake--update-diagnostics-listings (current-buffer))) (let* ((explanation (car (cdr (plist-member --cl-rest-- ':explanation))))= (force (car (cdr (plist-member --cl-rest-- ':force)))) (region (car (cdr (= plist-member --cl-rest-- ':region))))) (let ((state (or (gethash backend fl= ymake--state) (error "Can't find state for %s in `flymake--state'" backend)= )) expected-token) (cond ((null state) (flymake-error "Unexpected report fr= om unknown backend %s" backend)) ((let* ((cl-x state)) (progn (or (let* ((c= l-x cl-x)) (progn (and (memq (type-of cl-x) cl-struct-flymake--state-tags) = t))) (signal 'wrong-type-argument (list 'flymake--state cl-x))) (aref cl-x = 3))) (flymake-error "Unexpected report from disabled backend %s" backend)) = ((progn (setq expected-token (let* ((cl-x state)) (progn (or (let* ((cl-x c= l-x)) (progn (and (memq (type-of cl-x) cl-struct-flymake--state-tags) t))) = (signal 'wrong-type-argument (list 'flymake--state cl-x))) (aref cl-x 1))))= (null expected-token)) (flymake-error "Unexpected report from stopped back= end %s" backend)) ((not (or (eq expected-token token) force)) (flymake-erro= r "Obsolete report from backend %s with explanation %s" backend explanation= )) ((eq :panic report-action) (flymake--disable-backend backend explanation= )) ((not (listp report-action)) (flymake--disable-backend backend (format "= Unknown action %S" report-action)) (flymake-error "Expected report, but got= unknown key %s" report-action)) (t (flymake--publish-diagnostics report-ac= tion :backend backend :state state :region region) (if flymake-check-start-= time (progn (flymake--log-1 :debug 'flymake "backend %s reported %d diagnos= tics in %.2f second(s)" backend (length report-action) (float-time (time-si= nce flymake-check-start-time))))))) (let* ((cl-x state)) (or (let* ((cl-x c= l-x)) (progn (and (memq (type-of cl-x) cl-struct-flymake--state-tags) t))) = (signal 'wrong-type-argument (list 'flymake--state cl-x))) (let* ((v cl-x))= (aset v 2 t))) (if (and flymake-show-diagnostics-at-end-of-line (not (cl-s= et-difference (flymake-running-backends) (flymake-reporting-backends)))) (p= rogn (flymake--update-eol-overlays))) (flymake--update-diagnostics-listings= (current-buffer)))) flymake--handle-report(flymake-cc backend-token6 nil) apply(flymake--handle-report flymake-cc backend-token6 nil) (save-current-buffer (set-buffer buffer) (apply #'flymake--handle-report = backend token args)) (progn (save-current-buffer (set-buffer buffer) (apply #'flymake--handle-= report backend token args))) (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer= ) (apply #'flymake--handle-report backend token args)))) #f(lambda (&rest args) [(buffer #) (token backend-token6= ) (backend flymake-cc)] (if (buffer-live-p buffer) (progn (save-current-buf= fer (set-buffer buffer) (apply #'flymake--handle-report backend token args)= ))))(nil) funcall(#f(lambda (&rest args) [(buffer #) (token backen= d-token6) (backend flymake-cc)] (if (buffer-live-p buffer) (progn (save-cur= rent-buffer (set-buffer buffer) (apply #'flymake--handle-report backend tok= en args))))) nil) (if (or diags (=3D 0 (process-exit-status p))) (funcall report-fn diags) = (funcall report-fn :panic :explanation (buffer-substring (point-min) (progn= (goto-char (point-min)) (line-end-position))))) (let ((diags (flymake-cc--make-diagnostics source))) (if (or diags (=3D 0= (process-exit-status p))) (funcall report-fn diags) (funcall report-fn :pa= nic :explanation (buffer-substring (point-min) (progn (goto-char (point-min= )) (line-end-position)))))) (save-current-buffer (set-buffer (process-buffer p)) (goto-char (point-mi= n)) (let ((diags (flymake-cc--make-diagnostics source))) (if (or diags (=3D= 0 (process-exit-status p))) (funcall report-fn diags) (funcall report-fn := panic :explanation (buffer-substring (point-min) (progn (goto-char (point-m= in)) (line-end-position))))))) (progn (save-current-buffer (set-buffer (process-buffer p)) (goto-char (p= oint-min)) (let ((diags (flymake-cc--make-diagnostics source))) (if (or dia= gs (=3D 0 (process-exit-status p))) (funcall report-fn diags) (funcall repo= rt-fn :panic :explanation (buffer-substring (point-min) (progn (goto-char (= point-min)) (line-end-position)))))))) (if (save-current-buffer (set-buffer source) (eq p flymake-cc--proc)) (pr= ogn (save-current-buffer (set-buffer (process-buffer p)) (goto-char (point-= min)) (let ((diags (flymake-cc--make-diagnostics source))) (if (or diags (= =3D 0 (process-exit-status p))) (funcall report-fn diags) (funcall report-f= n :panic :explanation (buffer-substring (point-min) (progn (goto-char (poin= t-min)) (line-end-position))))))))) (progn (if (save-current-buffer (set-buffer source) (eq p flymake-cc--pro= c)) (progn (save-current-buffer (set-buffer (process-buffer p)) (goto-char = (point-min)) (let ((diags (flymake-cc--make-diagnostics source))) (if (or d= iags (=3D 0 (process-exit-status p))) (funcall report-fn diags) (funcall re= port-fn :panic :explanation (buffer-substring (point-min) (progn (goto-char= (point-min)) (line-end-position)))))))))) (if (eq 'exit (process-status p)) (progn (if (save-current-buffer (set-bu= ffer source) (eq p flymake-cc--proc)) (progn (save-current-buffer (set-buff= er (process-buffer p)) (goto-char (point-min)) (let ((diags (flymake-cc--ma= ke-diagnostics source))) (if (or diags (=3D 0 (process-exit-status p))) (fu= ncall report-fn diags) (funcall report-fn :panic :explanation (buffer-subst= ring (point-min) (progn (goto-char (point-min)) (line-end-position)))))))))= )) (unwind-protect (if (eq 'exit (process-status p)) (progn (if (save-curren= t-buffer (set-buffer source) (eq p flymake-cc--proc)) (progn (save-current-= buffer (set-buffer (process-buffer p)) (goto-char (point-min)) (let ((diags= (flymake-cc--make-diagnostics source))) (if (or diags (=3D 0 (process-exit= -status p))) (funcall report-fn diags) (funcall report-fn :panic :explanati= on (buffer-substring (point-min) (progn (goto-char (point-min)) (line-end-p= osition))))))))))) (if (process-live-p p) nil (kill-buffer (process-buffer = p)))) #f(lambda (p _ev) [(source #) (report-fn #f(lambda (&res= t args) [(buffer #) (token backend-token6) (backend flymak= e-cc)] (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer b= uffer) (apply #'flymake--handle-report backend token args))))))] (unwind-pr= otect (if (eq 'exit (process-status p)) (progn (if (save-current-buffer (se= t-buffer source) (eq p flymake-cc--proc)) (progn (save-current-buffer (set-= buffer (process-buffer p)) (goto-char (point-min)) (let ((diags (flymake-cc= --make-diagnostics source))) (if (or diags (=3D 0 (process-exit-status p)))= (funcall report-fn diags) (funcall report-fn :panic :explanation (buffer-s= ubstring (point-min) (progn (goto-char (point-min)) (line-end-position)))))= )))))) (if (process-live-p p) nil (kill-buffer (process-buffer p)))))(# "finished\n") --8<---------------cut here---------------end--------------->8---