From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 1rOyIIhHCGG9ZQEAgWs5BA (envelope-from ) for ; Mon, 02 Aug 2021 21:29:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EKCsG4hHCGHzXgAAbx9fmQ (envelope-from ) for ; Mon, 02 Aug 2021 19:29:12 +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 01E9190D9 for ; Mon, 2 Aug 2021 21:29:12 +0200 (CEST) Received: from localhost ([::1]:42204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAdcb-0004wR-U1 for larch@yhetil.org; Mon, 02 Aug 2021 15:29:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAdcV-0004vo-1k for bug-guix@gnu.org; Mon, 02 Aug 2021 15:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mAdcU-0000uq-Qc for bug-guix@gnu.org; Mon, 02 Aug 2021 15:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mAdcU-00020R-He for bug-guix@gnu.org; Mon, 02 Aug 2021 15:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49827: Error message for missing synopsis in opam importer Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 02 Aug 2021 19:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49827 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Alice BRENON Received: via spool by 49827-submit@debbugs.gnu.org id=B49827.16279325067668 (code B ref 49827); Mon, 02 Aug 2021 19:29:02 +0000 Received: (at 49827) by debbugs.gnu.org; 2 Aug 2021 19:28:26 +0000 Received: from localhost ([127.0.0.1]:39313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAdbu-0001zc-Hw for submit@debbugs.gnu.org; Mon, 02 Aug 2021 15:28:26 -0400 Received: from out0.migadu.com ([94.23.1.103]:18646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAdbr-0001zP-Lp for 49827@debbugs.gnu.org; Mon, 02 Aug 2021 15:28:24 -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=1627932502; 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=8+0/MSivIf3lq4Cl8VMxxXGvmmWxU+ShfoDPp3xWWGc=; b=XjmRwkdMcKeNlgo1UgUCFG2iq/wSjI9XjNTuAuCeAwohHkxHuV6PLGCBbNadF3zTLQjh8f sRyPbrKgBxD5Dm33u0yXPZN0ndjOGRr7X4SizZLhDHUokp1Zsi90mdHI7+g8tqI1yrZWSl ybWuL7NCrnIxEM+uxZTgq4G5Wx1jHwY= From: Sarah Morgensen References: <20210802170115.696ac103@ens-lyon.fr> Date: Mon, 02 Aug 2021 12:28:20 -0700 In-Reply-To: <20210802170115.696ac103@ens-lyon.fr> (Alice BRENON's message of "Mon, 2 Aug 2021 17:01:15 +0200") Message-ID: <86r1fb4pez.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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 49827@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627932552; 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=8+0/MSivIf3lq4Cl8VMxxXGvmmWxU+ShfoDPp3xWWGc=; b=RKnb4m1i448aXr+oUH8BCKAjVADB3h1q3/hIlac3vx4bLzq2IL3dxCkPHzTNJFsO/z4Lc1 vyjs5c9ypX6iP+0XB/DONRgp/ogdYFDo2u9W9Qdb/eO9Rip73gZc/1i/W3JUxdfs0gkwC+ MsqkvnIOjdeMvlQXYxTF8quYORxxloEyMzAtVCg2siHKRagte2V2nZv1ZPoxF0FGJoacbh EeALTtRIqWcChoKpmCoHvCeBoVys2cAnJlhdNp9pDeLop/8nbPnmNPZESf/yuKAm+DVf3q wTt14X9dOA7TzBRr7GdQxvdFTtXTi3wVecrh8XticY90mzKFo1rMlkQ7G7ngmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627932552; a=rsa-sha256; cv=none; b=hqqxQmiouBBovOfwVmz05kJewdkZN71Jn7TYaTxKvT1gKM+n0NKAfDvzTYDazMv15FwReK WjcTSQQ8gJ0nYEVfmycqkyspTvE7OQw71jtI+O5bbzIeK1wa03rDoiTNiJG89cYlZIUynP hMovZKIHIe62nB3JIUWtF/1O5pr2bkL2SiHMfefp9xqytnXP5n3bzUfvExaFzZ54ARuGxu UcHdje4P8RvCW+KGRZu4vDzBl2qGu9n/boJ5Nmy3oIalYXaTnGncJ/x6IT4HLcPFiBsO0r xDrG8JNVLjYdQYLTw5e5k5feTVD0ZAff4mM/vRgxFyTRLhE+7UYwi/nEId/6ZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=XjmRwkdM; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=XjmRwkdM; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 01E9190D9 X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: YioUeMqaOZJI Hi, Thanks for the report. I'm CC'ing Simon since they have been working on improved error handling/reporting for the importers. Alice BRENON writes: > Hello, > > I triggered a confusing behaviour from the opam importer trying to > import package iter 1.2.1 today on a Guix System install. > > The package iter is missing a "synopsis" field as can be seen on > https://opam.ocaml.org/packages/iter/ , which when I tried > > guix import opam iter > > yielded the following backtrace: > > Backtrace: > 8 (primitive-load "/home/alice/.config/guix/current/bin/g=E2= =80=A6") > In guix/ui.scm: > 2185:7 7 (run-guix . _) > 2148:10 6 (run-guix-command _ . _) > In guix/scripts/import.scm: > 120:11 5 (guix-import . _) > In guix/scripts/import/opam.scm: > 104:23 4 (guix-import-opam . _) > In guix/utils.scm: > 752:8 3 (call-with-temporary-output-file _) > In guix/import/opam.scm: > 337:34 2 (_ _ _) > In srfi/srfi-1.scm: > 460:18 1 (fold # =E2=80=A6) > In guix/import/opam.scm: > 193:15 0 (_ _ _) > > guix/import/opam.scm:193:15: Throw to key `match-error' with args > `("match" "no matching pattern" string-pat)'. > > > the final error is raised l.193 of guix/import/opam.scm because > metadata-ref supports various types for a metadata field, but not the > lack of it. As discussed with Maxime Devos on the IRC channel, it would > be helpful to either allow the import of a package with a missing field > (possibly filling it in the output scheme code for the imported package > with some bad value requiring the user to fill it and causing any build > to crash until replaced properly) or at least to handle that missing > field with a more explicit error message than the above backtrace > (something like "Can't import that package because it's missing such or > such field"). IMO, a warning should be emitted, but the package should be buildable if at all possible; it's the submitter's responsibility to vet imported packages. Simon, how's that error handling rework coming? ;) > > Thanks, > > Alice BRENON -- Sarah