GNU bug report logs - #70499
[PATCH] utils: Add find-unordered-packages procedure.

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Sun, 21 Apr 2024 18:01:12 UTC

Severity: normal

Tags: patch

Full log


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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Herman Rimm <herman <at> rimm.ee>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Florian Pelz <pelzflorian <at> pelzflorian.de>, Ricardo Wurmus <rekado <at> elephly.net>,
 Christopher Baines <guix <at> cbaines.net>, 70499 <at> debbugs.gnu.org
Subject: Re: [bug#70499] [PATCH v2 0/3] Lint package order.
Date: Sat, 25 May 2024 16:06:45 +0200
Hi Herman,

Herman Rimm <herman <at> rimm.ee> skribis:

> I do not think 'find-unordered-packages' would be useful for e.g. guix
> style, so I made a similar procedure in (guix scripts lint) instead.  It
> is implemented with 'fold-packages' to get package records to pass to
> the 'run-checkers' procedure.  So now you can use guix lint with
> --whole-file to also lint the package ordering, for example:

Nice.

>   $ guix lint -f gnu/packages/matrix.scm -n
>   gnu/packages/matrix.scm:161:0: python-matrix-nio <at> 0.20.2: breaks from alphabetical order
>   gnu/packages/matrix.scm:244:0: pantalaimon <at> 0.10.5: breaks from alphabetical order
>
> However the alphabetical order lint warnings only appear once another
> type of lint warning is emitted, or when end of file is reached and
> linting finishes. So if few checkers are enabled, it takes a few seconds
> before anything is output for large module files, like 'crates-io.scm'.
> Can this be fixed easily?

I’m not sure I understand.  The alpabetical checker is part of another
patch set, right?  (I know I’ve seen it, but I’m afraid I’ve lost track
of it. :-))

Anyway, we can and should discuss ‘--whole-file’ independently of the
alphabetical-order checker.

>   guix: Move ‘package-location<?’ to (guix packages).
>   ui: Make 'user-module' parameter of 'load*' optional.
>   scripts: lint: Add 'whole-file' option with ordering lint.

This LGTM modulo minor issues:

  • The second patch looks unrelated to ‘--whole-file’, I’d drop it from
    this series.

  • The third patch misses just one thing: a test in
    ‘tests/guix-lint.sh’.

Could you send an updated patch series?

Thanks, and apologies for the delay!

Ludo’.




This bug report was last modified 1 year and 35 days ago.

Previous Next


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