From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eHe0LnYE2mCjjQAAgWs5BA (envelope-from ) for ; Mon, 28 Jun 2021 19:18:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WG9tKnYE2mCSPgAAbx9fmQ (envelope-from ) for ; Mon, 28 Jun 2021 17:18:46 +0000 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 0E5F6E775 for ; Mon, 28 Jun 2021 19:18:46 +0200 (CEST) Received: from localhost ([::1]:35918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxuuC-00084v-Vq for larch@yhetil.org; Mon, 28 Jun 2021 13:18:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxupe-0004Py-S6 for guix-patches@gnu.org; Mon, 28 Jun 2021 13:14:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxupe-0001Pe-Jy for guix-patches@gnu.org; Mon, 28 Jun 2021 13:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lxupe-000716-Dw for guix-patches@gnu.org; Mon, 28 Jun 2021 13:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49196] [PATCH] import: utils: 'recursive-import' skips unfound packages Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 28 Jun 2021 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49196 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 49196@debbugs.gnu.org, =?UTF-8?Q?J=C3=A9r=C3=A9my?= Korwin-Zmijowski Received: via spool by 49196-submit@debbugs.gnu.org id=B49196.162490040726916 (code B ref 49196); Mon, 28 Jun 2021 17:14:02 +0000 Received: (at 49196) by debbugs.gnu.org; 28 Jun 2021 17:13:27 +0000 Received: from localhost ([127.0.0.1]:52402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxup5-000702-IN for submit@debbugs.gnu.org; Mon, 28 Jun 2021 13:13:27 -0400 Received: from out0.migadu.com ([94.23.1.103]:59513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxup1-0006zs-VV for 49196@debbugs.gnu.org; Mon, 28 Jun 2021 13:13:26 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1624900402; h=from:from: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; bh=Xp7OjEw7UWjO6YuhmV5GU6Ccz8MkYx8O/KgyKDQ1mKc=; b=P7/hrmyGHxiCewTIbpLJxf7ms+MajW6AaPMnV0qkhF0M2gK5NWzfjEUpuyMyXndslqIl32 9+dbyTfiwlDVUFWsn7PLougWJhCc2KXiVfXKLSuY+hrE4THCZk8BbvBuTRX4KlP44EDjo1 vloaVXpOABudAtxf3jBW0FI0P04zFho= In-Reply-To: (zimoun's message of "Mon, 28 Jun 2021 13:42:26 +0200") References: <20210625163749.65196-1-zimon.toutoune@gmail.com> <20210625163749.65196-3-zimon.toutoune@gmail.com> <868s2v7w4t.fsf_-_@mgsn.dev> Date: Mon, 28 Jun 2021 10:13:19 -0700 Message-ID: <86lf6t7w0g.fsf_-_@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Auth-User: iskarian@mgsn.dev 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" Reply-to: Sarah Morgensen X-ACL-Warn: , Sarah Morgensen via Guix-patches From: Sarah Morgensen via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624900726; h=from:from:sender:sender:reply-to: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=Xp7OjEw7UWjO6YuhmV5GU6Ccz8MkYx8O/KgyKDQ1mKc=; b=azQ7TvDUuhUB13ZoBTkS02k4/YSWjTqNUhZ2ZAmYBotarhRzGmq6zRcUt0Hht1JbuGZ8w5 x50y4iDSAzCF6bXWyUPGLaO5/9tx4om/vbBaDHwCLUU2RDU2FwMl41VMH8bBRkUmq40HSC PKhZn8iUYC1DiEYVX/jFS95njJIHBeRqVFsV7sRWumv3lYdc0W1XXsNlCD1jm1B+4yCt0h /9Yk4REfRXotbntwQaaYS0J0VzMzy0JagSO/bOevmtUNmn6OlSOj9xfluQz7m6xqQrep4x NuzQ0sOL5hioolBZGWN1oVekADGJWXXgF1yjXMvX8qVRhIHuOJIkiInmyT8l7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624900726; a=rsa-sha256; cv=none; b=ApxrermgPLDQzPyhLH4NskQlveHLtHTGIdh28NAj0erRcKOjg7lfT/M279iHfooBY+tSvO N2ZyWfZc31+NeuAMcxUebkac/pDoiXmIpIZnTG0ajZv2Rk8/CHOxhOMnH4lOFHNf+Ue3wM vpGbcdXpPC/N4CJ1gsCuQ228DKV0UpEiLQuoS1275+dATP+B+j4sz85rrwlX42D5e37lbL dBwPdsFdqT60cRxWMaayXXAsSoELbw3dokrjRZwsOSoVZ8j1/Nyw1GpVTA4nOXO83YZgyW OmGkATD5P54P/yChsAdMe82bB8qzh7rQUm62tPb6G75p5OiP6C+998LpH8b71w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b="P7/hrmyG"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b="P7/hrmyG"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 0E5F6E775 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: Vp664QJuP8Xz zimoun writes: Hello, Thanks for the v4. > Hi, > > On Sun, 27 Jun 2021 at 06:46, Sarah Morgensen wrote: > >> A catch-all is fine, but we should at least report the actual error, >> even if it's not pretty: >> >> (warning (G_ "Failed to import package ~s.~% reason: ~s") >> package-name (exception-args c)) > > Well, why not, even if I am not convinced the reason is meaningful > because it is mostly an incorrect parsing which returns: > > reason: ("match" "no matching pattern" #f). > Yes, it is a less than ideal compromise... I could not quickly figure out how to properly format it without a lot of complexity (like guix/ui.scm does in 'call-with-error-handling'). I found it hard to read the full exception object, but I would not object strongly to printing the full exception object either. As you say, your patch will fix it anyway ;) > and I think it is better to display the complete 'args' instead of > extract the URL (package-name) from 'args'. You're not wrong; I was just trying to keep it somewhat consistent with the other error message. >> However, if we want to move in the direction of proper error handling >> like guix/packages.scm and guix/ui.scm, we can do something like... > > Thanks for the idea. As explained patch#45984 [1], all the UI > messages must be in guix/scripts/import and not in guix/import and Yes, this was my secret trick: having separated out the error reporting, it could be easily be moved to scripts/import later. =20 > therefore, indeed, error reporting needs to be unified between all the > importers and raised accordingly; that's what we are working on with > jeko (J=C3=A9r=C3=A9my Korwin-Zmijowski) as pair-programming exercise. :-) I look forward to the results! > Back to the initial patch, I think it is better to simply fix with the > minor improvements of v3 your proposed and let this last proposal for > #45984; feel free to comment there. ;-) I agree. Your v4 looks good to me, except... > #:repo->guix-package > (lambda* (name #:key version repo) I apologize for not being clear earlier; by "put [memoize] back in later on" I meant "later on in the call chain," e.g. #:repo->guix-package + (memoize (lambda* (name #:key version repo) That's my only nit this time! ;) Thanks for bearing with me. Regards, Sarah