From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2NguG6y9wmMzSAAAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 15:35:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cGTjGqy9wmMwsAAAauVa8A (envelope-from ) for ; Sat, 14 Jan 2023 15:35:24 +0100 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 2F3322A8DF for ; Sat, 14 Jan 2023 15:35:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGhck-0003HP-Cg; Sat, 14 Jan 2023 09:35:10 -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 1pGhcd-0003FE-54 for guix-patches@gnu.org; Sat, 14 Jan 2023 09:35:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGhcc-0005s7-Sb for guix-patches@gnu.org; Sat, 14 Jan 2023 09:35:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGhcc-0007c6-Fi for guix-patches@gnu.org; Sat, 14 Jan 2023 09:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60802] [PATCH v2 1/2] platforms: Raise an exception when no suitable platform is found. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 14 Jan 2023 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60802 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: Tobias Geerinckx-Rice , Josselin Poiret , 60802@debbugs.gnu.org, Simon Tournier , Mathieu Othacehe , Christopher Baines , Ricardo Wurmus Received: via spool by 60802-submit@debbugs.gnu.org id=B60802.167370689929248 (code B ref 60802); Sat, 14 Jan 2023 14:35:02 +0000 Received: (at 60802) by debbugs.gnu.org; 14 Jan 2023 14:34:59 +0000 Received: from localhost ([127.0.0.1]:53707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGhcZ-0007bf-9I for submit@debbugs.gnu.org; Sat, 14 Jan 2023 09:34:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGhcX-0007bG-0X for 60802@debbugs.gnu.org; Sat, 14 Jan 2023 09:34:57 -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 1pGhcR-0005r5-PQ; Sat, 14 Jan 2023 09:34:51 -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=he1VkTrY8LNLY3bO7BMpExAKGOWMz9B7A5UQ7wdRpxs=; b=D9Q+JeYDM3SlmxXUz5Yr zw+WazEOPL18srxqODSLaUJIg/cyYArTx0HBSnd7t87IqO1HYA9iY2F96Pcfm3SnJ43D2cDowPSZZ fC0vctgTT//qF9K5rk+CA87ot9bqwkarh3OvsuGvMXvwCCCEzTfqiT3uJeUfanwbmz1smkY+h4tkt JJtSYe+e6T6ysCIyQXPJq6JhWMDWtLN2kLvho9wC/g4ieTR2SSvAwfvSAR3Z8yB8M8ukqb44eORAr QMWJ9jnbVb0vRwgz2MRUnfNkpSNRP7goDCJYcKjbex/GT7TWlHo0g9FDLghlkc4CavmdwmAZMz8eZ 1uuS44DtPdMx4g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGhcR-0001V8-AF; Sat, 14 Jan 2023 09:34:51 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <20230114041903.7121-2-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Fri, 13 Jan 2023 23:19:02 -0500") References: <20230114041903.7121-2-maxim.cournoyer@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 =?UTF-8?Q?Niv=C3=B4se?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Chat 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, 14 Jan 2023 15:34:49 +0100 Message-ID: <87mt6l9oc6.fsf@gnu.org> 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 ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=D9Q+JeYD; 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=1673706924; a=rsa-sha256; cv=none; b=NDfTN5fefzkM/sNtPhAB/stV4Z0a4iE/1NzQFUoyVDLtgjqT3K2YCRPH0AmmeRa2x0U93s AROwtEQKGxlAC5QqsgioOjXmQVxvd6u0H8nLzqtBeA0+UZL/KvppLb4xB8G07UdspKbM07 u9R64pgbpfPJ92aL0yvGppsFk8ISYSVSEbbBFzH0tahxYvuOcDYkfoV65bOKJR/q35mWms 5kI24PuMaeZiseNDAoPOuwTBNogQjhta//YkW8XBVLtFa3E2Dzi2wmLurXmjVOuodPApi8 5DDlCpIQq3E2l10aiuww2WDsXf/NxIc0ZIRZJ7JxrMkYPYL3TUKIeAS8t0jByA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673706924; 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=he1VkTrY8LNLY3bO7BMpExAKGOWMz9B7A5UQ7wdRpxs=; b=XPsSu2YLDnHGrm/8/xBsPlngkTjhDtkIqL/9RuInN4CKAu51tILInRLgsE0QKIoKn5+u7M a9xIN5XZIZ8ckyZDcVfLawzewxqwIvE4ZpB14WCF+VJbpNxf7BYw8+PzxdIePnINBKMd5q Oy+aSG5K/7ktvpsv2KKS6+DA5THX/lu2nn0wUQm7zzozCXfBCoObhO7Pz4mHDMOpqe52Qf /eKRifwbbVvidc79auf3hhYOG4sgWT3tqJIJzdMkd0La1/mrmPe3+LU3KyIikXCIz5J2wk M/9gXr3EON/GCiW+JkeRaIPmvXcEceHQtDSc3LjUnI7UjGuT4rqUjC8eCbVSxQ== X-Migadu-Queue-Id: 2F3322A8DF X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=D9Q+JeYD; 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 X-Migadu-Spam-Score: -3.31 X-Spam-Score: -3.31 X-TUID: l/8P7tKNVbVy Hi, Maxim Cournoyer skribis: > This was motivated by #60786, which produced a cryptic, hard to understand > backtrace. > > * guix/platform.scm (&platform-not-found-error): New exception type. > (make-platform-not-found-error): New exception constructor. > (platform-not-found-error?): New predicate. > (false-if-platform-not-found): New syntax. > (lookup-platform-by-system): Raise an exception when no platform is found. > Update documentation. > (lookup-platform-by-target): Likewise. > (lookup-platform-by-target-or-system): Likewise, and guard lookup calls w= ith > false-if-platform-not-found. Sounds like a good idea! > +++ b/guix/platform.scm > @@ -21,6 +21,7 @@ (define-module (guix platform) > #:use-module (guix memoization) > #:use-module (guix records) > #:use-module (guix ui) > + #:use-module (ice-9 exceptions) So far the we use (srfi srfi-35) exclusively to define condition types; I think we should do the same here, for consistency. > + &platform-not-found-error > + make-platform-not-found-error The constructor doesn=E2=80=99t need to be exposed. > +;;; > +;;; Exceptions. > +;;; > +(define-exception-type &platform-not-found-error &error > + make-platform-not-found-error platform-not-found-error?) So this would become (define-condition-type =E2=80=A6). Otherwise LGTM, thanks! Ludo=E2=80=99.