unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
       [not found] ` <20201206164944.2472A205D7@vcs0.savannah.gnu.org>
@ 2020-12-07 10:11   ` Stefan Kangas
  2020-12-07 11:08     ` Philipp Stephani
  2020-12-07 11:30     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Stefan Kangas @ 2020-12-07 10:11 UTC (permalink / raw)
  To: Philipp Stephani, emacs-devel

p.stephani2@gmail.com (Philipp Stephani) writes:

> branch: master
> commit 40e11743ca3803bdc2c6c612f35ab695efb3eb8b
> Author: Philipp Stephani <phst@google.com>
> Commit: Philipp Stephani <phst@google.com>
>
>     Print a backtrace on unhandled errors in batch mode (Bug#44942).

This causes some test failures:

1 files did not finish:
  lisp/emacs-lisp/edebug-tests.log
1 files contained unexpected results:
  lisp/emacs-lisp/gv-tests.log



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 10:11   ` master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942) Stefan Kangas
@ 2020-12-07 11:08     ` Philipp Stephani
  2020-12-07 11:30     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Philipp Stephani @ 2020-12-07 11:08 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Emacs developers

Am Mo., 7. Dez. 2020 um 11:11 Uhr schrieb Stefan Kangas
<stefankangas@gmail.com>:
>
> p.stephani2@gmail.com (Philipp Stephani) writes:
>
> > branch: master
> > commit 40e11743ca3803bdc2c6c612f35ab695efb3eb8b
> > Author: Philipp Stephani <phst@google.com>
> > Commit: Philipp Stephani <phst@google.com>
> >
> >     Print a backtrace on unhandled errors in batch mode (Bug#44942).
>
> This causes some test failures:
>
> 1 files did not finish:
>   lisp/emacs-lisp/edebug-tests.log
> 1 files contained unexpected results:
>   lisp/emacs-lisp/gv-tests.log

Thanks for the report; I pushed a commit that uses the new variable to
get back to the Emacs 27 behavior to fix these tests.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 10:11   ` master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942) Stefan Kangas
  2020-12-07 11:08     ` Philipp Stephani
@ 2020-12-07 11:30     ` Lars Ingebrigtsen
  2020-12-07 15:13       ` Stefan Monnier
                         ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-07 11:30 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Philipp Stephani, emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> p.stephani2@gmail.com (Philipp Stephani) writes:
>
>> branch: master
>> commit 40e11743ca3803bdc2c6c612f35ab695efb3eb8b
>> Author: Philipp Stephani <phst@google.com>
>> Commit: Philipp Stephani <phst@google.com>
>>
>>     Print a backtrace on unhandled errors in batch mode (Bug#44942).
>
> This causes some test failures:
>
> 1 files did not finish:
>   lisp/emacs-lisp/edebug-tests.log
> 1 files contained unexpected results:
>   lisp/emacs-lisp/gv-tests.log

I think it would be good if there was a command line switch for this
(for instance, -backtrace).

Outputting a backtrace in -batch mode is good, but I think having it on
by default will lead to too many regressions.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 11:30     ` Lars Ingebrigtsen
@ 2020-12-07 15:13       ` Stefan Monnier
  2020-12-07 15:27         ` Philipp Stephani
  2020-12-07 15:28       ` Philipp Stephani
  2020-12-07 15:48       ` Eli Zaretskii
  2 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2020-12-07 15:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Philipp Stephani, Stefan Kangas, emacs-devel

> Outputting a backtrace in -batch mode is good, but I think having it on
> by default will lead to too many regressions.

I think it makes sense to link it to `debug-on-error` (since we can't
really "debug" in batch mode, printing the backtrace is about as good
of an approximation as you can get).


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 15:13       ` Stefan Monnier
@ 2020-12-07 15:27         ` Philipp Stephani
  0 siblings, 0 replies; 9+ messages in thread
From: Philipp Stephani @ 2020-12-07 15:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Lars Ingebrigtsen, Stefan Kangas, Emacs developers

Am Mo., 7. Dez. 2020 um 16:13 Uhr schrieb Stefan Monnier
<monnier@iro.umontreal.ca>:
>
> > Outputting a backtrace in -batch mode is good, but I think having it on
> > by default will lead to too many regressions.
>
> I think it makes sense to link it to `debug-on-error` (since we can't
> really "debug" in batch mode, printing the backtrace is about as good
> of an approximation as you can get).
>

No, it should definitely not linked to debug-on-error. debug-on-error
doesn't really work: it changes the meaning of important macros such
as condition-case-unless-debug or with-demoted-errors. debug-on-error
only makes sense in interactive mode, where the user is actually able
to debug such "demoted" errors.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 11:30     ` Lars Ingebrigtsen
  2020-12-07 15:13       ` Stefan Monnier
@ 2020-12-07 15:28       ` Philipp Stephani
  2020-12-07 15:42         ` Lars Ingebrigtsen
  2020-12-07 15:48       ` Eli Zaretskii
  2 siblings, 1 reply; 9+ messages in thread
From: Philipp Stephani @ 2020-12-07 15:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Stefan Kangas, Emacs developers

Am Mo., 7. Dez. 2020 um 12:30 Uhr schrieb Lars Ingebrigtsen <larsi@gnus.org>:
>
> Stefan Kangas <stefankangas@gmail.com> writes:
>
> > p.stephani2@gmail.com (Philipp Stephani) writes:
> >
> >> branch: master
> >> commit 40e11743ca3803bdc2c6c612f35ab695efb3eb8b
> >> Author: Philipp Stephani <phst@google.com>
> >> Commit: Philipp Stephani <phst@google.com>
> >>
> >>     Print a backtrace on unhandled errors in batch mode (Bug#44942).
> >
> > This causes some test failures:
> >
> > 1 files did not finish:
> >   lisp/emacs-lisp/edebug-tests.log
> > 1 files contained unexpected results:
> >   lisp/emacs-lisp/gv-tests.log
>
> I think it would be good if there was a command line switch for this
> (for instance, -backtrace).
>
> Outputting a backtrace in -batch mode is good, but I think having it on
> by default will lead to too many regressions.
>

I don't expect that. Parsing the debug output of programs is always
rather brittle, and I wouldn't expect users outside of Emacs itself to
rely on a specific output format.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 15:28       ` Philipp Stephani
@ 2020-12-07 15:42         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-07 15:42 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: Stefan Kangas, Emacs developers

Philipp Stephani <p.stephani2@gmail.com> writes:

> I don't expect that. Parsing the debug output of programs is always
> rather brittle, and I wouldn't expect users outside of Emacs itself to
> rely on a specific output format.

I do -- people run Emacs for all sorts of reasons, and many use Emacs to
process batch jobs.  Changing the output in this drastic way will break
stuff.

So I'd rather have a command line switch to turn it on.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 11:30     ` Lars Ingebrigtsen
  2020-12-07 15:13       ` Stefan Monnier
  2020-12-07 15:28       ` Philipp Stephani
@ 2020-12-07 15:48       ` Eli Zaretskii
  2020-12-12 14:36         ` Philipp Stephani
  2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-12-07 15:48 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: p.stephani2, stefankangas, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 07 Dec 2020 12:30:47 +0100
> Cc: Philipp Stephani <p.stephani2@gmail.com>, emacs-devel@gnu.org
> 
> I think it would be good if there was a command line switch for this
> (for instance, -backtrace).
> 
> Outputting a backtrace in -batch mode is good, but I think having it on
> by default will lead to too many regressions.

IMO, we should first decide whether this new behavior should be the
default, and only after that whether it should be controlled by a
command-line switch.  E.g., if we believe that most users will want
the backtrace, i.e. the default behavior will be to produce a
backtrace, then a command-line switch is hardly necessary or
justified.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942).
  2020-12-07 15:48       ` Eli Zaretskii
@ 2020-12-12 14:36         ` Philipp Stephani
  0 siblings, 0 replies; 9+ messages in thread
From: Philipp Stephani @ 2020-12-12 14:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, Stefan Kangas, Emacs developers

Am Mo., 7. Dez. 2020 um 16:49 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Date: Mon, 07 Dec 2020 12:30:47 +0100
> > Cc: Philipp Stephani <p.stephani2@gmail.com>, emacs-devel@gnu.org
> >
> > I think it would be good if there was a command line switch for this
> > (for instance, -backtrace).
> >
> > Outputting a backtrace in -batch mode is good, but I think having it on
> > by default will lead to too many regressions.
>
> IMO, we should first decide whether this new behavior should be the
> default, and only after that whether it should be controlled by a
> command-line switch.  E.g., if we believe that most users will want
> the backtrace, i.e. the default behavior will be to produce a
> backtrace, then a command-line switch is hardly necessary or
> justified.

While I certainly can't speak for most/all users, I find it hard to
imagine why anybody would not want the backtrace. The backtrace is
only printed if there's no error handler. In case of a batch job (i.e.
a scripted/noninteractive invocation) that's almost always a bug or
runtime issue (expected file missing, etc.), and the backtrace is
often the only way to debug the issue.
I also don't believe that printing the backtrace by default will break
users: parsing error messages is brittle, and we can't realistically
guarantee stability in such an area.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-12-12 14:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20201206164942.28653.54315@vcs0.savannah.gnu.org>
     [not found] ` <20201206164944.2472A205D7@vcs0.savannah.gnu.org>
2020-12-07 10:11   ` master 40e1174: Print a backtrace on unhandled errors in batch mode (Bug#44942) Stefan Kangas
2020-12-07 11:08     ` Philipp Stephani
2020-12-07 11:30     ` Lars Ingebrigtsen
2020-12-07 15:13       ` Stefan Monnier
2020-12-07 15:27         ` Philipp Stephani
2020-12-07 15:28       ` Philipp Stephani
2020-12-07 15:42         ` Lars Ingebrigtsen
2020-12-07 15:48       ` Eli Zaretskii
2020-12-12 14:36         ` Philipp Stephani

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).