Subject: bug#66912: With `require', the byte compiler reports the wrong file for errors.

From: Stefan Monnier <[email-masked]>
Date: Fri, 08 Nov 2024 08:42:29 -0500

> 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 understand that, but I don't think it explains why you think it's
a problem.  E.g. when you're in the debugger, you can see the stack
trace which tells you we're loading A, so you don't need to be told
"while loading A" in the error message.

>> > 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!

I'm just describing the way I see it: I personally don't have a good
intuition of how/when it could misbehave nor how to work around such
cases, whereas I very much do for the approach I propose and AFAICT it's
not just because I proposed it but it's because it follows
a known pattern, so I expect the same will hold for other coders.

Of course it wouldn't be the first time I'd be wrong.  Also, I didn't
say I objected to your approach, I just have a different preference: you
don't have to convince me.

        Stefan