Subject: Re: [bug#35790] [PATCH] scripts: lint: Handle warnings with a record type.

From: Christopher Baines <[email-masked]>
Date: Sun, 16 Jun 2019 14:00:16 +0100

Ludovic Courtès <[email-masked]> writes:

> Hello,
>
> Christopher Baines <[email-masked]> skribis:
>
>> Rather than emiting warnings directly to a port, have the checkers return the
>> warning or warnings.
>>
>> This makes it easier to use the warnings in different ways, for example,
>> loading the data in to a database, as you can work with the <lint-warning>
>> records directly, rather than having to parse the output to determine the
>> package and location.
>
> I like it!
>
> Maybe we should just ignore the i18n issue for now and keep
> already-translated messages in <lint-warning>.

I want the Guix Data Service to support internationalisation at some
point, so I've had a go at doing this. I'll say more in reply to your
other email.

> One question I have: before, warnings would be emitted as we go; now, we
> first collect all the warnings for a given package, and emit all of them
> at once.  How does it look in terms of UX?

Not quite, warnings are emitted once returned from each checker for each
package. The display will only be delayed if a checker takes a long time
to return the warnings, which I don't think happens (or at least happens
much).