GNU bug report logs - #33575
[PATCH] guix: lint: Add checker to check if inputs are sorted.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sun, 2 Dec 2018 07:43:02 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 33575 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 33575 <at> debbugs.gnu.org
Subject: Re: [bug#33575] [PATCH] guix: lint: Add checker to check if inputs
 are sorted.
Date: Mon, 03 Dec 2018 14:31:44 +0100
Hello,

Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> * guix/scripts/lint.scm (check-inputs-should-be-sorted): New procedure.
> (%checkers): Add it.
> ---
>  guix/scripts/lint.scm | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
> index 2314f3b28..37e8a1ec5 100644
> --- a/guix/scripts/lint.scm
> +++ b/guix/scripts/lint.scm
> @@ -8,6 +8,7 @@
>  ;;; Copyright © 2017 Alex Kost <alezost <at> gmail.com>
>  ;;; Copyright © 2017 Tobias Geerinckx-Rice <me <at> tobias.gr>
>  ;;; Copyright © 2017 Efraim Flashner <efraim <at> flashner.co.il>
> +;;; Copyright © 2018 Arun Isaac <arunisaac <at> systemreboot.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -301,6 +302,22 @@ of a package, and INPUT-NAMES, a list of package specifications such as
>                (package-input-intersection (package-direct-inputs package)
>                                            input-names))))
>  
> +(define (check-inputs-should-be-sorted package)
> +  ;; Emit a warning if inputs, native inputs or propagated inputs of PACKAGE
> +  ;; are not lexicographically ordered.

It’s something we rarely do so we’d get warnings for most packages.  As
a side effect, people may pay less attention to what ‘guix lint’ says.

As for the goal itself, I think sorting is a good idea when there are
lots of inputs (things like IceCat), but otherwise I personally don’t
think it matters that much.

What do people think?

Thanks,
Ludo’.




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

Previous Next


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