From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YEu+BALgdmaCfAAA62LTzQ:P1 (envelope-from ) for ; Sat, 22 Jun 2024 14:30:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id YEu+BALgdmaCfAAA62LTzQ (envelope-from ) for ; Sat, 22 Jun 2024 16:30:26 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=msavoritias.me header.s=20210930 header.b=QMWgDc5j; dmarc=fail reason="SPF not aligned (relaxed)" header.from=msavoritias.me (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719066625; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MseUyAQZAVV5AqF0Jp6PUi1b+X03cMu8tCJoeHR14Qk=; b=LzFIO0PUt7xwPjMO72hjls1yXDghIgOdTalyI/Et9zUJd7COKBIXQ24fD/H553vL0xYlId HPe+E0k9RTPpZpwj709vlVOmnZmAazhPURdoZDjLl6RLnMWk19lhBMYyZxT5JjYl3msYTe 8DdO2hcx+3SfsTHTzNeDv/sjmbbuJMh3IS0GvP6IEHTRuszcwOueCisCsaAiD88jIZcRBu zt+XnTn1hSqnO164NUmW76QXWbZ0WKdtwlH/5KUzubkYWbhX3r2CLY0CdhuPyVd8VZ0Xs/ QFLDktIboHXE+Kb3VsnsLUkLRs1Xzf/B5YhqcjC1xJ2nuxOFkBM34ipHYOQTWA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719066625; a=rsa-sha256; cv=none; b=gttMTnhsFYqDFXSBHK+RFw+5xehpqaqoGnly3MIT1owIhgIaaCpEJGhXEzVGVI3zuyiW9t 97sx0M1Uobgq3qtFvlhq8He7eHgd8v2eI6MO/rbZMvXYx2HFFWUl8zNdgf2AOyqIV/VQ3+ tkhQmi7fSIKvA0r3v+keEhbHee/EaRb2e1USrWN+gfMLMqwMgGZLSzXvp5YYk6BkfD8q58 QUG/bEOuibF9feRBXHarf+jCYmAS4oYEoORKlINZIyxOHKcGSf7ImpZj3Vqz/0GSTxvK0G JI/BrhpA4kJnWT+IevW+69/M1TI1VWPPlSXnCC1bmgcx8QsLcnMRqRS2LDUUhw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=msavoritias.me header.s=20210930 header.b=QMWgDc5j; dmarc=fail reason="SPF not aligned (relaxed)" header.from=msavoritias.me (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9983D39218 for ; Sat, 22 Jun 2024 16:30:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sL1kj-0002vo-B1; Sat, 22 Jun 2024 10:30:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sL1kh-0002vE-CI for guix-patches@gnu.org; Sat, 22 Jun 2024 10:30:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sL1kh-0000BM-3b for guix-patches@gnu.org; Sat, 22 Jun 2024 10:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sL1kg-0007QN-T2 for guix-patches@gnu.org; Sat, 22 Jun 2024 10:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71697] [PATCH v2] guix: scripts: lint: Honor package property to exclude chercker. Resent-From: MSavoritias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Jun 2024 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71697 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier Cc: Josselin Poiret , Maxim Cournoyer , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Florian Pelz , Ricardo Wurmus , 71697@debbugs.gnu.org, Christopher Baines , Matthew Trzcinski Received: via spool by 71697-submit@debbugs.gnu.org id=B71697.171906659128479 (code B ref 71697); Sat, 22 Jun 2024 14:30:02 +0000 Received: (at 71697) by debbugs.gnu.org; 22 Jun 2024 14:29:51 +0000 Received: from localhost ([127.0.0.1]:48014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL1kU-0007PF-FS for submit@debbugs.gnu.org; Sat, 22 Jun 2024 10:29:51 -0400 Received: from mail.webarch.email ([81.95.52.48]:36152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL1kR-0007P6-IU for 71697@debbugs.gnu.org; Sat, 22 Jun 2024 10:29:48 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A30421A88747; Sat, 22 Jun 2024 15:29:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=msavoritias.me; s=20210930; t=1719066584; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=MseUyAQZAVV5AqF0Jp6PUi1b+X03cMu8tCJoeHR14Qk=; b=QMWgDc5jQ41Ca3+MzMJQetjMKeOyLJqHqPm5Ivbf2XYxPcq0s6TlFo5+v1QI7Zia014nrS yrBQ9brx0nuDBAVlPZYJ79TI2E3E0lChuj3G9SotlZfzgSOU7S5isFgpDGPRUullCFD//w l9qV8C7i72d9oeQPNjTVOpwbTFnW1kf3lfd9l0yKm/AVmvlCiA++v9tiU/ao/p3+R5Do+D d932MhEaNLTiws1JK4Eb5a908JMf6ZEQYVqFkB8WxCGrSv0lsA048U16qTwtxh6gE5Bo34 JwVI3/eRqTTOkcL4I+NI/W4mACmNHuLEc0ZBadhDWLOQyhliuWdpi+uGaIZ+sg== Date: Sat, 22 Jun 2024 17:29:19 +0300 From: MSavoritias Message-ID: <20240622172919.2709d7c3@fannys.me> In-Reply-To: <4e0382d4b36b12d59774d23e0e9177889e2398f2.1718994792.git.zimon.toutoune@gmail.com> References: <8cb162bcde91d3b39453de576caadb9a6f8f8733.1718990517.git.zimon.toutoune@gmail.com> <4e0382d4b36b12d59774d23e0e9177889e2398f2.1718994792.git.zimon.toutoune@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.76 X-Spam-Score: -1.76 X-Migadu-Queue-Id: 9983D39218 X-Migadu-Scanner: mx11.migadu.com X-TUID: OEObrgy6Ktep On Fri, 21 Jun 2024 20:33:28 +0200 Simon Tournier wrote: > * guix/scripts/lint.scm (run-checkers): Skip the checker if the package is > marked. > * doc/guix.texi: Document it. >=20 > Change-Id: Idf8e5c67102a1701ebd917bbc6212cfeb6ea2054 > --- > doc/guix.texi | 17 ++++++++++++++++- > guix/scripts/lint.scm | 17 +++++++++++++++-- > 2 files changed, 31 insertions(+), 3 deletions(-) >=20 > diff --git a/doc/guix.texi b/doc/guix.texi > index 769ca1399f..46a4079c4b 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -71,7 +71,7 @@ > Copyright @copyright{} 2019 Alex Griffin@* > Copyright @copyright{} 2019, 2020, 2021, 2022 Guillaume Le Vaillant@* > Copyright @copyright{} 2020 Liliana Marie Prikler@* > -Copyright @copyright{} 2019, 2020, 2021, 2022, 2023 Simon Tournier@* > +Copyright @copyright{} 2019, 2020, 2021, 2022, 2023, 2024 Simon Tournier= @* > Copyright @copyright{} 2020 Wiktor =C5=BBelazny@* > Copyright @copyright{} 2020 Damien Cassou@* > Copyright @copyright{} 2020 Jakub K=C4=85dzio=C5=82ka@* > @@ -15444,6 +15444,21 @@ Invoking guix lint > to the new style. > @end table > =20 > +Sometimes it is not desired to run the same checker each time > +@command{guix lint} is invoked---e.g., because the checker takes time or > +to avoid to send again and again the same request for archiving. > +Instead of excluding the checker at the command-line via the option > +@code{--exclude}, the package might be marked to skip the checker by > +honoring the property in package definition, e.g., > + > +@lisp > +(package > + (name "python-scikit-learn") > + ;; @dots{} > + (properties '((no-archival . #t) > + (no-name . #t)))) > +@end lisp > + > The general syntax is: > =20 > @example > diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm > index ee3de51fb1..d8bac277a0 100644 > --- a/guix/scripts/lint.scm > +++ b/guix/scripts/lint.scm > @@ -9,7 +9,7 @@ > ;;; Copyright =C2=A9 2017 Tobias Geerinckx-Rice > ;;; Copyright =C2=A9 2017, 2018 Efraim Flashner > ;;; Copyright =C2=A9 2018, 2019 Arun Isaac > -;;; Copyright =C2=A9 2019, 2020 Simon Tournier > +;;; Copyright =C2=A9 2019, 2020, 2024 Simon Tournier > ;;; Copyright =C2=A9 2020 Brice Waegeneire > ;;; > ;;; This file is part of GNU Guix. > @@ -39,6 +39,7 @@ (define-module (guix scripts lint) > #:use-module (ice-9 format) > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-37) > + #:use-module (srfi srfi-26) > #:export (guix-lint > run-checkers)) > =20 > @@ -61,6 +62,18 @@ (define (emit-warnings warnings) > =20 > (define* (run-checkers package checkers #:key store) > "Run the given CHECKERS on PACKAGE." > + (define (checkers* checkers) > + (let ((properties (package-properties package))) > + (filter (lambda (checker) > + (any (lambda (p) > + (eq? p ((compose string->symbol > + (cut string-append "no-" <>) > + symbol->string > + lint-checker-name) > + checker))) > + properties)) > + checkers))) > + > (let ((tty? (isatty? (current-error-port)))) > (for-each (lambda (checker) > (when tty? > @@ -72,7 +85,7 @@ (define* (run-checkers package checkers #:key store) > (if (lint-checker-requires-store? checker) > ((lint-checker-check checker) package #:store store) > ((lint-checker-check checker) package)))) > - checkers) > + (checkers* checkers)) > (when tty? > (format (current-error-port) "\x1b[K") > (force-output (current-error-port))))) >=20 > base-commit: bc8a41f4a8d9f1f0525d7bc97c67ed3c8aea3111 Why not make this opt-in instead and have it `enable-archiving`? Because as it currently stands this patch doesn't account for: - people who dont have channels but run guix lint - people who may not read the manual and have their code sent to SWH even t= ho they didnt intent it Guix should strive to do what it is explicitly asked. nothing more. which i= s lint in this case, not archiving. MSavoritias