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 #11 received at 70499 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 70499 <at> debbugs.gnu.org
Subject: [PATCH v2 0/3] Lint package order.
Date: Sun,  5 May 2024 19:25:32 +0200
Hi,

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:

  $ 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?

Cheers,
Herman

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

 doc/guix.texi          | 23 ++++++++++++++++--
 guix/packages.scm      | 11 +++++++++
 guix/scripts/lint.scm  | 55 +++++++++++++++++++++++++++++++++++++-----
 guix/scripts/style.scm |  9 -------
 guix/ui.scm            |  3 ++-
 5 files changed, 83 insertions(+), 18 deletions(-)


base-commit: ef8ab6ab66c4d629699d175938ef1912941d4dce
-- 
2.41.0





This bug report was last modified 346 days ago.

Previous Next


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