GNU bug report logs -
#65763
Error opening a file from a Git working directory if Git is not installed
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> Another option, though, is to rewrite the ERT tests in question: e.g. to
> bind vc-handled-backends to nil, or to some other value if the presence
> of certain VC programs is known and expected in advance.
Test in question does not need or use Git in any way. It fails only because
Emacs under it decides to die with an exception when Git is not installed,
`debug-on-error' happens to be t (because of ERT, test itself doesn't even
set it explicitly) and current directory is structured in a particular way.
It feels conceptually wrong to require all tests that open files to rebind
`vc-handled-backends'. This is not what they are testing. It also depends
on knowing particular Emacs quirks (which I, for example, didn't know one
day earlier). If those were to change in some way, would all tests
everywhere need to accomodate?
Paul
On Wed, 6 Sept 2023 at 14:35, Dmitry Gutov <dmitry <at> gutov.dev> wrote:
> On 06/09/2023 15:13, Eli Zaretskii wrote:
> >> From: Paul Pogonyshev<pogonyshev <at> gmail.com>
> >> Date: Wed, 6 Sep 2023 09:29:59 +0200
> >> Cc:65763 <at> debbugs.gnu.org
> >>
> >> The problem appears to be only with `debug-on-error'. However, there
> are cases where you cannot
> >> control it at all, e.g. with ERT (probably also Buttercup or any other
> testing framework). In effect, an
> >> ERT test fails for a "random" reason, depending on which machine it is
> executed, i.e. it fails inside
> >> that Docker container.
> > I see.
> >
> > Well, we could then protect the execution of the problematic form "by
> > hand" by using condition-case-unless-debug. Dmitry, WDYT?
>
> Maybe the solution is to use the straight condition-case rather than
> condition-case-unless-debug? Because otherwise as long as
> condition-case-unless-debug is used, we would always have this problem.
>
> Rewriting with-demoted-errors is not an option, of course, but we could
> create a special, shorted version of it for vc.
>
> Another option, though, is to rewrite the ERT tests in question: e.g. to
> bind vc-handled-backends to nil, or to some other value if the presence
> of certain VC programs is known and expected in advance.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.