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 ms9.migadu.com with LMTPS id UATZMW5ef2QPsQAASxT56A (envelope-from ) for ; Tue, 06 Jun 2023 18:27:26 +0200 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 iMDGMW5ef2QBCgEA9RJhRA (envelope-from ) for ; Tue, 06 Jun 2023 18:27: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 43A523B374 for ; Tue, 6 Jun 2023 18:27:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6YqJ-0001oN-E6; Tue, 06 Jun 2023 11:43:31 -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 1q6Ypq-0001dj-Ek for guix-patches@gnu.org; Tue, 06 Jun 2023 11:43:10 -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 1q6Ypq-0001BY-5e for guix-patches@gnu.org; Tue, 06 Jun 2023 11:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q6Ypq-0004rZ-1x for guix-patches@gnu.org; Tue, 06 Jun 2023 11:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63647] [PATCH 0/2] Fix annoyance with "guix import go" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Jun 2023 15:43:02 +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: Simon Tournier Cc: 63647@debbugs.gnu.org, Felix Lechner Received: via spool by 63647-submit@debbugs.gnu.org id=B63647.168606613618635 (code B ref 63647); Tue, 06 Jun 2023 15:43:02 +0000 Received: (at 63647) by debbugs.gnu.org; 6 Jun 2023 15:42:16 +0000 Received: from localhost ([127.0.0.1]:52846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Yp6-0004qU-3p for submit@debbugs.gnu.org; Tue, 06 Jun 2023 11:42:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Yp3-0004qH-NE for 63647@debbugs.gnu.org; Tue, 06 Jun 2023 11:42:14 -0400 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 1q6Yox-0000MA-RZ; Tue, 06 Jun 2023 11:42:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Gw7SjnVboGcgXoi8hGUHj5N9TWBTd+OI9MpjSw7nI7U=; b=eWqd7hnVFnd2cRyeoKi2 sB+UOta0GkrOrcGRQ8t4nN5aupgIWeng5H9a3jDcv5lIvy60ZNctg2bpFVN8P4lj8YMjwBGcqibKP dqWq9F/homOBzFf5UyBHuTlpxDl6wj9rIuccdazj1ZvV8jxAt0f9IxcPGakyw7b6QMlurAV6lQc6V 6O/08mWSGJCLGFrGNj+YciwnlSNjOXcCaQDAMov60yhgo8D0Yb/e/hs6tgvqPwQ3+xibaLYME+GzJ hW4D9lpvaitj1Dl2Th7K+5Nr+3m/tcRPrmW/fHzHGSw6H+gpVy6roC8U63GvjsgC4DTmXS1t4I1mR eC96Rn/0PYNBJw==; Received: from [193.50.110.155] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Yot-0000oa-Eu; Tue, 06 Jun 2023 11:42:04 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87o7luhybt.fsf_-_@gnu.org> <86cz29nm9n.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 18 Prairial an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour du Pavot 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: Tue, 06 Jun 2023 17:42:00 +0200 In-Reply-To: <86cz29nm9n.fsf@gmail.com> (Simon Tournier's message of "Tue, 06 Jun 2023 08:21:56 +0200") Message-ID: <87zg5c61iv.fsf@gnu.org> 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 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=1686068846; a=rsa-sha256; cv=none; b=jUbS7PPOr+XKogjgXKANAPB7aP05mHIQqwQypk7srcQllQ/VAWHM4ncDx/fPArdYbzDhVh PiDAdKw0dKUpqllhH2xjbFujObBZqtTeC0nxEtPUrNAeQg055xtl4WbQlWv++4++n8GFTH bBVc4PshzZ00PXYqKVmCqxpRPsRGpbNAjPNuOYUVWsNfwnNd+h0JRgdg804oHagydiUjdX fvB/9MEFDXBO2vIhN4urXvXIaggXbWBGlaNiAxWCvUChU7mE5vmjkP5YWZXFQXjkZBANcL WJZPOSmJDi0bzE8GJX93wjal6OVJ8HXCH06J/OMCpCxKH8SknCFIimVlk+xf4w== 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=eWqd7hnV; dmarc=pass (policy=none) header.from=gnu.org; 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=1686068846; 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=Gw7SjnVboGcgXoi8hGUHj5N9TWBTd+OI9MpjSw7nI7U=; b=rTzweV8gIjNQWHMxnmmWvIgJTK8EgfkSCm5RMeriN3w2sYl5Z5zMbt/Ea5LHRuP9YwST9u meVu5AglhuszWykQhsnkE+9E0NAzUBmt3uOjZwvsivVzQC7WnOJmGkK6Yd6QJdqGaTJb/p qfVoqbnB+Bb+AlTFqDqalzj16H4/TTm3dDVTjRaOK1lu3HNdp7w6YPBiVXJmjpkef8Z4SX DW/soHBoMMQBLddqAKh26c+YmW/1wFlXdx9VN9YHwA53W1uhTvvukWYAruXvnO4rhaYedQ aWOt9mrF9g56AY3GcbSVafecX+OrSiotuVSrDuhtgZldjl/OZRzelluKczg1cg== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=eWqd7hnV; dmarc=pass (policy=none) header.from=gnu.org; 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: -5.79 X-Spam-Score: -5.79 X-Migadu-Queue-Id: 43A523B374 X-TUID: nUrov7yKjOl5 Hello! Simon Tournier skribis: > 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 . ,refer= ence))))) >>> + (file-hash* checkout #:algorithm algorithm #:recursive? #true)= )) >>> + (lambda (key error . rest) >>> + (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) = url) >>> + (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 scri= pts import go)? > > What do you mean by =E2=80=9Clet the exception through=E2=80=9D? It seem= s 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. I thought it would be more appropriate to error out as soon as we have a Git problem, rather than print a warning and emit an incorrect hash. I understand that, when using =E2=80=98--recursive=E2=80=99, this means abo= rting the whole process without producing anything. But maybe that=E2=80=99s better = that producing an incorrect (origin =E2=80=A6) form? Now, I don=E2=80=99t use =E2=80=98guix import go -r=E2=80=99 so it=E2=80=99= s possible that I don=E2=80=99t understand the scenario being considered here! Thanks, Ludo=E2=80=99.