From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id CKg/Ad7QfmRt3AAASxT56A (envelope-from ) for ; Tue, 06 Jun 2023 08:23:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AAx7AN7QfmRLpwAAG6o9tA (envelope-from ) for ; Tue, 06 Jun 2023 08:23:26 +0200 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 A6B2A284C0 for ; Tue, 6 Jun 2023 08:23:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Q5x-0006JB-3y; Tue, 06 Jun 2023 02:23:05 -0400 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 1q6Q5u-0006Ih-2T for guix-patches@gnu.org; Tue, 06 Jun 2023 02:23:02 -0400 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 1q6Q5t-0003mV-Q2 for guix-patches@gnu.org; Tue, 06 Jun 2023 02:23:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q6Q5t-0001jm-L5 for guix-patches@gnu.org; Tue, 06 Jun 2023 02:23:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63647] [PATCH 0/2] Fix annoyance with "guix import go" Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Jun 2023 06:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 63647@debbugs.gnu.org, Felix Lechner Received: via spool by 63647-submit@debbugs.gnu.org id=B63647.16860325456620 (code B ref 63647); Tue, 06 Jun 2023 06:23:01 +0000 Received: (at 63647) by debbugs.gnu.org; 6 Jun 2023 06:22:25 +0000 Received: from localhost ([127.0.0.1]:50742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Q54-0001iT-EB for submit@debbugs.gnu.org; Tue, 06 Jun 2023 02:22:25 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:41451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Q51-0001i7-Gg for 63647@debbugs.gnu.org; Tue, 06 Jun 2023 02:22:08 -0400 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3f7373b5499so4469845e9.1 for <63647@debbugs.gnu.org>; Mon, 05 Jun 2023 23:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686032522; x=1688624522; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9Lu1G6xuXr1bPP2QgWtxn6sZ/aYqaycX+0DVOBGuttM=; b=gB6gnFH0BzkwrUcI+apGDdiejKA0LUynaIkkxEOMLZjSIJbYneBMDiB0cbFlnhAbV/ oY4U41rKlqwYziGBjNUi1ooGlG/dZykrBEYj1UuKJWr+En/NHngohOziX6ftLzGgEvPZ 23mrhkrLrCpdiwyWP84azziEtrTUg39pXeccVDtGeiEldel46ou3gsqOgQKb3NR4YxP3 EaLLzcfushR9JmhCQEEma9xKNCoV63HA58kQmeCaahFkCktmXZzJ5kamfQWat3w129CU s209SBzIRtPC2t99epobYWpbBnMssDDg13tIXvgoJBnKB8BxmRGa3To/bRXZxtiGcj6I l4YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686032522; x=1688624522; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Lu1G6xuXr1bPP2QgWtxn6sZ/aYqaycX+0DVOBGuttM=; b=RToD0KwnesBJE+ZveVFvBSSTApev36P8TPoTKDKDsPIdAYmJi/DDV8e/AL9AV7GO3F J5JnDdJQlxKPI8zCvthFisQTLvgNLCBdh1I7WwqtJb9OdBlm3AU2afadPCRAn3V1A63S pxWzPHfz79ysBAZvDFij7uDXlGNPohhIRRyaDaE3OnbuKvrhLcZRM7CocGGC/9yr9jE0 emsJsuzhBQ4fHmsQFgWBa1w+902HQWogEQWra6CzUqBp03FjKzpYB1YM/Hsjye267JYo 6LHg0umvARYNFVnoogJO+9XnZI2eMqOP/ct2WjSDVQYy+702S/Xt1kSBvczngHxbc36O 6VFw== X-Gm-Message-State: AC+VfDxuvVl1ZB5iXJkZQJSxQwOWO7Y7wcJj3WOP4lycbEU/sIieN5BO SihQMvgGBV0gJcgqaKbZcTQ= X-Google-Smtp-Source: ACHHUZ6uDUANrJysFjqZ2B1Q9Ls8NTH+VLv5g6Q9zwajRDxuDh+Yf2otZ0xyqcbaMonTs1IA5KCrTA== X-Received: by 2002:a05:600c:4695:b0:3f5:ffe8:94ac with SMTP id p21-20020a05600c469500b003f5ffe894acmr1709365wmo.0.1686032521481; Mon, 05 Jun 2023 23:22:01 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id h8-20020adfe988000000b0030ae5a0516csm11590428wrm.17.2023.06.05.23.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 23:22:01 -0700 (PDT) From: Simon Tournier In-Reply-To: <87o7luhybt.fsf_-_@gnu.org> References: <87o7luhybt.fsf_-_@gnu.org> Date: Tue, 06 Jun 2023 08:21:56 +0200 Message-ID: <86cz29nm9n.fsf@gmail.com> 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-Seal: i=1; s=key1; d=yhetil.org; t=1686032605; a=rsa-sha256; cv=none; b=av0mwozXKDkE1d/IgMHoppvhClgsZmYd1XSuuoo3mspQuntgoQooEs2Uzsf8N6lWqlAxSz 4tupCkN+hrN0xQxe+8QDNBN+W5pSLLbP8EMP6SSmQeJomnOkXTAmfAU03eFo24SNJm/ta6 61ypOHyk+BgL1/ZWC2XY4YfUSd1Xc+cy8JRVqClgKj4uowTc0dkoEJ2zVd/cxPg+75JPNm 2jOR4IeRwyUi2QR4MpV/TVYBA7XEBFn6c6DDnPr4tkBxPwPvCoOQs7eqWxDpZ+L9Y9xQHy XPQpVZQqO1fUlunq4I8EYU50ZIjm1jWq5wbv/weVoYc0EqPSVQP5kwRQZqxi6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=gB6gnFH0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686032605; 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=9Lu1G6xuXr1bPP2QgWtxn6sZ/aYqaycX+0DVOBGuttM=; b=hEdIFQ5zLA32g36rpseCp1YdciwMuxnWO11OKQcsupXdmSe3A7seQfXnj9LDlWT04YqJk3 nhAtASXg6bO8nhFZRsGJ9zkirk+shXrzDWgqdCTL3X0xQwPZXwAEU46SAJoZKwa+w5CmaY bMhnMzj/ptlfE1QiE1i3vXfkMAzNBEM0fOdpj574JX5V48jlbfUommmgHRFZ7BfacxByAV aSl/xSLYm9pd4M1dAvdOoBpMzY4NFu2WN+ACLiW7b+/W+i2OfdhFCvQxWFiHBRNWEEj573 yvWabDX9s1KirVOzlmWhmEXwz5onV1QRzooXAXR+glewX0WhvVk7USRQ5vMQjg== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=gB6gnFH0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.39 X-Spam-Score: -3.39 X-Migadu-Queue-Id: A6B2A284C0 X-TUID: t5NvXTQ28EN4 Hi Ludo, On Mon, 05 Jun 2023 at 14:45, Ludovic Court=C3=A8s wrote: > Simon Tournier skribis: > >> * guix/import/go.scm (git-checkout-hash): Catch Git error. > > [...] > >> + (catch 'git-error >> + (lambda _ >> + (let-values (((checkout commit _) >> + (parameterize ((%repository-cache-directory cache)) >> + (update-cached-checkout url >> + #:ref >> + `(tag-or-commit . ,refere= nce))))) >> + (file-hash* checkout #:algorithm algorithm #:recursive? #true))) >> + (lambda (key error . rest) >> + (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) u= rl) >> + (nix-base32-string->bytevector >> + "0000000000000000000000000000000000000000000000000000")))) > > I=E2=80=99d rather let the exception through. How about adding > =E2=80=98with-git-error-handling=E2=80=99 at the UI level, in (guix scrip= ts import go)? What do you mean by =E2=80=9Clet the exception through=E2=80=9D? It seems = better to be non-blocking and thus catch the exception then raise a meaningful warning; it=E2=80=99s required when running with the option recursive. Well, maybe an improvement could be in the addition of some =E2=80=99report-git-warning=E2=80=99 and/or =E2=80=99with-git-error-handlin= g*=E2=80=99, in (guix git); hum, I do not know. Last, considering that the module (guix import go) already contains 4 UI messages (G_), trying to move this warning about Git to (guix scripts import go) will add some complexity =E2=80=93 re-raise the exception 2 or 3 times, IIUC =E2=80=93 and thus it will not change much about the UI, IMHO. = I mean, such move should be for all the messages or nothing. Cheers, simon