From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cCflCqqeaWcwaQAA62LTzQ:P1 (envelope-from ) for ; Mon, 23 Dec 2024 17:32:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cCflCqqeaWcwaQAA62LTzQ (envelope-from ) for ; Mon, 23 Dec 2024 18:32:26 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=T1xsczpS; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QgOUi0m5; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734975145; 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=x2voA1vo7K1S9XA6903IpVhKYU07mDtkw1Wv5/vBs90=; b=E1WUnXXRbKHz8Jpme68RrcOO2m6S7q6lcm5o5CZJokUKlMjPygIIGyiuREgtI3xnw8dKz7 vWTw3EIcw4ghEUh1+XcJDzC1Gi4UvYlSCVQTE66z9GXxIrmAJ7vK5LBHWqEDGc71UwPLwo WrgqhkVeccx/qDN024ANiRhgx2jANG2ISnA5d1oX36Qxb3yvexlyMpJ07j9J4Q2bzD3PAp IdDf2YCWZ3mkzNfOKEWYF+N6aQoXHgJDyJsU95dhuzmSPlxKlqMIkhTQOwVfberzncMUmh NFvKYn2f+6/WqO9HWuwqaOOtNWQOJ+200qUoMjo+cvmtXTFKwZLM7LUNzAESSw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=T1xsczpS; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QgOUi0m5; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734975145; a=rsa-sha256; cv=none; b=cV2DA11sIBdXOrPhvdx9yB4leAiPlzNMSNUQTjmtMlP0EUG9VpJzVIU4Mfg+vbL+9tGA6Q qosEoB7RIrNX3Fxxc9618vwnq6iDd+74k3vydMGs22bM1hN68Gn0qR+081qEsvm1d1eebh 5vsHA7+xgEaDkfrM2hBueg467OiCMmJSc6xZ4gRn4XR3v6ezHINsYJ3CK5ENYW0BJBfADw UdVdtl8sG+986LdTRIucwk31r75r6prhRdnVPdoEAnrdqak1/g1NvQr40KvHBiVmtIuNIg WxnmBgmnZJ8Gd63mjo2GZhjyou9nnfVCbVRKFoyh1qBXUSBl9y1fJ6G31NY0DQ== 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 A2F659760E for ; Mon, 23 Dec 2024 18:32:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPmHw-0006Ax-19; Mon, 23 Dec 2024 12:32:16 -0500 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 1tPmHi-00066H-UV for guix-patches@gnu.org; Mon, 23 Dec 2024 12:32:06 -0500 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 1tPmHi-0003it-IG for guix-patches@gnu.org; Mon, 23 Dec 2024 12:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=x2voA1vo7K1S9XA6903IpVhKYU07mDtkw1Wv5/vBs90=; b=T1xsczpScc/z1QHLtMGDWXYSCggLfhqFFuSWbh4PO4PdBzD1BWtpq0C5vzTizXqS1nnXFbBsvbVVMtBeJ7QcfI2kTfyZZ4Wax1odNLsZdsR0J2Zcx9x+k8GRC+AGvOwAEoVtDxZPtEYUkoWH0ZMHTt77hKS/XUL1UBJF54M6Tdlq6XNbx1125yE3zuLQJ/PP/kOA7bo0KbG14191YZWiW6GHZ0o9PcO1CD46dKbY9dbYg5iuVj5HyixYlDJh5Q+9EABOe3Cx5r2706B95s0H/dr4x63jmx5ihO8Rs2ykJkBZSZNKCUbJ8O3dQtpz+M8lVgJYvkdcD9BY45rB8FsPXA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tPmHi-0000Y1-Ck for guix-patches@gnu.org; Mon, 23 Dec 2024 12:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74979] [PATCH 0/4] scripts: style: Sort more kinds of package Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Dec 2024 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74979 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Herman Rimm Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , 74979@debbugs.gnu.org, Christopher Baines Received: via spool by 74979-submit@debbugs.gnu.org id=B74979.17349750712028 (code B ref 74979); Mon, 23 Dec 2024 17:32:02 +0000 Received: (at 74979) by debbugs.gnu.org; 23 Dec 2024 17:31:11 +0000 Received: from localhost ([127.0.0.1]:55961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPmGs-0000Wd-NI for submit@debbugs.gnu.org; Mon, 23 Dec 2024 12:31:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPmGq-0000WB-7X for 74979@debbugs.gnu.org; Mon, 23 Dec 2024 12:31:09 -0500 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 1tPmEc-0003GW-0s; Mon, 23 Dec 2024 12:28:50 -0500 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=x2voA1vo7K1S9XA6903IpVhKYU07mDtkw1Wv5/vBs90=; b=QgOUi0m54xv5cGMi36N/ VHkVKKcOJPHSaRYdM/U5mJUs2QAwr1kxt52vdfQ+Ef9nt/o8iN9uQA+fwzoF5XjJOxwhWhlyvJLTC ABijsJF/hGWDcnV5h3auOjjK3PQFVsaPHFm9FMmDuyNAWuIw9rDHArBtWXVTBKPnSqu575hmRB9zr 6yV+9c6KkazktiCk1OUbx0B7RAzqKwGNWbedDlSv3UY6W+wUVQtNpHyvl/OP9QA5dFikHPKaeeKI8 9FPBjIMODFzm8zdfscWK2BnKj9FMQ1k3f9KLOtdbc4b0cw+Ou0mtd4R+gznluBQu5VUyYaijcBKdP 2IRJ4W3aVdTUjg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Herman Rimm's message of "Thu, 19 Dec 2024 20:31:12 +0100") References: Date: Mon, 23 Dec 2024 18:28:39 +0100 Message-ID: <87ttau8g1k.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-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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.71 X-Spam-Score: -6.71 X-Migadu-Queue-Id: A2F659760E X-Migadu-Scanner: mx10.migadu.com X-TUID: ZgQc4Ks0SEph Hi Herman, Herman Rimm skribis: > The warnings added in [PATCH 4/4] are emitted multiple times. How > should I prevent that? Or should I put them behind a --verbose option? Not sure, do you have an example on how to trigger it? > +++ b/guix/scripts/style.scm > @@ -508,9 +508,15 @@ (define (order-packages lst) > (((or 'package 'package/inherit) fields ...) > (let ((name (and=3D> (assoc-ref fields 'name) first)) > (version (and=3D> (assoc-ref fields 'version) first))) > + (if (and name version) > + (unless (and (string? name) (string? version)) > + (warning (G_ "non-string name/version for ~a~%") pkg)) > + (warning (G_ "package fields not found for ~a~%") pkg)) > (values name version))) > - (_ (and (values #f #f))))) > - (_ (and (values #f #f))))) > + (_ (and (warning (G_ "package record missing for ~a~%") pkg) > + (values #f #f))))) > + (_ (and (info (G_ "not sorting top-level S-exp.: ~a~%") pkg) > + (values #f #f))))) You shouldn=E2=80=99t rely on the return value of =E2=80=98info=E2=80=99, = =E2=80=98warning=E2=80=99, etc.: they=E2=80=99re not specified (that=E2=80=99s generally the case for proced= ures called for side effects only). So I=E2=80=99d recommend: (begin (info =E2=80=A6) (values #f #f)) (You don=E2=80=99t even need =E2=80=98begin=E2=80=99 in this context.) The other patches LGTM, though perhaps =E2=80=98tests/guix-style.sh=E2=80= =99 could be augmented a bit to cover the new cases? Thanks, Ludo=E2=80=99.