[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50814] [PATCH 4/5] guix: Prepare the UI for continuable &warning ex
From: |
Maxime Devos |
Subject: |
[bug#50814] [PATCH 4/5] guix: Prepare the UI for continuable &warning exceptions. |
Date: |
Thu, 30 Sep 2021 00:03:36 +0200 |
User-agent: |
Evolution 3.34.2 |
Attila Lendvai schreef op wo 29-09-2021 om 21:22 [+0000]:
> >
[...]
>
> > Conventionally, to emit warnings, the procedure 'warning' from
> > (guix diagnostics) is used. See e.g. (guix ci), (guix deprecation), (guix
> > gexp),
> > (guix import ...), various modules under (guix scripts ...), (guix
> > upstream) ...
> >
> > Is there any reason not to use this pre-existing procedure?
>
> in a more advanced UI it might be a different story, but in the
> current setup the only reason is to be able to assert for the warning
> in the tests.
>
> is that worth it? shall i just user WARNING and forget about the test?
Testing a warning is emitted seems nice. You could parameterise
guix-warning-port
and use call-with-output-sting to capture the warning, and use (not
(string-null? ...))
to verify a warning has been emitted. From a quick grep, it appears
tests/transformations.scm and tests/substitute.scm are doing things like this.
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#50814] [PATCH 3/4] tests: Add failing test for .guix-authorizations and channel intro., (continued)
[bug#50814] [PATCH 3/5] tests: Add failing test for .guix-authorizations and channel intro., Attila Lendvai, 2021/09/28
[bug#50814] [PATCH 5/5] guix: git-authenticate: Fix authenticate-repository., Attila Lendvai, 2021/09/28