From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yBx+OFUgwmNF6gAAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 04:24:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4JZpOFUgwmOCrwAAauVa8A (envelope-from ) for ; Sat, 14 Jan 2023 04:24:05 +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 67822B339 for ; Sat, 14 Jan 2023 04:24:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGX8w-0003a2-34; Fri, 13 Jan 2023 22:23:42 -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 1pGX8u-0003Za-I4; Fri, 13 Jan 2023 22:23:40 -0500 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGX8s-0008JJ-RL; Fri, 13 Jan 2023 22:23:40 -0500 Received: by mail-qt1-x82b.google.com with SMTP id fd15so10747508qtb.9; Fri, 13 Jan 2023 19:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XUEGSHh8MeeU0leNlfsmLHXS4wq+Qb6TmNkAYt3Zz8M=; b=Jq5fRPER62jtmlQMsZnNQoYd9qLaD+ItV/fFpzKkYnzd0jkaAGCi+OHRMjcrQDlQBR mis2+RWvghv//Pz8BgWUqPfyOgK9wN6l3N4s7tYVyHuchY+hhDo91sS6mvtfwtTM4UOh 9X4ECv+0xcT6iYJ6852x9CMobqvooFMNxt9BgHWnNvEhVrx1Y1lXlzaMWXVFf32f0QcH EJ08bOxONV25V/WiADD+bnEPSPEBegsfWeQQT+sGD0NmI6uLahP6IlG5ine7IDVAGfaX tg2y+hpstFOy5b4QdyUO5/5+q651nMgN+Y2H549nPOm/CakeeGwElSWEKE2Bo6sAjh7X ssvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XUEGSHh8MeeU0leNlfsmLHXS4wq+Qb6TmNkAYt3Zz8M=; b=u/m+oLY/7rOYo5n6r/i3QLBPSkXR/8Md8egHaHi7527QDH7Gi4K4JSZ5QBDk9t5PiM ybNvKxpBOFfhxfhxuiDhBX3EGyU2BCbC+9bMu2yHu8fQHMmDK8NpOmUXNSnEZJReTd8C 9DV57jr4ls3GmZGJ0WXiEW0+GOUm7Ey8acNMBE18JMgPDnpsPG/4u1fYsrYa0jUdvAiV n9z1L8X+2p7Z47dJjXm8NfaCTaj1ySOuKeSVNekpKSon+FXX7oqglE+TDOD4s+4mFdji G44prOtdmL9ZlSM/Wr6BHfQBPoHv2DQvOQ9D95VNtG82l6dIW8l+NcuQ0KHhIh63uFiE uqXA== X-Gm-Message-State: AFqh2kqavK0y+O38SyX1hoV5/GPmYDQdR7omSmteZ6VeCEeSjrfUiH2p zn0IXlqHmDqToDWH69T7reYz8aVBT/Ghxv2S X-Google-Smtp-Source: AMrXdXvDjJfaNhLxgkJjKfoKlat4lNRTx+Ckgmgw2RRESHc1AwSOUzdqOqaWFKpcBXgUisS9V8YJJA== X-Received: by 2002:ac8:5c8a:0:b0:3ab:a3d9:c5be with SMTP id r10-20020ac85c8a000000b003aba3d9c5bemr109003387qta.23.1673666617256; Fri, 13 Jan 2023 19:23:37 -0800 (PST) Received: from hurd (dsl-10-149-10.b2b2c.ca. [72.10.149.10]) by smtp.gmail.com with ESMTPSA id q22-20020a05620a2a5600b0070638ad5986sm248672qkp.85.2023.01.13.19.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 19:23:36 -0800 (PST) From: Maxim Cournoyer To: "info-guix@gnu.org mailing list" Cc: guix-devel Subject: Proposed (guix platforms) lookup procedures API change Date: Fri, 13 Jan 2023 22:23:35 -0500 Message-ID: <87fscder48.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673666645; a=rsa-sha256; cv=none; b=X3JpTc3y91xNFvAq2OO+s3zNfdBi2K3APUOret09aCoHMXDnUENsKu9D3kZMvLbj0YzTfk miHRZWDosv2WdICWKT2Sebu+MUHf8M9Ef7ki26+YmSEPIWsigd5CNaN9RutjkQI0LuJOPR 4lhI/a2r6ysGp2YqJlYnKiFKEVOKpYAaWWwh+mzm3AoY92GJMvmtJAJRfbARjCBFFiS3iy iFscA5rCYbyghyAS6YqBc6mICNIvpJQpUKBxQqQLoSyJB4RsfmQSmnTDpRbeYLRWSTVejG CCDzUZTkm3BLvCnu4j0FjFhbeUwH7UtddcHen62gSqdpcf2FDmweS8uBVLz4Lg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jq5fRPER; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673666645; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=XUEGSHh8MeeU0leNlfsmLHXS4wq+Qb6TmNkAYt3Zz8M=; b=ogL0R4dky8ho31ceE03DIv2CTXrueYSJ+/JHgHqfJnNQzP9WLHOLRe3Y/g7oqM9gITBOIV I4xDbYmo/uP8yTbdH49PfjM/Egfkr97U0haY9U4uLWSNcfHpBk6ew89l6Tn4Em8FLsXAn9 sxurA7aVVUPcL0UGzR7dRMV0wvV3WwW624pzDD9VkBepwiGvf8cbjHVLp9D7NJi4NWAOv+ VCv+Yaejcu4VDRPUsZY1Vpz6vlX56Egz/+VewGqSElX4Z2j20Xd8mShWFxqOih5IXmguHT lpYoARc5N8rBmEpScyu9a/IEQuldLYjJVEC+083a4tV2LFMg+k9fxo/JEFWskA== X-Migadu-Spam-Score: -4.75 X-Spam-Score: -4.75 X-Migadu-Queue-Id: 67822B339 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jq5fRPER; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-TUID: FP79Bd56zciB Hello, There is currently a proposed change [0] to modify the behavior of the LOOKUP-PLATFORM-BY-SYSTEM, LOOKUP-PLATFORM-BY-TARGET and LOOKUP-PLATFORM-BY-TARGET-OR-SYSTEM public procedures from (guix platforms) that would have them return an exception instead of #f when no platform could be found. [0] https://issues.guix.gnu.org/60802 This is motivated so that a clearer error can be produced when these procedures are used deep in the following reproducer: --8<---------------cut here---------------start------------->8--- (use-modules (guix packages) (gnu packages cross-base)) (define linux-libre-headers-cross-mips64el-linux-gnuabi64 (cross-kernel-headers "mips64el-linux-gnuabi64")) (package-arguments linux-libre-headers-cross-mips64el-linux-gnuabi64) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure struct-vtable: Wrong type argument in position 1 (expecting st= ruct): #f Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guix-user) [1]> ,bt In gnu/packages/cross-base.scm: 388:33 1 (loop (#:phases (modify-phases %standard-phases (delete (quote= configure)) (# (=E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) --8<---------------cut here---------------end--------------->8--- With the change installed, the backtrace now reads as: --8<---------------cut here---------------start------------->8--- ice-9/boot-9.scm:1685:16: In procedure raise-exception: ERROR: 1. &platform-not-found-error Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guix-user) [1]> ,bt In gnu/packages/cross-base.scm: 383:15 3 (arguments #) In gnu/packages/linux.scm: 693:27 2 (arguments #) In guix/platform.scm: 130:6 1 (lookup-platform-by-target-or-system "x86_64-linux") In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) --8<---------------cut here---------------end--------------->8--- which more directly communicates the source of the problem. For more information, see the issue that motivated it: https://issues.guix.gnu.org/60786 --=20 Thanks, Maxim