GNU bug report logs - #71697
[PATCH] guix: lint: Honor 'no-archival?' package property.

Previous Next

Package: guix-patches;

Reported by: Simon Tournier <zimon.toutoune <at> gmail.com>

Date: Fri, 21 Jun 2024 18:13:01 UTC

Severity: normal

Tags: patch

Full log


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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>,
 Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 Mathieu Othacehe <othacehe <at> gnu.org>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Florian Pelz <pelzflorian <at> pelzflorian.de>, 71697 <at> debbugs.gnu.org,
 Christopher Baines <guix <at> cbaines.net>, Matthew Trzcinski <matt <at> excalamus.com>
Subject: [PATCH v5 0/3] Add dry-run to guix lint
Date: Fri, 19 Jul 2024 20:27:04 +0200
Hi,

Examples are probably better than many words. :-)

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix lint --dry-run
guix lint: error: too much information to display, did nothing and exit

$ ./pre-inst-env guix lint --dry-run hello
gnu/packages/base.scm:94:2: hello <at> 2.12.1: all the 27 checkers would run.

$ ./pre-inst-env guix lint --dry-run hello -c derivation
gnu/packages/base.scm:94:2: hello <at> 2.12.1: 1/27 checkers would run: derivation.

$ ./pre-inst-env guix lint --dry-run hello -n
gnu/packages/base.scm:94:2: hello <at> 2.12.1: 18/27 checkers would run at the exclusion of: archival cve github-url gnu-description haskell-stackage home-page refresh source synopsis.

$ ./pre-inst-env guix lint --dry-run hello -c derivation -x derivation
gnu/packages/base.scm:94:2: hello <at> 2.12.1: none of 27 checkers would run

$ # Using modified package with the new package properties
$ ./pre-inst-env guix lint --dry-run hello python-scikit-learn -x cve 
gnu/packages/base.scm:94:2: hello <at> 2.12.1: 26/27 checkers would run at the exclusion of: cve.
gnu/packages/machine-learning.scm:1723:2: python-scikit-learn <at> 1.4.2: 23/27 checkers would run at the exclusion of: archival cve name synopsis.
--8<---------------cut here---------------end--------------->8---

I think it addresses all the comments.  The idea is to display the most
relevant information, i.e., the message displays the shortest list of checkers
between the excluded ones and the others, because, IMHO, it eases to get what
would run.

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix lint --dry-run hello -c name,tests-true,compiler-for-target,description,inputs-should-be-native,inputs-should-not-be-input,input-labels,wrapper-inputs,license,optional-tests,mirror-url,source-file-name,source-unstable-tarball,profile-collisions,patch-file-names,patch-headers,formatting,synopsis,gnu-description,home-page,source,github-url,cve,refresh,archival,haskell-stackage
gnu/packages/base.scm:94:2: hello <at> 2.12.1: 26/27 checkers would run at the exclusion of: derivation.
--8<---------------cut here---------------end--------------->8---


Well, since I did some typo when testing, the last patch of the series is
included for the same price. ;-)

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix lint -c dervation
guix lint: error: dervation: invalid checker
hint: Did you mean `derivation'?
--8<---------------cut here---------------end--------------->8---


WDYT?

Cheers,
simon

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 34dc5c8d26..cbebc6494e 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1775,6 +1775,7 @@ (define-public python-scikit-learn
            python-pytest-xdist))
     (propagated-inputs
      (list python-numpy python-threadpoolctl python-scipy python-joblib))
+    (properties '((lint-excluded-checkers . (archival name synopsis))))
     (home-page "https://scikit-learn.org/")
     (synopsis "Machine Learning in Python")
     (description
--8<---------------cut here---------------end--------------->8---


Simon Tournier (3):
  scripts: lint: Add 'dry-run' option.
  scripts: lint: Honor package property to exclude checkers.
  scripts: lint: Add hint for checker typo.

 doc/guix.texi         | 19 +++++++++-
 guix/scripts/lint.scm | 81 +++++++++++++++++++++++++++++++++++++++----
 2 files changed, 92 insertions(+), 8 deletions(-)


base-commit: 9724e61cda80e4c59a2eb419a453887ecc551b9a
-- 
2.41.0





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

Previous Next


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