From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id ELFNGXZ1ZGc7lgAA62LTzQ:P1 (envelope-from ) for ; Thu, 19 Dec 2024 19:35:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id ELFNGXZ1ZGc7lgAA62LTzQ (envelope-from ) for ; Thu, 19 Dec 2024 20:35:18 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=dHOaSM6w; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="fXB7C/G8"; 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=1734636918; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=o4flfIiRfJVwIQlZrnND0GZVDOuzxs31Gp2MQxP5uyA=; b=OnNfSZ/hPWa8qFn87WmMJv6XR1FlTU3hIFA9nB7Sa3Qq0g33Y+xQXWcYh5b8DwaOSWf2Lq q4IdFJGiYAvTkawczsIraf9P+DuVTom+rthTZGL5Y0WoqjnJZHpaubQ0cbvg5NJN6TUyWy ZO7XImnTuZeBp6aQEfhaPv4Kjb4BFdf8zxN7bXzGno3+pTekMgutojP/4o5DtrWDWgrVCG 4F6aNFBoo7PYUKza2S+U/VOqJIJEVyyRxtWmPGr9DGmjQd/64NwRrpIUMTQPog6xQNkyG/ q+NzS7KLgRSLq18kP4G/ioeX650GNYo0L9NYdaHJ3oMC3cwz7+/2PvDinan08Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=dHOaSM6w; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="fXB7C/G8"; 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=1734636918; a=rsa-sha256; cv=none; b=aDEr+eIOZgDH4MY09go6PfC0mJzlrR90GgEx2j137ZjywAc26M2Sh5SpkGx6k6a8Z+j7IB zw4xThBvGirsfh7WxfXLCV7Ed8+Jv+PXIjXrTW2zfBsvG0b91nN8vwG/GuErw9NmkaaQCq cBnQ95iikacMF87omukUXHJ3MifrXJqptVuYCLqYF/kABGXsJK6hc/vxbkD2zwoLgmW7HW VNjDQWUxuea/Zmqn5TR1/1hCoOXLj3/h3xnph/Y9uwwLLGCSE2CZ4cdwj7XPLdUDpKwMDu WVLafTpI0/Qg6o0imaLXq+sKTRz0Y743gF4pW8uvpqND9NrQPxEIJfX5XihRyw== 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 3C62F7A844 for ; Thu, 19 Dec 2024 20:35:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOMIj-0003Ga-AN; Thu, 19 Dec 2024 14:35:14 -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 1tOMIZ-0003A9-CT for guix-patches@gnu.org; Thu, 19 Dec 2024 14:35:03 -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 1tOMIY-0002zL-VQ; Thu, 19 Dec 2024 14:35:03 -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:References:In-Reply-To:Date:From:To:Subject; bh=o4flfIiRfJVwIQlZrnND0GZVDOuzxs31Gp2MQxP5uyA=; b=dHOaSM6w8LMTtkRHWnV79odK96xXX5dpEkv6eaV3l1mGGfVibkK8ORih5pNB8qVZA7eV7WrWFSi7umO5WNwWduk2e6wqEU/ToinkD7+GYz09YRZHDePP+iqpvMBEh10efWa+/NlC5bglonu6N5z7+7d7a+356Pf7rEtrfL2C/03Z2CnQq9AthVMH+/+zxgVla3x95hEpZEIRrtPAeHu3X4eO6cJ5wVj3wSgmKwNDkPrR3caXyZ6WsMYV4n19YswEpcy26PuYZjNArbNkT4CaiP9hRqUjEbXTIHNCZqjHPxOb8SytuAlYUflPl7IfGLttWH38z8MBXk/omI55BdGgeQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOMIY-0000Vf-QT; Thu, 19 Dec 2024 14:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74979] [PATCH 4/4] scripts: style: Warn about unmatched package definitions. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Thu, 19 Dec 2024 19:35: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: 74979@debbugs.gnu.org Cc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74979-submit@debbugs.gnu.org id=B74979.17346368471856 (code B ref 74979); Thu, 19 Dec 2024 19:35:02 +0000 Received: (at 74979) by debbugs.gnu.org; 19 Dec 2024 19:34:07 +0000 Received: from localhost ([127.0.0.1]:40160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOMHf-0000Tn-Eg for submit@debbugs.gnu.org; Thu, 19 Dec 2024 14:34:07 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:34221 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOMHX-0000SA-L6 for 74979@debbugs.gnu.org; Thu, 19 Dec 2024 14:34:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1734636829; 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=o4flfIiRfJVwIQlZrnND0GZVDOuzxs31Gp2MQxP5uyA=; b=fXB7C/G8dNeu4IkQyYgTMZKzDdkrkP86on9vOJ5696mNJCBirXVZknat6Wrk+ZVaSJbOR4 a7rcHOr6W6NePz+hQ0e1IyyYTnIClfXhweFc+5DCyfHM8YTMupNM/fQX6eo93tI/qln/ER Xf7nrStUzJBUBVeS702Nu3IwbmPhISegiuF3p8wpdpkEMTFD2An1chFEhp+DTPF/d0fWQT FlfyC8YLo60dZkbrg6LoR0dTCHJn3gLShZvPMfIQPa2Zt7FGC8w89TRiUdE8OtNdcDmfnv 1PNGkQ2MFMOrJAqtYr3wY3DD4KWOjsHXhSRrnsv4/LEWz3eenNj/28/1i0U+iA== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id c56d8d84 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <74979@debbugs.gnu.org>; Thu, 19 Dec 2024 19:33:49 +0000 (UTC) Date: Thu, 19 Dec 2024 20:33:07 +0100 Message-ID: <6986ddba422272423a928f2d0b40cd8aeb8752ea.1734636205.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via 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-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 2.27 X-Spam-Score: 2.27 X-Migadu-Queue-Id: 3C62F7A844 X-TUID: d0PXzsH+RskS * guix/scripts/style.scm (order-packages): Warn. Change-Id: Iddbf979ee9ee5ed1ebada63776a390db024154fa --- guix/scripts/style.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm index 4801529f7e..81fe1141e2 100644 --- a/guix/scripts/style.scm +++ b/guix/scripts/style.scm @@ -508,9 +508,15 @@ (define (order-packages lst) (((or 'package 'package/inherit) fields ...) (let ((name (and=> (assoc-ref fields 'name) first)) (version (and=> (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))))) (define (package>? lst1 lst2) (let-values (((name1 version1) (package-fields lst1)) -- 2.45.2