From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yH1VD6LNE2HrVwEAgWs5BA (envelope-from ) for ; Wed, 11 Aug 2021 15:16:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EM40C6LNE2HaNQAAB5/wlQ (envelope-from ) for ; Wed, 11 Aug 2021 13:16:18 +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 AAAD82BF4 for ; Wed, 11 Aug 2021 15:16:17 +0200 (CEST) Received: from localhost ([::1]:39646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDo5f-0002y3-HO for larch@yhetil.org; Wed, 11 Aug 2021 09:16:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDo5S-0002ue-8B for bug-guix@gnu.org; Wed, 11 Aug 2021 09:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDo5R-0002ni-U9 for bug-guix@gnu.org; Wed, 11 Aug 2021 09:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDo5R-00031X-P7 for bug-guix@gnu.org; Wed, 11 Aug 2021 09:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49827: Error message for missing synopsis in opam importer Resent-From: Alice BRENON Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 11 Aug 2021 13:16:01 +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: Sarah Morgensen Received: via spool by 49827-submit@debbugs.gnu.org id=B49827.16286877259555 (code B ref 49827); Wed, 11 Aug 2021 13:16:01 +0000 Received: (at 49827) by debbugs.gnu.org; 11 Aug 2021 13:15:25 +0000 Received: from localhost ([127.0.0.1]:33862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDo4q-0002Tc-CB for submit@debbugs.gnu.org; Wed, 11 Aug 2021 09:15:24 -0400 Received: from lxc-smtp2.ens-lyon.fr ([140.77.167.81]:54420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDo4o-0002Qg-Kx for 49827@debbugs.gnu.org; Wed, 11 Aug 2021 09:15:23 -0400 Received: from localhost (localhost [127.0.0.1]) by lxc-smtp2.ens-lyon.fr (Postfix) with ESMTP id 5A2CFE2B83; Wed, 11 Aug 2021 15:15:21 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.11.0 (20160426) (Debian) at ens-lyon.fr Received: from lxc-smtp2.ens-lyon.fr ([127.0.0.1]) by localhost (lxc-smtp2.ens-lyon.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b8dgYwK4hntB; Wed, 11 Aug 2021 15:15:21 +0200 (CEST) Received: from localhost (unknown [78.194.167.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by lxc-smtp2.ens-lyon.fr (Postfix) with ESMTPSA id 240BBE08BC; Wed, 11 Aug 2021 15:15:21 +0200 (CEST) Date: Wed, 11 Aug 2021 15:15:20 +0200 From: Alice BRENON Message-ID: <20210811151520.61c85eaa@ens-lyon.fr> In-Reply-To: <86r1fb4pez.fsf@mgsn.dev> References: <20210802170115.696ac103@ens-lyon.fr> <86r1fb4pez.fsf@mgsn.dev> Organization: ENS de Lyon X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.24; x86_64-pc-linux-gnu) 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: 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=1628687777; 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; bh=fhx/yWivPtHrtB8nnu097/V8Ljrqz55pFjU1KGVvL6E=; b=Xsotx3ZKIC/EFdAYN+VpyQ5VeYJfGi96AX9xXOSU+aO+gLHg+3NjAtGzMP6LV8RZLE0us9 KifUrLKAoJdUEV7VnXnExyeyW53DWvZbuaZOapVq/iReuGOJsULoZZvP12L0EEIUXK4UO1 VzeJ4RMCPPAuOdKg53wxrNZIn5PZaONSZLU0jixtLWRaoiJEgYsF6RuXRVqlLd3blIR14N fKusSc5ZFN1taVg11kFMS1ijRL1KVmO+BATn03UeYNrcuKYssuTduZO7IehaFCxdrilwBs y6qCveQEE4cT4gSEDw4rf+D0oCTvmTzdq2Z3S4PAvxKQ7w2exu4FbvPGr+k9Lg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628687777; a=rsa-sha256; cv=none; b=e65WoRppf2v8eoRdmOk8hojVQR50Wy6SFMYH7wU67yDssKpBfZCkasZN611zy+EYKxmRB6 /Np/cCOVIYacDG9uKqEcflbAXRQxOy+j1qqgrXopWqjLK6eAmcJ+c90ZEuQ54D8oAoc/CP 2QURhGUedYbuOWn9u1bNbWolLTQDFxhzw6PLx7WzXnR2c4nQvDY/JEnRcdrbgQ6jUke/VN Us1Dhht3tkJ9zFIPLGk4QBNuInigYb7IfoU4ZEbsPPlVBaMj1hQaaiORLg3rO8y/XxQ/QU S4OGv9/sjUJ4/oGYoZkjAVXtoqjkod7X9gHwBMmc/eWbNNTEvj5RNsc7c+bkZA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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-Spam-Score: -2.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: AAAD82BF4 X-Spam-Score: -2.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: 25nLEQnZy0bb Hello, Thanks for your answer Sarah. Simon, I don't know if you have been able to make any progress but I wanted to make sure you had seen the patch proposal I sent to let the opam importer work from more repositories than the few initially defined (opam's official and three for coq): https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49958 Though I had a local "bypass" on the metadata reader to be able to perform the import I wanted and orginally designed my patch for, I paid attention not to commit it to keep matters separated. Any insight on the general form the improved error handling will take ? Please let me know if I can update my #49958 patch to play along more nicely with your rework. Alice Le Mon, 02 Aug 2021 12:28:20 -0700, Sarah Morgensen a =C3=A9crit : > Hi, >=20 > Thanks for the report. I'm CC'ing Simon since they have been working > on improved error handling/reporting for the importers. >=20 > Alice BRENON writes: >=20 > > 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 # > guix/import/opam.scm=E2=80=A6> =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"). =20 >=20 > 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. >=20 > Simon, how's that error handling rework coming? ;) >=20 > > > > Thanks, > > > > Alice BRENON =20 >=20 > -- > Sarah