From unknown Sun Jun 15 08:39:17 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#70499 <70499@debbugs.gnu.org> To: bug#70499 <70499@debbugs.gnu.org> Subject: Status: [PATCH] utils: Add find-unordered-packages procedure. Reply-To: bug#70499 <70499@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:39:17 +0000 retitle 70499 [PATCH] utils: Add find-unordered-packages procedure. reassign 70499 guix-patches submitter 70499 Herman Rimm severity 70499 normal tag 70499 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 21 14:00:47 2024 Received: (at submit) by debbugs.gnu.org; 21 Apr 2024 18:00:48 +0000 Received: from localhost ([127.0.0.1]:44092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rybUU-0003QU-Aa for submit@debbugs.gnu.org; Sun, 21 Apr 2024 14:00:46 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rybUK-0003Ok-Ss for submit@debbugs.gnu.org; Sun, 21 Apr 2024 14:00:33 -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 1rybTz-00006Z-T1 for guix-patches@gnu.org; Sun, 21 Apr 2024 14:00:07 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117] helo=email.rimm.ee) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rybTx-0004kE-Ia for guix-patches@gnu.org; Sun, 21 Apr 2024 14:00:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1713722399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=P4Hc2P0rNwb3axplX6ma8y5czDIXuQiiAas7NzZ4X6Q=; b=JztqxP5fGU3KeWXJyFeEErLkWayvhmtkFL2r++s3Y1mFveJxt1QZsM0yUzEuL4CniXkrcJ RXMkaaESUGewPkDaGsFPhID/JlFMHjHlc3YnVm8/akatHnmLafknMgo+63sk6YuAi8sobI awKTE0aeFgsoJD19QAsB0mXOeF2MqWIgyzrV9qSFvW0Gix6sULod5LLOU5+VbVhF+3T8z1 QHMKZo42IOoa7JXd4sevFa0D44UU1D0BDlE61FWJ48TvtalB6Momecl1+BiOAp8I7KuQAL XfTI5MZ/Kwixwh9gIadplY6fSppYlWr2QmgFxyicPeXy+dovjrskQKpiZRrWUg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 058b0cdc (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sun, 21 Apr 2024 17:59:58 +0000 (UTC) From: Herman Rimm To: guix-patches@gnu.org Subject: [PATCH] utils: Add find-unordered-packages procedure. Date: Sun, 21 Apr 2024 19:59:49 +0200 Message-ID: <1f19f015e714d68c84cd91618b1340365c8363bb.1713722288.git.herman@rimm.ee> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@rimm.ee; helo=email.rimm.ee X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_PBL=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Herman Rimm X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) * guix/utils.scm (find-unordered-packages): Add and export procedure. * tests/utils.scm ("find-unordered-packages"): Add test. Change-Id: I26ea0fca7d428b192711f75ff3cf5e5a4416b1b6 --- Hello, I added a procedure which returns the line numbers where packages break from alphabetical order, e.g.: scheme@(guix-user)> (lset-xor eqv? (find-unordered-packages "gnu/packages/crates-io.scm")) $1 = (626 1153 2693 2715 2840 4074 4139 4187 6099 6243 6382 6896 7677 9465 10346 11424 12089 12552 12676 12887 16147 16364 16897 18195 18260 19912 21335 22489 22792 23898 24344 24801 25443 25492 26591 27832 27944 31206 32365 32502 32609 32770 34281 34913 36192 36320 36621 36718 36828 37511 38169 39000 39360 39684 40921 41153 41459 41501 42121 42803 42910 44318 44585 46435 47350 47456 47709 48043 49624 49905 51084 51216 51560 53586 54473 57062 58925 59048 59134 59584 59664 59702 59914 62399 66006 66266 66391 68003 68200 68244 70292 70321 71660 71686 71761 72643 73746 73880 74434 74459 77309 77646 78136 79569 81722 81896 83802 85617 87167 89037 92212) It could be extended to also expect package versions in decreasing order. Maybe I can use it to sort packages automatically later. Cheers, Herman guix/utils.scm | 21 +++++++++++++++++++++ tests/utils.scm | 19 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index d8ce6ed886..f690618306 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -148,6 +148,7 @@ (define-module (guix utils) delete-expression insert-expression find-definition-insertion-location + find-unordered-packages filtered-port decompressed-port @@ -531,6 +532,26 @@ (define (find-definition-insertion-location file term) (and (not (eof-object? syntax)) (syntax-source syntax)))))))) +(define (find-unordered-packages file) + "Return the line numbers of top-level package definitions whose name +alphabetically preceeds the previous name." + (call-with-input-file file + (lambda (port) + (let loop ((lst '()) + (previous-name "")) + (match (read-syntax port) + ((? eof-object?) + (reverse! lst)) + (exp + (match (syntax->datum exp) + (('define-public _ (or ('package _ ('name name) _ ...) + ('package ('name name) _ ...))) + (loop (if (string< name previous-name) + (cons (assoc-ref (syntax-source exp) 'line) lst) + lst) + name)) + (_ (loop lst previous-name))))))))) + ;;; ;;; Keyword arguments. diff --git a/tests/utils.scm b/tests/utils.scm index 462e43e2b1..8956ea5420 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -303,6 +303,25 @@ (define-public package-2\n 'package)\n" (find-definition-insertion-location temp-file term)) (list 'package 'package-1 'package-2)))) +(test-equal "find-unordered-packages" + (list 7) + (begin + (call-with-output-file temp-file + (lambda (port) + (display " +(define-public rust-addr2line-0.19 + (package + (inherit rust-addr2line-0.21) + (name \"rust-addr2line\") + (version \"0.19.0\"))) + +(define-public rust-addchain-0.2 + (package + (name \"rust-addchain\") + (version \"0.2.0\"))) +" port))) + (find-unordered-packages temp-file))) + (test-equal "string-distance" '(0 1 1 5 5) (list base-commit: a1d711c92e119f6b5b8e99a620cdba92a4ca3bfb -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 06:31:05 2024 Received: (at 70499) by debbugs.gnu.org; 1 May 2024 10:31:05 +0000 Received: from localhost ([127.0.0.1]:36648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s27Ev-0004qI-5F for submit@debbugs.gnu.org; Wed, 01 May 2024 06:31:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s27Er-0004pv-Qc for 70499@debbugs.gnu.org; Wed, 01 May 2024 06:31:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s27EK-00058Z-L8; Wed, 01 May 2024 06:30:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=C2FJzYHUcxdmPTbw3okK19E8JplzycTD1Qoy0VrUdo0=; b=q4MvBQSmOLYVJD1Ptc6H v1h1bDfSmN0/k879SVp+N+4RLn/Et6ft5DKccRnVYG1eHBiFcz0MQ5w4q4kDOFi9JPlwuLb0bDx9w aJv27VeVk92AXmdx1Tm7Hldec/YjA3+zBrHFKiS7bjcPtVw0di9jgPm/33sBVExO4l2dCmC7B96H9 BpTw2HP8pjPI4brHbe1LkTuuVw8lht9VTAeqcmb5/cU0D0CWt892UMuvEE1Le/2G8dfFoS5FX9g4s vj2MfkTi4yn8R8TQCeUAl1VuZe5YrT0I5+QcmGfEefY5LAuN6elE1iJRya9Pr8DWzvbhgmMo92TTz 82QPhb/K3oEHnQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Herman Rimm Subject: Re: [bug#70499] [PATCH] utils: Add find-unordered-packages procedure. In-Reply-To: <1f19f015e714d68c84cd91618b1340365c8363bb.1713722288.git.herman@rimm.ee> (Herman Rimm's message of "Sun, 21 Apr 2024 19:59:49 +0200") References: <1f19f015e714d68c84cd91618b1340365c8363bb.1713722288.git.herman@rimm.ee> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 13 =?utf-8?Q?Flor=C3=A9al?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du =?utf-8?Q?B=C3=A2ton-d'or?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 01 May 2024 12:30:20 +0200 Message-ID: <87o79p7rk3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70499 Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines , 70499@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Herman, Herman Rimm skribis: > * guix/utils.scm (find-unordered-packages): Add and export procedure. > * tests/utils.scm ("find-unordered-packages"): Add test. > > Change-Id: I26ea0fca7d428b192711f75ff3cf5e5a4416b1b6 > --- > Hello, > > I added a procedure which returns the line numbers where packages break > from alphabetical order, e.g.: > > scheme@(guix-user)> (lset-xor eqv? (find-unordered-packages > "gnu/packages/crates-io.scm")) > $1 =3D (626 1153 2693 2715 2840 4074 4139 4187 6099 6243 6382 6896 7677 > 9465 10346 11424 12089 12552 12676 12887 16147 16364 16897 18195 18260 > 19912 21335 22489 22792 23898 24344 24801 25443 25492 26591 27832 > 27944 31206 32365 32502 32609 32770 34281 34913 36192 36320 36621 > 36718 36828 37511 38169 39000 39360 39684 40921 41153 41459 41501 > 42121 42803 42910 44318 44585 46435 47350 47456 47709 48043 49624 > 49905 51084 51216 51560 53586 54473 57062 58925 59048 59134 59584 > 59664 59702 59914 62399 66006 66266 66391 68003 68200 68244 70292 > 70321 71660 71686 71761 72643 73746 73880 74434 74459 77309 77646 > 78136 79569 81722 81896 83802 85617 87167 89037 92212) > > It could be extended to also expect package versions in decreasing > order. Maybe I can use it to sort packages automatically later.=20 Nice. Do you plan to use this procedure in a command-line tool? > +(define (find-unordered-packages file) > + "Return the line numbers of top-level package definitions whose name > +alphabetically preceeds the previous name." My first thought when seeing the name is that this was returning a list of packages, and then I wondered how it differed from =E2=80=98fold-package= s=E2=80=99 and the likes. Maybe call it =E2=80=98package-definition-alphabetical-sort-breakage=E2=80= =99 or something like that? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 13:26:26 2024 Received: (at 70499) by debbugs.gnu.org; 5 May 2024 17:26:26 +0000 Received: from localhost ([127.0.0.1]:60850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3fd3-00022W-5h for submit@debbugs.gnu.org; Sun, 05 May 2024 13:26:26 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:60339 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3fcx-00022O-B3 for 70499@debbugs.gnu.org; Sun, 05 May 2024 13:26:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1714929946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NA0NTery0onmh7+gWRbE00dk92+tJ+hu4R/qvZR5YeM=; b=Lf2ivenLQ4cW9Mx15uupVO7rI3HpxMZwZMYlER1Q81xA+tomnyDRD+pUvvBvtOnI5euy21 o14mFu6ian9/IQV9IlJRoKUWbBjekGN8uJxXjbRsd9w+5JBz806i5+ebQk0EY6Bk1TgdHr y7e/bkPUM4PawRQDYQCWxie4og5OfaHzFwh5+ldWeeyLd7ZkJs/HkEbba9vGxtoPHJ0qHm 29jBNzm4+AAdSoBGqIe6yWL5IY3RtXvQw1iPMlTm3K/qNfiVdXgAYnA6jaJKQHgDVf0yCB hNki5Kot+foZXvkJmIV1IWzvQWGnLpG4ePDGjq3kU9Y9jsl20JX4qKJmK9NmHQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 3ac7301f (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70499@debbugs.gnu.org>; Sun, 5 May 2024 17:25:46 +0000 (UTC) From: Herman Rimm To: 70499@debbugs.gnu.org Subject: [PATCH v2 0/3] Lint package order. Date: Sun, 5 May 2024 19:25:32 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 record [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address -0.0 SPF_PASS SPF: sender matches SPF record 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 70499 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 record [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 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@0.20.2: breaks from alphabetical order gnu/packages/matrix.scm:244:0: pantalaimon@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) id 1s3fd5-00022j-2Z for submit@debbugs.gnu.org; Sun, 05 May 2024 13:26:27 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:43969 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3fd2-00022P-Jb for 70499@debbugs.gnu.org; Sun, 05 May 2024 13:26:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1714929948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N8ArpmDVmbwnVO2vxDlcO6iQvl56E0I0kIjmp0SUGPo=; b=G8vgMEmODnb/o7Q8KCvpotHKH6la5oddNJFm9M67+G58+Xw5Yh1xyOrcM/y3yvbT50zAxD N6H0dzzAyk6hqFx5EGPlZJ5ErbD7R2C8Ist73lHLZypN6lY3iXovY4M50C1KATEt4xYMnP NnHsw+dK1/F4C5g+8yNgB5Uml+z7IkL/wQgpoMQQJ0SIqSpzFHN+n+hpLFIus9pCkZWTxH fKM9WlK+iQakMA9JxQAO0S0wRGpKtQ897XSs8HBI92fQ0/YiNQ/rGADIPWmFjpG1Tg0pVQ k5ATKbACLNQBxI2cs7QXWumh12oaFUYzvNNMsM2AEZTJq7d12XGr6tWSt7nmHQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id c950b38d (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70499@debbugs.gnu.org>; Sun, 5 May 2024 17:25:48 +0000 (UTC) From: Herman Rimm To: 70499@debbugs.gnu.org Subject: [PATCH v2 2/3] ui: Make 'user-module' parameter of 'load*' optional. Date: Sun, 5 May 2024 19:25:34 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/ui.scm (load*): Make 'user-module' paramater optional. Change-Id: I4ebf854cd48bb8944bd70ac1c3ece4476fd6710c --- guix/ui.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/ui.scm b/guix/ui.scm index d82fa533cc..8839079ee0 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -216,7 +216,8 @@ (define (try-canonicalize-path file) (canonicalize-path file)) (const [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] 0.0 TVD_RCVD_IP Message was received from an IP address -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 70499 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/ui.scm (load*): Make 'user-module' paramater optional. Change-Id: I4ebf854cd48bb8944bd70ac1c3ece4476fd6710c --- guix/ui.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/ui.scm b/guix/ui.scm index d82fa533cc..8839079ee0 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -216,7 +216,8 @@ (define (try-canonicalize-path file) (canonicalize-path file)) (const [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/ui.scm (load*): Make 'user-module' paramater optional. Change-Id: I4ebf854cd48bb8944bd70ac1c3ece4476fd6710c --- guix/ui.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/ui.scm b/guix/ui.scm index d82fa533cc..8839079ee0 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -216,7 +216,8 @@ (define (try-canonicalize-path file) (canonicalize-path file)) (const file))) -(define* (load* file user-module +(define* (load* file #:optional + (user-module (make-fresh-user-module)) #:key (on-error 'nothing-special)) "Load the user provided Scheme source code FILE." (define (error-string frame args) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 13:26:29 2024 Received: (at 70499) by debbugs.gnu.org; 5 May 2024 17:26:30 +0000 Received: from localhost ([127.0.0.1]:60855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3fd7-000230-Cn for submit@debbugs.gnu.org; Sun, 05 May 2024 13:26:29 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:43969 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3fd3-00022P-TS for 70499@debbugs.gnu.org; Sun, 05 May 2024 13:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1714929949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0Cr+L6bHUg0hBNqUqvAQB0GNpLBHU88ZIpSxYo5LK0I=; b=WRNy/rjTLR9b+VpRz5EEKbIneElq3vKjZZ9ao49Wr5ZnH44iuUvfKsvJ+K0aIwUOMpVrqi 8L/9vtOFyzDkbpp9Yhhl5G6QF9TUbtrcLd3r9irfCar6Tu103NdexhbcAQzr/spugBMRIG DQLRtI53AprRiCwIa1JXw/8fCCF6XUBpDSkiOJXybz2GT1cZfOg586ETTnTDR+ZPQL8A2l qV7XKLl2q1P5d2y8pOc9YY78t5qjbDEB4uw24352jfDSWUmUdT/Dx2lDtQ7YyYfOkrZYVN 20U/mdPe5Tt8q4qKDsBhUuLqYbbXGoyZ/Tj1Z2m0ygcTziqid5ccdbfWIpAiyA== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id bf9f10c3 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70499@debbugs.gnu.org>; Sun, 5 May 2024 17:25:49 +0000 (UTC) From: Herman Rimm To: 70499@debbugs.gnu.org Subject: [PATCH v2 3/3] scripts: lint: Add 'whole-file' option with ordering lint. Date: Sun, 5 May 2024 19:25:35 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/scripts/lint.scm (show-help): Describe option. (%options): Add 'whole-file' option. (guix-lint): Lint (order of) packages in files. * doc/guix.texi (Invoking guix lint): Document option. Change-Id: I52b48a9a6982d0c4a03416e3d070887c64716485 --- doc/guix.texi | 23 ++++++++++++++++-- guix/scripts/lint.scm | 55 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 70 insertions(+), [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] 0.0 TVD_RCVD_IP Message was received from an IP address -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 70499 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/scripts/lint.scm (show-help): Describe option. (%options): Add 'whole-file' option. (guix-lint): Lint (order of) packages in files. * doc/guix.texi (Invoking guix lint): Document option. Change-Id: I52b48a9a6982d0c4a03416e3d070887c64716485 --- doc/guix.texi | 23 ++++++++++++++++-- guix/scripts/lint.scm | 55 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 70 insertions(+), [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/scripts/lint.scm (show-help): Describe option. (%options): Add 'whole-file' option. (guix-lint): Lint (order of) packages in files. * doc/guix.texi (Invoking guix lint): Document option. Change-Id: I52b48a9a6982d0c4a03416e3d070887c64716485 --- doc/guix.texi | 23 ++++++++++++++++-- guix/scripts/lint.scm | 55 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 70 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1c1e0164e7..c68b62d475 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15349,6 +15349,12 @@ Invoking guix lint @end example If no package is given on the command line, then all packages are checked. +To lint entire source files, the syntax is: + +@example +guix lint @var{options} --whole-file @var{file}@dots{} +@end example + The @var{options} may be zero or more of the following: @table @code @@ -15386,9 +15392,22 @@ Invoking guix lint Add @var{directory} to the front of the package module search path (@pxref{Package Modules}). -This allows users to define their own packages and make them visible to -the command-line tools. +@item --whole-file +@itemx -f +Lint the given files in their entirety. In that case, subsequent +arguments are interpreted as file names (rather than package names). +Also, an additional checker is enabled, which checks if a package +alphabetically succeeds the one above it. + +As an example, here is how you might quickly check if packages are in +alphabetical order: + +@example +guix lint -c name -f gnu/packages/matrix.scm +@end example +The previous two options allow users to define their own packages and +make them visible to the command-line tools. @end table @node Invoking guix size diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index ee3de51fb1..86ff5cf1c0 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2019, 2020 Simon Tournier ;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,8 +29,10 @@ ;;; along with GNU Guix. If not, see . (define-module (guix scripts lint) + #:use-module (guix diagnostics) #:use-module (guix packages) #:use-module (guix lint) + #:use-module (guix modules) #:use-module (guix ui) #:use-module (guix store) #:use-module (guix scripts) @@ -115,6 +118,9 @@ (define (show-help) -L, --load-path=DIR prepend DIR to the package module search path")) (newline) (display (G_ " + -f, --whole-file lint the entire contents of the given file(s)")) + (newline) + (display (G_ " -h, --help display this help and exit")) (display (G_ " -l, --list-checkers display the list of available lint checkers")) @@ -161,6 +167,9 @@ (define %options (lambda args (leave-on-EPIPE (show-help)) (exit 0))) + (option '(#\f "whole-file") #f #f + (lambda (opt name arg result) + (alist-cons 'whole-file? #t result))) (option '(#\l "list-checkers") #f #f (lambda (opt name arg result) (alist-cons 'list? #t result))) @@ -187,12 +196,17 @@ (define-command (guix-lint . args) #:build-options? #f)) (let* ((opts (parse-options)) - (args (filter-map (match-lambda - (('argument . spec) - (specification->package spec)) - (('expression . exp) - (read/eval-package-expression exp)) - (_ #f)) + (whole-file? (assoc-ref opts 'whole-file?)) + (args (filter-map (if whole-file? + (match-lambda + (('argument . file) file) + (_ #f)) + (match-lambda + (('argument . spec) + (specification->package spec)) + (('expression . exp) + (read/eval-package-expression exp)) + (_ #f))) (reverse opts))) (no-checkers (or (assoc-ref opts 'exclude) '())) (the-checkers (filter (lambda (checker) @@ -221,6 +235,35 @@ (define-command (guix-lint . args) (call-maybe-with-store (lambda (store) (cond + (whole-file? + (when (null? args) + (warning (G_ "no files specified, nothing to do~%"))) + (for-each + (lambda (file) + (load* file) + (let* ((module (resolve-interface + (file-name->module-name file))) + (packages (sort (fold-packages cons '() + (list module)) + package-location) id 1s3fd7-000232-VI for submit@debbugs.gnu.org; Sun, 05 May 2024 13:26:30 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:60339 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3fd2-00022O-93 for 70499@debbugs.gnu.org; Sun, 05 May 2024 13:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1714929948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iSij0MQvRro83Pihuh+suna2HvuyxZGXraJxw6pNFIs=; b=FtPudI8AubRzV5DmNPEwceOCtiWSyxEfCHwR8VvF7MMyafXlsmMj/Y2AiT1D3oGpDweTm+ iXZ0p2WB5/yM0ux8JJIA2gMTKfDgNaV32eTXlsTQomFaLcvCMtoPN4fIsB+7Oykua/th+W /F819AGilZEJVn72mved08o8DZLKf7XfTjMJ6NzkMR77p1qtw2k8BXJR67IzCjyXD6jiGQ MraNTKvYzu0Qww5qYLIt8aSRSueHrYA1RGVv7NU3LL1HP27IiMCpCQx5vfIfYPALo6pAp4 ZsVDl2e9U10QZi03bbqSNG8t+PykKIO8e+jRf8lcdpo8IO/17lmqfTrIOY0+pw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 2a222f1b (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70499@debbugs.gnu.org>; Sun, 5 May 2024 17:25:48 +0000 (UTC) From: Herman Rimm To: 70499@debbugs.gnu.org Subject: [PATCH v2 1/3] =?UTF-8?q?guix:=20Move=20=E2=80=98package-location?= =?UTF-8?q?<=3F=E2=80=99=20to=20(guix=20packages).?= Date: Sun, 5 May 2024 19:25:33 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/scripts/style.scm (package-location List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/scripts/style.scm (package-location) id 1sAs3D-0000Bv-3j for submit@debbugs.gnu.org; Sat, 25 May 2024 10:07:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAs3A-0000BW-UX for 70499@debbugs.gnu.org; Sat, 25 May 2024 10:07:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAs2t-00022f-FW; Sat, 25 May 2024 10:06:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=aXlwuPZl6ZGtegVHTKsotbis+7PTHa+Kou3ZgU5y3cg=; b=kg8RDQC8oruycuXGbMES c6QmhH5qIAa7tNh/HYkbp4CpOM9cxTUzfMG11e7yiOITcHsKr/BTaKSuu8KPBJ2zPvf2MIJ1cvCRI BHIYfjkH4eVn1X0BxOKtMk8VTCsXawM+sPv50jQ6VIx1VogkTFeQvug686qneLXEljjgS3emmHsEZ a5h/WZyZLiLl3/XQFp067tbUQPy2me0jgCSE2FTRwR6rPCKlL05scvb9jCKshg2YABBoPyaze4G7k 4uutxZ1RlMsVVZrMtzw07kfwDQWpZe2aYnSVvS9r7hmPahjMpKE4zCMUbDwf6Ze9RRZPBirUbX0Fa tj0wy4HwanHNhA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Herman Rimm Subject: Re: [bug#70499] [PATCH v2 0/3] Lint package order. In-Reply-To: (Herman Rimm's message of "Sun, 5 May 2024 19:25:32 +0200") References: <1f19f015e714d68c84cd91618b1340365c8363bb.1713722288.git.herman@rimm.ee> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 7 Prairial an 232 de la =?utf-8?Q?R=C3=A9vol?= =?utf-8?Q?ution=2C?= jour du Fromental X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 25 May 2024 16:06:45 +0200 Message-ID: <87a5ke0yve.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70499 Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , Ricardo Wurmus , Christopher Baines , 70499@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Herman, Herman Rimm 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@0.20.2: breaks from al= phabetical order > gnu/packages/matrix.scm:244:0: pantalaimon@0.10.5: breaks from alphabet= ical 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=E2=80=99m not sure I understand. The alpabetical checker is part of anot= her patch set, right? (I know I=E2=80=99ve seen it, but I=E2=80=99m afraid I= =E2=80=99ve lost track of it. :-)) Anyway, we can and should discuss =E2=80=98--whole-file=E2=80=99 independen= tly of the alphabetical-order checker. > guix: Move =E2=80=98package-location ui: Make 'user-module' parameter of 'load*' optional. > scripts: lint: Add 'whole-file' option with ordering lint. This LGTM modulo minor issues: =E2=80=A2 The second patch looks unrelated to =E2=80=98--whole-file=E2=80= =99, I=E2=80=99d drop it from this series. =E2=80=A2 The third patch misses just one thing: a test in =E2=80=98tests/guix-lint.sh=E2=80=99. Could you send an updated patch series? Thanks, and apologies for the delay! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 04 16:27:12 2024 Received: (at 70499) by debbugs.gnu.org; 4 Jul 2024 20:27:12 +0000 Received: from localhost ([127.0.0.1]:43177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPT2u-0007bl-IJ for submit@debbugs.gnu.org; Thu, 04 Jul 2024 16:27:12 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:36745 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPT2s-0007bW-Ex for 70499@debbugs.gnu.org; Thu, 04 Jul 2024 16:27:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1720124819; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=L87CH8sIioWjO64Wp57LHX/bc7lCZcESmrMWZ4kh/4I=; b=CSE/rXMx8ByAp5AwLulUCwV4sWE2rwUnIQU9MoyOlTNM2nXxYmY9wsmB9i5FM6WoI+Pozb 6nSwOEKXkodk22799bJsks0h3YFdT8gtqZhw7F2jHenVN6zWeVssPytBvmLZXuOJNqc3B6 ZO5zKfRfbwLgg4d2u4SzaUQakWYCn1pyH0jJBaLsC1Mfk6kMqVIPP3qBD2MUemXaJntEZd h35qvR66py6mm8jiMIZjwx8g3PeihyhFgfnj2SN0FyS23TRIdZG+p3YO4/INybp2dR8WNN v9FxiOaQs3wHefevEeqDVV0123jt8JdlzMYJbSOqYBflHFS9XXgMj+HS+sm3sg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 0801a816 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 4 Jul 2024 20:26:59 +0000 (UTC) Date: Thu, 4 Jul 2024 22:26:37 +0200 From: Herman Rimm To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#70499] [PATCH v2 0/3] Lint package order. Message-ID: References: <1f19f015e714d68c84cd91618b1340365c8363bb.1713722288.git.herman@rimm.ee> <87a5ke0yve.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87a5ke0yve.fsf@gnu.org> X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, On Sat, May 25, 2024 at 04:06:45PM +0200, Ludovic Courtès wrote: > > However the alphabetical order lint warnings only appear once another > > type of lint warning is emitted, or when end of file is [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] X-Debbugs-Envelope-To: 70499 Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , Ricardo Wurmus , Christopher Baines , 70499@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, On Sat, May 25, 2024 at 04:06:45PM +0200, Ludovic Courtès wrote: > > However the alphabetical order lint warnings only appear once another > > type of lint warning is emitted, or when end of file is [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hello, On Sat, May 25, 2024 at 04:06:45PM +0200, Ludovic Courtès wrote: > > 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. I added the '--alphabetical-sort' option to guix style in [bug#70800]. For guix lint, the alphabetical checker is added in [PATCH 3/3]. It runs only when '--whole-file' is specified. It cannot be toggled with -c or -x because it is not a normal checker, because run-checkers only runs on a single package at a time. It could be a normal checker if given a package, the preceding package can be retrieved. It could be stored as a parameter. How would you get the preceding package? > > guix: Move ‘package-location > 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. I use load* on the specified file(s). I could instead add a --modules= MODULE1,MODULE2... option to be used with -L when necessary. Cheers, Herman