From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: acm@muc.de, Eli Zaretskii <eliz@gnu.org>, 66912@debbugs.gnu.org
Subject: bug#66912: With `require', the byte compiler reports the wrong file for errors.
Date: Thu, 7 Nov 2024 17:15:49 +0000 [thread overview]
Message-ID: <Zyz1xWXcfEghUWOa@MAC.fritz.box> (raw)
In-Reply-To: <jwvzfmbrpzx.fsf-monnier+emacs@gnu.org>
Hello, Stefan.
On Thu, Nov 07, 2024 at 11:09:19 -0500, Stefan Monnier wrote:
> > OK, I see what you mean. But if the error gets handled in a handler-bind
> > handler, or goes through to the debugger without being intercepted by a
> > condition-case, the binding stack will not have been unwound. In that
> > case the difference between the two lists would be empty.
> Indeed, these are cases where the error hasn't reached its corresponding
> handler yet. Do you think it's a problem?
Yes. When the debugger handles the error, the binding stack hasn't been
unwound at all, so Vloads_in_progress and Vloads_in_progress_at_error are
EQ. So the difference between them would be empty.
> >> >> > I've tried it, and the above problem seems definitely to make it less
> >> >> > simple than the approach I originally took (which currently works).
> >> >> AFAIK, your previous approach suffered from the exact same problem, tho
> >> >> maybe in fewer cases.
> >> > No, it doesn't. There, Vloads_still_in_progress is kept in synch with
> >> > Vloads_in_progress when Fload operations start and end. When the
> >> > debugger or error handler outputs a message using Vl_still_i_p, it
> >> > resets that variable to nil, preventing it getting output again.
> >> You may be right that the "fewer" case are so few so that there really
> >> aren't any. I'm not convinced there cannot be a code path that happens
> >> not to pass via those settings to nil, but maybe you're right.
> >> Still, my A => B => compile => C => D examples still stands, which is
> >> still at heart the same problem IMO, and could be worked around with my
> >> `while` loop above.
> > One way to fix this would be to make Vloads_still_in_progress visible to
> > Lisp, and to bind it to nil in the byte compiler. But that might get a
> > bit complicated.
> And if an error in D gets handled in A, you'd have lost part of the "A
> => B => compile => C => D" context information because the rebinding to
> nil would cause `Vloads_still_in_progress_at_error` to contains only
> the "C => D" part.
Yes. As I say, it could get complicated. I don't think such a binding
in the byte compiler is a good idea, but it's a possibility.
> > Something very similar, if not the same, was the original handling of
> > byte-compile-form-stack.
> Something only you worked with, AFAICT. So it doesn't have the same
> "known issues" advantage for the rest of us.
Oh, come on, Stefan! It is a very simple mechanism, easily understood,
and it worked without known error for several years, before being
replaced by something more complicated. How do you think this mechanism
could go wrong if used again for Vloads_still_in_progress?
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2024-11-07 17:15 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 11:32 bug#66912: With `require', the byte compiler reports the wrong file for errors Alan Mackenzie
2023-11-03 16:09 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-12 16:30 ` Alan Mackenzie
2023-11-12 17:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-12 20:41 ` Alan Mackenzie
2023-11-12 21:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-12 23:00 ` Drew Adams
2024-10-29 18:59 ` Alan Mackenzie
2024-10-30 19:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-30 21:52 ` Alan Mackenzie
2024-10-30 22:31 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-02 13:47 ` Alan Mackenzie
2024-11-02 14:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-03 22:34 ` Alan Mackenzie
2024-11-04 2:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-04 12:52 ` Alan Mackenzie
2024-11-04 16:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-04 21:08 ` Alan Mackenzie
2024-11-05 3:27 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-05 4:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-05 14:54 ` Alan Mackenzie
2024-11-05 19:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-05 20:33 ` Alan Mackenzie
2024-11-05 23:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-06 16:23 ` Alan Mackenzie
2024-11-06 18:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-06 20:12 ` Alan Mackenzie
2024-11-06 23:14 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-07 12:37 ` Alan Mackenzie
2024-11-07 16:09 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-07 17:15 ` Alan Mackenzie [this message]
2024-11-08 13:42 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-08 20:01 ` Alan Mackenzie
2024-11-08 20:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-09 12:35 ` Alan Mackenzie
2024-11-09 16:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 10:40 ` Alan Mackenzie
2024-11-10 16:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 17:48 ` Alan Mackenzie
2024-11-10 21:37 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-12 14:53 ` Alan Mackenzie
2024-11-12 15:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-07 15:04 ` Alan Mackenzie
2024-11-05 12:18 ` Eli Zaretskii
2024-11-05 14:04 ` Alan Mackenzie
2024-11-05 14:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-04 16:35 ` Alan Mackenzie
2024-11-04 12:20 ` Eli Zaretskii
2024-11-04 13:13 ` Alan Mackenzie
2024-11-04 13:34 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zyz1xWXcfEghUWOa@MAC.fritz.box \
--to=acm@muc.de \
--cc=66912@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.