From unknown Sun Jun 15 08:37:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40367] [PATCH] lint: Display result of checkers on stdout. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Apr 2020 07:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40367@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15857267429104 (code B ref -1); Wed, 01 Apr 2020 07:40:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Apr 2020 07:39:02 +0000 Received: from localhost ([127.0.0.1]:37423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJXxm-0002Mk-FJ for submit@debbugs.gnu.org; Wed, 01 Apr 2020 03:39:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:41536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJXxk-0002MF-Dl for submit@debbugs.gnu.org; Wed, 01 Apr 2020 03:39:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJXxj-0008Kt-7j for guix-patches@gnu.org; Wed, 01 Apr 2020 03:39:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJXxh-00064a-Mg for guix-patches@gnu.org; Wed, 01 Apr 2020 03:38:58 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60531) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJXxh-0005xw-Gy for guix-patches@gnu.org; Wed, 01 Apr 2020 03:38:57 -0400 X-Originating-IP: 78.237.113.178 Received: from localhost (luy13-1-78-237-113-178.fbx.proxad.net [78.237.113.178]) (Authenticated sender: brice@waegenei.re) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 04A561C000B for ; Wed, 1 Apr 2020 07:38:53 +0000 (UTC) From: Brice Waegeneire Date: Wed, 1 Apr 2020 09:38:35 +0200 Message-Id: <20200401073835.5890-1-brice@waegenei.re> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.197 X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/scripts/lint.scm (run-checkers): Replace 'current-error-port' by 'current-output-port'. --- guix/scripts/lint.scm | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 8d08c484f5..87705ef6d5 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2017, 2018 Efraim Flashner ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2019 Simon Tournier +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,19 +56,21 @@ (define (run-checkers package checkers) "Run the given CHECKERS on PACKAGE." - (let ((tty? (isatty? (current-error-port)))) - (for-each (lambda (checker) - (when tty? - (format (current-error-port) "checking ~a@~a [~a]...\x1b[K\r" - (package-name package) (package-version package) - (lint-checker-name checker)) - (force-output (current-error-port))) - (emit-warnings - ((lint-checker-check checker) package))) - checkers) - (when tty? - (format (current-error-port) "\x1b[K") - (force-output (current-error-port))))) + (parameterize + ((guix-warning-port (current-output-port))) + (let ((tty? (isatty? (current-output-port)))) + (for-each (lambda (checker) + (when tty? + (format #t "checking ~a@~a [~a]...\x1b[K\r" + (package-name package) (package-version package) + (lint-checker-name checker)) + (force-output)) + (emit-warnings + ((lint-checker-check checker) package))) + checkers) + (when tty? + (format #t "\x1b[K") + (force-output))))) (define (list-checkers-and-exit checkers) ;; Print information about all available checkers and exit. -- 2.25.1 From unknown Sun Jun 15 08:37:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40367] [PATCH] lint: Display result of checkers on stdout. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Apr 2020 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40367@debbugs.gnu.org Received: via spool by 40367-submit@debbugs.gnu.org id=B40367.158574395622689 (code B ref 40367); Wed, 01 Apr 2020 12:26:02 +0000 Received: (at 40367) by debbugs.gnu.org; 1 Apr 2020 12:25:56 +0000 Received: from localhost ([127.0.0.1]:37533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJcRQ-0005ts-EH for submit@debbugs.gnu.org; Wed, 01 Apr 2020 08:25:56 -0400 Received: from tobias.gr ([80.241.217.52]:52416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJcRO-0005td-RH for 40367@debbugs.gnu.org; Wed, 01 Apr 2020 08:25:55 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 38f8f935 for <40367@debbugs.gnu.org>; Wed, 1 Apr 2020 12:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=6YhkeJTemu+hf0EJbHwW/t R/l31JPOeP5UodJ2Pp+jA=; b=SUShUHopIZMYS96SsG2s2jwgRSbPQHgYjjxxJb 10bDh0Jnc0EbZjHa5yfd1C5IplCJSiYyaNbt4Mg0gyV+zt3/w1MPSejqViD9H3mF xCr9tViOrRGRmx7Ol+CX4wfBEgjEEVEIX/xChqsxGH9ztJ+RjufQXjsug/I+NXz3 nM1Xb09rDb7/z6XHE+yfPYNMiAPMU2QcFi8OL3XHeGzVMWK982GoTSWTCy4QCrUG 2YpTMfl1jyukDIpwEB44rdKNgIg07HXbqGdYlxbeeFmXYAW6/HSX3BqECvnC3nuX A00AM3f/NBekp/wrKe7BEeFefIM55Spwy7l+Mx5aHbEuZSjQ== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id b03de752 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <40367@debbugs.gnu.org>; Wed, 1 Apr 2020 12:25:52 +0000 (UTC) From: Tobias Geerinckx-Rice References: <20200401073835.5890-1-brice@waegenei.re> In-reply-to: <20200401073835.5890-1-brice@waegenei.re> Date: Wed, 01 Apr 2020 14:25:52 +0200 Message-ID: <877dyzjstr.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Brice, Thanks! As discussed on IRC, I agree stdout is better. These are=20 reports, not run-time errors. Brice Waegeneire =E5=86=99=E9=81=93=EF=BC=9A > * guix/scripts/lint.scm (run-checkers): Replace=20 > 'current-error-port' by > 'current-output-port'. It should still print *progress* messages (and any run-time=20 warnings & errors) to stderr, though: $ guix lint sl >toot checking sl@5.02[cve]... $ guix lint sl >toot guix lint: error: something bad happened This includes reverting to (isatty? (current-error-port));=20 stdout's ttyness doesn't matter. Please also rebase your revisions onto current master=20 (particularly 57e12aa). Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl6EiFAACgkQ2Imw8BjF STwAyw/+IdsLVUqwaqAQlrqCVANHozUGT24ceAacWo/4VFnisPfuHxLDKsGI2469 t+RN/40oCdWcGzDWw/piT8MeTjkAK8cNb3gnZq7abJFrtRJgL859Mtw0k0ewCCwO mJofes7mphLYFKm+DAxAhXeJ6i4/BQimAaYwnNuIgPS2HUuR7Ke/FG92mUEaYcg9 rl1McTAcy+OW+KSXyHO/bl2t7DiLbSsYmDnv616UqdzUJyOKHSt3ZrqIhjzqcI5l nd6gW50GYeY0QgDViWteAW0x1eA6wYnMkN7hIyxamQGGhay3QPkkwg5TJRii5yy0 cu0WGtN1Q/wJHHCGgrIkeZYToi7mwYI0DRmcW0PQ4sLTsrlTFWaba9h61mvOX3Dx vcoRpJ/aX4iUoaJTxf3EQKZsoKOCah2nZmXFzxBN2bMm0c9AVpbOb4OCvR4ugwQQ D7cgCiacJZRN0izHIEp0DgtP1/lPgSMRtnJvmfmg6Q2BADl6kT0ft5cbpiTCUL3P o4vcGukGxA73KEpD4Q+gviAgljF5w39I4WBaYNuAaQqApmeynPNgWMDUWPw3xtzD vi8+5jzE7jSlTYFJDr+gAro0eRazuEVxhYHxp4dsYyvcXvrsKYoMxl2Rrufn/og9 BQoJfWvU/Vw9wyiKvwixAVWeCZPOCmQqova5RaxoRn2WTedg2Bo= =h8l7 -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 15 08:37:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40367] [PATCH v2] lint: Display result of checkers on stdout. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Apr 2020 13:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40367@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15857471791570 (code B ref -1); Wed, 01 Apr 2020 13:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Apr 2020 13:19:39 +0000 Received: from localhost ([127.0.0.1]:37581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJdHP-0000PF-Ad for submit@debbugs.gnu.org; Wed, 01 Apr 2020 09:19:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:38203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJdHM-0000Oy-OZ for submit@debbugs.gnu.org; Wed, 01 Apr 2020 09:19:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36622) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJdHK-00066a-Cj for guix-patches@gnu.org; Wed, 01 Apr 2020 09:19:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJdHJ-0002St-2K for guix-patches@gnu.org; Wed, 01 Apr 2020 09:19:34 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46549) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJdHI-0002Oe-SQ for guix-patches@gnu.org; Wed, 01 Apr 2020 09:19:33 -0400 X-Originating-IP: 78.237.113.178 Received: from localhost (luy13-1-78-237-113-178.fbx.proxad.net [78.237.113.178]) (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2C2E8E0005 for ; Wed, 1 Apr 2020 13:19:29 +0000 (UTC) From: Brice Waegeneire Date: Wed, 1 Apr 2020 15:19:25 +0200 Message-Id: <20200401131925.8532-1-brice@waegenei.re> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200401073835.5890-1-brice@waegenei.re> References: <20200401073835.5890-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.196 X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/scripts/lint.scm (emit-warnings): Use 'current-output-port' instead of 'current-error-port'. --- This version is rebased on top of master and only change the output port to stdout for the result of the checkers, not for the progress or any run-time errors. guix/scripts/lint.scm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 97ffd57301..28b4db656c 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2017, 2018 Efraim Flashner ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2019 Simon Tournier +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,13 +47,17 @@ ;; given, the location of PACKAGE otherwise, the full name of PACKAGE and the ;; provided MESSAGE. (for-each - (lambda (lint-warning) - (let ((package (lint-warning-package lint-warning)) - (loc (lint-warning-location lint-warning))) - (info loc (G_ "~a@~a: ~a~%") - (package-name package) (package-version package) - (lint-warning-message lint-warning)))) - warnings)) + (lambda (lint-warning) + (let* ((package (lint-warning-package lint-warning)) + (name (package-name package)) + (version (package-version package)) + (loc (lint-warning-location lint-warning)) + (message (lint-warning-message lint-warning))) + (parameterize + ((guix-warning-port (current-output-port))) + (info loc (G_ "~a@~a: ~a~%") + name version message) ))) + warnings)) (define* (run-checkers package checkers #:key store) "Run the given CHECKERS on PACKAGE." -- 2.25.1 From unknown Sun Jun 15 08:37:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40367] [PATCH] lint: Display result of checkers on stdout. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Apr 2020 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: me@tobias.gr, 40367@debbugs.gnu.org Cc: guix-patches-bounces+brice+lists=waegenei.re@gnu.org X-Debbugs-Original-To: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches X-Debbugs-Original-Cc: 40367@debbugs.gnu.org, Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.15857473072099 (code B ref -1); Wed, 01 Apr 2020 13:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Apr 2020 13:21:47 +0000 Received: from localhost ([127.0.0.1]:37588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJdJS-0000Xh-Vp for submit@debbugs.gnu.org; Wed, 01 Apr 2020 09:21:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:46114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJdJS-0000XV-4b for submit@debbugs.gnu.org; Wed, 01 Apr 2020 09:21:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37451) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJdJR-0007NX-4f for guix-patches@gnu.org; Wed, 01 Apr 2020 09:21:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJdJQ-0005rS-8f for guix-patches@gnu.org; Wed, 01 Apr 2020 09:21:45 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:43421) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJdJN-0005n8-Qj; Wed, 01 Apr 2020 09:21:41 -0400 Received: from webmail.gandi.net (webmail18.sd4.0x35.net [10.200.201.18]) (Authenticated sender: brice@waegenei.re) by relay2-d.mail.gandi.net (Postfix) with ESMTPA id 93E904000A; Wed, 1 Apr 2020 13:21:37 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Apr 2020 13:21:37 +0000 From: Brice Waegeneire In-Reply-To: <877dyzjstr.fsf@nckx> References: <20200401073835.5890-1-brice@waegenei.re> <877dyzjstr.fsf@nckx> Message-ID: X-Sender: brice@waegenei.re User-Agent: Roundcube Webmail/1.3.8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.194 X-Spam-Score: -0.0 (/) 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: -1.0 (-) Hello Tobias, On 2020-04-01 12:25, Tobias Geerinckx-Rice via Guix-patches via wrote: > It should still print *progress* messages (and any run-time warnings & > errors) to stderr, though: > > $ guix lint sl >toot > checking sl@5.02[cve]... > > $ guix lint sl >toot > guix lint: error: something bad happened > > This includes reverting to (isatty? (current-error-port)); stdout's > ttyness doesn't matter. > > Please also rebase your revisions onto current master (particularly > 57e12aa). I have take into account all of your suggestions in v2. Thanks for the review, - Brice From unknown Sun Jun 15 08:37:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40367] [PATCH] lint: Display result of checkers on stdout. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Apr 2020 09:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: me@tobias.gr, 40367@debbugs.gnu.org Cc: guix-patches-bounces+brice+lists=waegenei.re@gnu.org X-Debbugs-Original-To: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches X-Debbugs-Original-Cc: 40367@debbugs.gnu.org, Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.158745955028550 (code B ref -1); Tue, 21 Apr 2020 09:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Apr 2020 08:59:10 +0000 Received: from localhost ([127.0.0.1]:49042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQokI-0007QQ-8K for submit@debbugs.gnu.org; Tue, 21 Apr 2020 04:59:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:33754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQokE-0007QF-GQ for submit@debbugs.gnu.org; Tue, 21 Apr 2020 04:59:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58362) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQokD-0006e7-AT for guix-patches@gnu.org; Tue, 21 Apr 2020 04:59:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,BODY_SINGLE_WORD, RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQokD-0002Mr-2j for guix-patches@gnu.org; Tue, 21 Apr 2020 04:59:05 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:33595) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQokB-0002Cu-Dw; Tue, 21 Apr 2020 04:59:03 -0400 Received: from webmail.gandi.net (webmail18.sd4.0x35.net [10.200.201.18]) (Authenticated sender: brice@waegenei.re) by relay5-d.mail.gandi.net (Postfix) with ESMTPA id 46E781C0009; Tue, 21 Apr 2020 08:58:56 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 21 Apr 2020 08:58:56 +0000 From: Brice Waegeneire In-Reply-To: <877dyzjstr.fsf@nckx> References: <20200401073835.5890-1-brice@waegenei.re> <877dyzjstr.fsf@nckx> Message-ID: X-Sender: brice@waegenei.re User-Agent: Roundcube Webmail/1.3.8 Received-SPF: pass client-ip=217.70.183.197; envelope-from=brice@waegenei.re; helo=relay5-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/21 04:58:58 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 217.70.183.197 X-Spam-Score: -0.0 (/) 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: -1.0 (-) Ping? From unknown Sun Jun 15 08:37:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#40367] [PATCH v3] lint: Display result of checkers on stdout. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 May 2020 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40367 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40367@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159008814617071 (code B ref -1); Thu, 21 May 2020 19:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 May 2020 19:09:06 +0000 Received: from localhost ([127.0.0.1]:57296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbqZ0-0004RH-BH for submit@debbugs.gnu.org; Thu, 21 May 2020 15:09:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:58986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbqYl-0004Qg-S3 for submit@debbugs.gnu.org; Thu, 21 May 2020 15:09:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqYl-0005mt-NV for guix-patches@gnu.org; Thu, 21 May 2020 15:08:51 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48725) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqYj-0007TM-UJ for guix-patches@gnu.org; Thu, 21 May 2020 15:08:51 -0400 X-Originating-IP: 78.237.113.178 Received: from localhost (luy13-1-78-237-113-178.fbx.proxad.net [78.237.113.178]) (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 1728AE0002 for ; Thu, 21 May 2020 19:08:44 +0000 (UTC) From: Brice Waegeneire Date: Thu, 21 May 2020 21:08:38 +0200 Message-Id: <20200521190838.29736-1-brice@waegenei.re> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200401073835.5890-1-brice@waegenei.re> References: <20200401073835.5890-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.196; envelope-from=brice@waegenei.re; helo=relay4-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/21 15:08:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.0 (/) 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 (--) * guix/scripts/lint.scm (emit-warnings): Use 'current-output-port' instead of 'current-error-port'. --- This version remove an extra space and correctly indent the patch. guix/scripts/lint.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 97ffd57301..5445645b53 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2017, 2018 Efraim Flashner ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2019 Simon Tournier +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,11 +48,15 @@ ;; provided MESSAGE. (for-each (lambda (lint-warning) - (let ((package (lint-warning-package lint-warning)) - (loc (lint-warning-location lint-warning))) - (info loc (G_ "~a@~a: ~a~%") - (package-name package) (package-version package) - (lint-warning-message lint-warning)))) + (let* ((package (lint-warning-package lint-warning)) + (name (package-name package)) + (version (package-version package)) + (loc (lint-warning-location lint-warning)) + (message (lint-warning-message lint-warning))) + (parameterize + ((guix-warning-port (current-output-port))) + (info loc (G_ "~a@~a: ~a~%") + name version message)))) warnings)) (define* (run-checkers package checkers #:key store) -- 2.26.2 From unknown Sun Jun 15 08:37:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Brice Waegeneire Subject: bug#40367: closed (Re: [bug#40367] [PATCH v3] lint: Display result of checkers on stdout.) Message-ID: References: <87blfrhusb.fsf@cbaines.net> <20200401073835.5890-1-brice@waegenei.re> X-Gnu-PR-Message: they-closed 40367 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 40367@debbugs.gnu.org Date: Sat, 21 Nov 2020 10:25:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1605954302-2103-1" This is a multi-part message in MIME format... ------------=_1605954302-2103-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #40367: [PATCH] lint: Display result of checkers on stdout. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 40367@debbugs.gnu.org. --=20 40367: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D40367 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1605954302-2103-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 40367-done) by debbugs.gnu.org; 21 Nov 2020 10:24:42 +0000 Received: from localhost ([127.0.0.1]:44920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgQ4P-0000XK-O3 for submit@debbugs.gnu.org; Sat, 21 Nov 2020 05:24:41 -0500 Received: from mira.cbaines.net ([212.71.252.8]:49182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgQ4N-0000XC-At for 40367-done@debbugs.gnu.org; Sat, 21 Nov 2020 05:24:40 -0500 Received: from localhost (188.28.108.199.threembb.co.uk [188.28.108.199]) by mira.cbaines.net (Postfix) with ESMTPSA id A566127BBF6; Sat, 21 Nov 2020 10:24:38 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id a727b0a3; Sat, 21 Nov 2020 10:24:36 +0000 (UTC) References: <20200401073835.5890-1-brice@waegenei.re> <20200521190838.29736-1-brice@waegenei.re> User-agent: mu4e 1.4.13; emacs 27.1 From: Christopher Baines To: Brice Waegeneire Subject: Re: [bug#40367] [PATCH v3] lint: Display result of checkers on stdout. In-reply-to: <20200521190838.29736-1-brice@waegenei.re> Date: Sat, 21 Nov 2020 10:24:36 +0000 Message-ID: <87blfrhusb.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 40367-done Cc: 40367-done@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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Brice Waegeneire writes: > * guix/scripts/lint.scm (emit-warnings): Use 'current-output-port' > instead of 'current-error-port'. > --- > > This version remove an extra space and correctly indent the patch. > > guix/scripts/lint.scm | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm > index 97ffd57301..5445645b53 100644 > --- a/guix/scripts/lint.scm > +++ b/guix/scripts/lint.scm > @@ -10,6 +10,7 @@ > ;;; Copyright =C2=A9 2017, 2018 Efraim Flashner > ;;; Copyright =C2=A9 2018, 2019 Arun Isaac > ;;; Copyright =C2=A9 2019 Simon Tournier > +;;; Copyright =C2=A9 2020 Brice Waegeneire > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -47,11 +48,15 @@ > ;; provided MESSAGE. > (for-each > (lambda (lint-warning) > - (let ((package (lint-warning-package lint-warning)) > - (loc (lint-warning-location lint-warning))) > - (info loc (G_ "~a@~a: ~a~%") > - (package-name package) (package-version package) > - (lint-warning-message lint-warning)))) > + (let* ((package (lint-warning-package lint-warning)) > + (name (package-name package)) > + (version (package-version package)) > + (loc (lint-warning-location lint-warning)) > + (message (lint-warning-message lint-warning))) > + (parameterize > + ((guix-warning-port (current-output-port))) > + (info loc (G_ "~a@~a: ~a~%") > + name version message)))) > warnings)) >=20=20 > (define* (run-checkers package checkers #:key store) Thanks, and apologies in the delay in looking at this again. I've pushed it to master as becfa42ea79feb402fe6bc5922da2019ef021e88.q Thanks again, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+46uRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XdaeA//TQChYqjA1hDqIGgSLOSOH5KUWad5BjEb Q9b1Zcf1wQOVR0Dt05Rw/LRO5oBR7WRKLlWy5rGicSwCx2cmTiLONZ4n75MbMRsY ZiPHN7nI7WlYeIV5tjyOYvHtfhK7+eTA91bmhbQTceD3fNB3MJjrc92lUjKeacoy x5J3cto5wJy3D0WWW+YNR0DgNGakeNGfCagVsRftvmmv5yzk6FdrKW3dfQPJoN94 e5gwdvHR0HqJRPKvLdtzV5+AO/f47jb/ao+aPxnnB6jxVd+7XoSb9KEpJorQ3sYJ ZwGfsKuKHIG98JlAefsURYQPP6vOM3vlVzWpwK54/eNktcfBTyifsdiLQ4cT5sLb o44LWCab3vHaWH6BrDRGOSdqePAsBJUTBQORMU/qQ5pkBa81rIi73o6tVSGldtzM UUlLQ8uxIO9QBV7XhVbbTUgOhbJVYfwrHkKSoPNqSKasjfrwGA2LI5bx9f5z2zO2 +NGHESBZDPFCQGc/AKwlYarxnhcawfH6y1CUnQSTix988FO09lBtlGTcz1K2SwMO 6npVJo/ItokXX7OCQjip4qV1Jia81bnqPYkcZSFVVwMuZGk6HVUNKDxVjA6x7bC/ FKQtqLThPyVLbsgEA+Lx560cxmTxLG++KVPjYWXivt+d8aEp9gcbNR6uv/zlv5cQ n117n3J8W4o= =SPSa -----END PGP SIGNATURE----- --=-=-=-- ------------=_1605954302-2103-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 1 Apr 2020 07:39:02 +0000 Received: from localhost ([127.0.0.1]:37423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJXxm-0002Mk-FJ for submit@debbugs.gnu.org; Wed, 01 Apr 2020 03:39:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:41536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJXxk-0002MF-Dl for submit@debbugs.gnu.org; Wed, 01 Apr 2020 03:39:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJXxj-0008Kt-7j for guix-patches@gnu.org; Wed, 01 Apr 2020 03:39:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJXxh-00064a-Mg for guix-patches@gnu.org; Wed, 01 Apr 2020 03:38:58 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60531) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJXxh-0005xw-Gy for guix-patches@gnu.org; Wed, 01 Apr 2020 03:38:57 -0400 X-Originating-IP: 78.237.113.178 Received: from localhost (luy13-1-78-237-113-178.fbx.proxad.net [78.237.113.178]) (Authenticated sender: brice@waegenei.re) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 04A561C000B for ; Wed, 1 Apr 2020 07:38:53 +0000 (UTC) From: Brice Waegeneire To: guix-patches@gnu.org Subject: [PATCH] lint: Display result of checkers on stdout. Date: Wed, 1 Apr 2020 09:38:35 +0200 Message-Id: <20200401073835.5890-1-brice@waegenei.re> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.197 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit 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: -1.0 (-) * guix/scripts/lint.scm (run-checkers): Replace 'current-error-port' by 'current-output-port'. --- guix/scripts/lint.scm | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 8d08c484f5..87705ef6d5 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2017, 2018 Efraim Flashner ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2019 Simon Tournier +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,19 +56,21 @@ (define (run-checkers package checkers) "Run the given CHECKERS on PACKAGE." - (let ((tty? (isatty? (current-error-port)))) - (for-each (lambda (checker) - (when tty? - (format (current-error-port) "checking ~a@~a [~a]...\x1b[K\r" - (package-name package) (package-version package) - (lint-checker-name checker)) - (force-output (current-error-port))) - (emit-warnings - ((lint-checker-check checker) package))) - checkers) - (when tty? - (format (current-error-port) "\x1b[K") - (force-output (current-error-port))))) + (parameterize + ((guix-warning-port (current-output-port))) + (let ((tty? (isatty? (current-output-port)))) + (for-each (lambda (checker) + (when tty? + (format #t "checking ~a@~a [~a]...\x1b[K\r" + (package-name package) (package-version package) + (lint-checker-name checker)) + (force-output)) + (emit-warnings + ((lint-checker-check checker) package))) + checkers) + (when tty? + (format #t "\x1b[K") + (force-output))))) (define (list-checkers-and-exit checkers) ;; Print information about all available checkers and exit. -- 2.25.1 ------------=_1605954302-2103-1--