GNU bug report logs - #35790
[PATCH] scripts: lint: Handle warnings with a record type.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sat, 18 May 2019 09:43:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 35790 <at> debbugs.gnu.org
Subject: [bug#35790] [PATCH 1/2] lint: Move the linting code to a different module.
Date: Sun, 14 Jul 2019 19:03:59 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> To try and move towards making programatic access to the linting code easier,
>> this commit separates out the linting script, from the linting functionality
>> that it uses.
>
> For the final version, please write a change log.

Sure, any suggestions about how to write it? I wasn't sure whether to
list everything that had been moved from (guix scripts lint) to (guix
lint), or say that the file has moved, and list the things that have
been moved back.

>> +(define-module (guix lint)
>> +  #:use-module ((guix store) #:hide (close-connection))
>> +  #:use-module (guix base32)
>> +  #:use-module (guix download)
>> +  #:use-module (guix ftp-client)
>> +  #:use-module (guix http-client)
>> +  #:use-module (guix packages)
>> +  #:use-module (guix licenses)
>> +  #:use-module (guix records)
>> +  #:use-module (guix grafts)
>> +  #:use-module (guix ui)
>
> The principle that’s mostly followed for Guix modules is that they are
> UI-independent: they might throw ‘&message’ error conditions, they might
> even use (guix i18n), but they usually don’t depend on (guix ui).
>
> The idea is separation of concerns: the actual UI implementation details
> (TUI, GUI, etc.) remain separate from the API.
>
> At first sight (guix ui) is not necessary here, and it’s enough to use
> (guix i18n), isn’t it?

I do remember looking at this, but I think I got stuck. I've just had
another look though, and I think if I import (guix diagnostics) and
(guix i18n) modules, then (guix ui) isn't required.

> Last thing: please add this new file to po/guix/POTFILES.in.
>
> Thanks for working on it!

No problem, thanks for taking a look :)
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 6 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.