From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 ANKZNHfKxWP/GAEAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 23:06:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8MiUNHfKxWNdHwAA9RJhRA (envelope-from ) for ; Mon, 16 Jan 2023 23:06:47 +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 9473F39D2D for ; Mon, 16 Jan 2023 23:06:47 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHXY2-00047W-PQ; Mon, 16 Jan 2023 17:01:47 -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 1pHXVU-00083D-Te for guix-devel@gnu.org; Mon, 16 Jan 2023 16:59:10 -0500 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHXVT-0003mS-2X; Mon, 16 Jan 2023 16:59:08 -0500 Received: by mail-qv1-xf2a.google.com with SMTP id h10so20401225qvq.7; Mon, 16 Jan 2023 13:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=adXOeUW6fl7vMEYbqPGLapwqiu1lCZtPHBnjlLT7whQ=; b=AEDxZoy/J2AqGWagqw/clBO+a1qy+2bCEi7vnkCHXNdzy4sOb1yvKr01U8NgcRtjim VQgbDmEJxvLYf0H3d5kcb9UV+a0Sy6eDNlLNrqg+Spp6ObWXXOLnONje51udc2QnkdQd 9WgBmgkpJqyOmM69x7PM+GjBTe/orUz3BkXO58B9xsoWYijlw9r2P3/GidV9FYZOW91y 8Ed0elXMlWGO8ZLRvfclremR970Fn6dasks2md1hRbYQ7ylo3UDce3z79Twrt1PLyEl4 4Uqp3wELDCtphRCzo/Pi250c8KQGRC46Ccsfcp24O0LNLVzLNHHQDy5C/O4TdccxWPeo sbNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=adXOeUW6fl7vMEYbqPGLapwqiu1lCZtPHBnjlLT7whQ=; b=NICpc9QPjMLYP08gMUmeohb6McwsXvIVIGsVRAS4XoXOPS1M6gwtG9gdKCWroUao+7 Azt2ChtiOj1zl35CKPlOxsXYdITNtcgRKcF5vuhZ/csANKU5y4mGM4j+Pnm7aSH0yC0A xTFULG2Ex9+fGpzfBJ2NpzH8SWHqFbhAs39PfKJSp039KfaG1boK64lVEek9mwVKRCVA uWrsW3+qt1BICf1xlOInqzlud7Wy4EQHV2sAjMnLd+D/5pCuJTRBBA/4lBpSj4ibrmG7 YPXhBM4QJifoCDaUKe1I49laCCEdQJfRSrtYMkmcL6GPX0GGNg7b8sgYAKS7hWXETmNn TKzw== X-Gm-Message-State: AFqh2krs9TPu3R7bwvFSGloF3i3tBvs3Jh9OqWlIZFZXAtls/QpHIlM6 gx4Qco4s+yySSEMURM2p3ek= X-Google-Smtp-Source: AMrXdXsN3Xjq+ZvutQDuQrq3MrIdaUStDh4BqjMF/m/MLo3kcyECbGWiuK43W9PE/QJsusEF174xBQ== X-Received: by 2002:a05:6214:5e12:b0:532:2fd0:593b with SMTP id li18-20020a0562145e1200b005322fd0593bmr1648962qvb.21.1673906344667; Mon, 16 Jan 2023 13:59:04 -0800 (PST) Received: from hurd (dsl-10-130-209.b2b2c.ca. [72.10.130.209]) by smtp.gmail.com with ESMTPSA id w6-20020a05620a424600b00705be892191sm14494322qko.56.2023.01.16.13.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 13:59:04 -0800 (PST) From: Maxim Cournoyer To: zimoun Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , Guix Devel , Tobias Geerinckx-Rice , Josselin Poiret , Mathieu Othacehe , Christopher Baines , Ricardo Wurmus Subject: Re: Exception: srfi-35 vs (ice-9 exceptions (was Re: [bug#60802] [PATCH v2 1/2] platforms: Raise an exception when no suitable platform is found.) References: <20230114041903.7121-2-maxim.cournoyer@gmail.com> <87o7r19ocn.fsf@gnu.org> <87mt6i5q4q.fsf@gmail.com> <864jsq8ch1.fsf@gmail.com> Date: Mon, 16 Jan 2023 16:59:02 -0500 In-Reply-To: <864jsq8ch1.fsf@gmail.com> (zimoun's message of "Mon, 16 Jan 2023 21:13:14 +0100") Message-ID: <87r0vu2lax.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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::f2a; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf2a.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=1673906807; a=rsa-sha256; cv=none; b=Sz3iO4cj6LyAZZGbd5ldc8VW4fWs7RgHWBUh1R/EZAsU25OpLDJXMFc6Og91o/Wc63RbhW GJbnXG/ooUiJ+79pftaYH1Il8JGdKN+3bsG+NDJP+Z+FeT8EjU/WN8x1Q214cRy9EV2G8T cBWbA4y79+5ZKctvceoIl1hyKGjrwMkpK9f1rKniam+4uVR81j9AvKJJ+JvIa9zTUHRCDN yT3NuhuRCUs9PWyeDBxnhsDGf5p8/bUEHUZ9VTvp7lwvj3Px4B7fx9vEAzrovqaiGpLuZu Xgu5CxGnfEfeRdn7SSjbW/H9Dp5SKUCuyeVZITP5bvkEyKea6PjrMZkigI48SQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="AEDxZoy/"; 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=1673906807; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=adXOeUW6fl7vMEYbqPGLapwqiu1lCZtPHBnjlLT7whQ=; b=nrpTbWwdZV3BgbXvyxe6p2NSK1fa4cJz6MkEMQjJETTLFQdLpVlI5U9b6C4u+1eWz0xn3r 9USk2xrajV/xCYLDyKCYV6ykj8PXdzDLNLVDZGGBWcGcmwqg+bttLKAPp2uHhkctNcX052 bB0+fOvFQWWcNJuMeQhc/ju0eZ6g8zvPbIq0/zwNLx+L7n1FfvAM0DMA+4He6I+DwONB4A nlNEAxZgx2OTk2sWUgzziBVM4o/J4aVYIKIHZEZY5Ho15EUxf2C65hCRxA2bZTcOCF4FkC gE2TrNYq+MAadgHCLHjbqBxcY5YeoOtRE4r71Mw6DckBYNw6dTpfvFCPcoLwZQ== X-Migadu-Spam-Score: -3.28 X-Spam-Score: -3.28 X-Migadu-Queue-Id: 9473F39D2D X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="AEDxZoy/"; 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: cEHvV2vaS5wf Hi Simon, zimoun writes: > Hi Maxim, > > On Mon, 16 Jan 2023 at 12:46, Maxim Cournoyer = wrote: > >>> So far the we use (srfi srfi-35) exclusively to define condition types; >>> I think we should do the same here, for consistency. >> >> Could we instead start migrating away from srfi-35 to (ice-9 >> exceptions), which is the new native way to use exceptions in Guile? > > Well, I think this should be discussed separately. Therefore, > -60802@debbugs.gnu.org and +guix-devel. :-) > > >> I >> think it'd be nicer to use it in the future, to avoid newcomers being >> confusing about the 3 or 4 ways to manage exceptions in Guile >> (recommended read on the topic: >> https://vijaymarupudi.com/blog/2022-02-13-error-handling-in-guile.html). > > In Guile maybe several but only one in Guix: (srfi srfi-35). :-) There are also many old-school catch/throw references too, so that makes it two! These can technically be handled using the new style mechanism too (search for "does-not-exist.txt" in [0]), although that may be too verbose to be an improvement. [0] https://vijaymarupudi.com/blog/2022-02-13-error-handling-in-guile.html >> Migrating the whole code at once doesn't seem a good idea, so gradually >> transitioning (such as using (ice-9 exceptions) for new code) appears a >> good idea to me, if we agree on the direction! > > Just to note that all Guix is using (srfi srfi-35); except, > > 1 candidates: > ./guix/build/minetest-build-system.scm:26: #:use-module (ice-9 exception= s) > > Therefore, this plan needs to be a bit cooked, otherwise it will become > quickly a big mess with 2 ways for managing exceptions =E2=80=93 and peop= le, at > least me, will be confused to pick the correct one depending on the > module. If we agree on the direction (gradually moving to (ice-9 exceptions)) and that it provides benefits, I think it could be OK to allow for it to happen gradually (in new or revisited code at least, say), similar to the approach we're pursuing for the removal of packages and move to gexps for the package definitions. Otherwise the scope for the change is much higher, and it may never materialize. > Well, if such migration makes sense (I do not know?), from my point of > view, the migration of the whole code in a short period of time appears > to me the best; probably with a dedicated WIP branch. One benefit would be to reduce the friction in using exceptions in Guile, which is already higher than in other languages in my opinion (right now you have to import (srfi srfi-35) and typically (srfi srfi-34) too just to get started). Having just (ice-9 exceptions) to deal with would already be an improvement. I think technically they are equivalent (probably the same or very similar) under the hood. --=20 Thanks, Maxim