GNU bug report logs -
#50814
[PATCH] guix: git-authenticate: Also authenticate the channel intro commit.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 (application/pgp-signature, inline)]
This bug report was last modified 3 years and 71 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.