unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: gerd.moellmann@gmail.com, Spencer Baugh <sbaugh@janestreet.com>,
	Eli Zaretskii <eliz@gnu.org>,
	69809@debbugs.gnu.org, sbaugh@catern.com
Subject: bug#69809: 30.0.50; flymake: error in process sentinel
Date: Wed, 17 Jul 2024 15:08:51 +0200	[thread overview]
Message-ID: <m1msmgjhcs.fsf@dazzs-mbp.home> (raw)
In-Reply-To: <CALDnm53o=oQnd73bki1Gz9A5Bfhr76eJQ=N24XvFCRy3KoDdAA@mail.gmail.com> ("João Távora"'s message of "Wed, 17 Jul 2024 10:07:30 +0100")

Hi João,

João Távora <joaotavora@gmail.com> writes:

> On Wed, Jul 17, 2024 at 9:20 AM João Távora <joaotavora@gmail.com> wrote:
>>
>> On Wed, Jul 17, 2024 at 7:12 AM Eshel Yaron <me@eshelyaron.com> 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ão
>> > before installing: João, 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’t find state for flymake-cc in ‘flymake--state’")
  signal(error ("Can’t find state for flymake-cc in ‘flymake--state’"))
  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 state for %s in `flymake--state'" backend))) expected-token) (cond ((null state) (flymake-error "Unexpected report from unknown backend %s" backend)) ((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 '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 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 1)))) (null expected-token)) (flymake-error "Unexpected report from stopped backend %s" backend)) ((not (or (eq expected-token token) force)) (flymake-error "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-action :backend backend :state state :region region) (if flymake-check-start-time (progn (flymake--log-1 :debug 'flymake "backend %s reported %d diagnostics in %.2f second(s)" backend (length 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 'flymake--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-backends) (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 flymake--state) (error "Can't find state for %s in `flymake--state'" backend))) expected-token) (cond ((null state) (flymake-error "Unexpected report from unknown backend %s" backend)) ((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 '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 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 1)))) (null expected-token)) (flymake-error "Unexpected report from stopped backend %s" backend)) ((not (or (eq expected-token token) force)) (flymake-error "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-action :backend backend :state state :region region) (if flymake-check-start-time (progn (flymake--log-1 :debug 'flymake "backend %s reported %d diagnostics in %.2f second(s)" backend (length 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 'flymake--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-backends) (flymake-reporting-backends)))) (progn (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 #<buffer search.c>) (token backend-token6) (backend flymake-cc)] (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (apply #'flymake--handle-report backend token args)))))(nil)
  funcall(#f(lambda (&rest args) [(buffer #<buffer search.c>) (token backend-token6) (backend flymake-cc)] (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (apply #'flymake--handle-report backend token args))))) nil)
  (if (or diags (= 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 (= 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))))))
  (save-current-buffer (set-buffer (process-buffer p)) (goto-char (point-min)) (let ((diags (flymake-cc--make-diagnostics source))) (if (or diags (= 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)))))))
  (progn (save-current-buffer (set-buffer (process-buffer p)) (goto-char (point-min)) (let ((diags (flymake-cc--make-diagnostics source))) (if (or diags (= 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))))))))
  (if (save-current-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 (= 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)))))))))
  (progn (if (save-current-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 (= 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))))))))))
  (if (eq 'exit (process-status p)) (progn (if (save-current-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 (= 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)))))))))))
  (unwind-protect (if (eq 'exit (process-status p)) (progn (if (save-current-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 (= 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))))))))))) (if (process-live-p p) nil (kill-buffer (process-buffer p))))
  #f(lambda (p _ev) [(source #<buffer search.c>) (report-fn #f(lambda (&rest args) [(buffer #<buffer search.c>) (token backend-token6) (backend flymake-cc)] (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (apply #'flymake--handle-report backend token args))))))] (unwind-protect (if (eq 'exit (process-status p)) (progn (if (save-current-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 (= 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))))))))))) (if (process-live-p p) nil (kill-buffer (process-buffer p)))))(#<process gcc-flymake> "finished\n")
--8<---------------cut here---------------end--------------->8---





  reply	other threads:[~2024-07-17 13:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  7:09 bug#69809: 30.0.50; flymake: error in process sentinel Gerd Möllmann
2024-03-21 10:23 ` Eli Zaretskii
2024-03-23 14:02   ` sbaugh
2024-03-23 14:20     ` Gerd Möllmann
2024-07-11  9:45       ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-11 11:15         ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-11 11:46           ` Gerd Möllmann
2024-07-12  6:27           ` Eli Zaretskii
2024-07-16 20:48             ` Spencer Baugh
2024-07-17  6:12               ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-17  8:20                 ` João Távora
2024-07-17  9:07                   ` João Távora
2024-07-17 13:08                     ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-17 13:44                       ` João Távora
2024-07-17 17:25                         ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-17 17:38                           ` João Távora
2024-07-17 23:54                             ` João Távora
2024-07-18  0:10                               ` João Távora
2024-07-24 16:25                               ` Spencer Baugh
2024-07-25  7:28                                 ` Eli Zaretskii
2024-07-25  7:45                                   ` João Távora
2024-07-25 10:50                                     ` Eli Zaretskii
2024-07-25 11:49                                       ` João Távora
2024-07-27  7:26                                         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m1msmgjhcs.fsf@dazzs-mbp.home \
    --to=bug-gnu-emacs@gnu.org \
    --cc=69809@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=joaotavora@gmail.com \
    --cc=me@eshelyaron.com \
    --cc=sbaugh@catern.com \
    --cc=sbaugh@janestreet.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).