unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Alice BRENON <alice.brenon@ens-lyon.fr>
To: Sarah Morgensen <iskarian@mgsn.dev>
Cc: 49827@debbugs.gnu.org
Subject: bug#49827: Error message for missing synopsis in opam importer
Date: Wed, 11 Aug 2021 15:15:20 +0200	[thread overview]
Message-ID: <20210811151520.61c85eaa@ens-lyon.fr> (raw)
In-Reply-To: <86r1fb4pez.fsf@mgsn.dev>

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=49958

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 <iskarian@mgsn.dev> a écrit :

> 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 <alice.brenon@ens-lyon.fr> 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…") 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 #<procedure 7f3baca56fe0 at
> > guix/import/opam.scm…> …) 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





  reply	other threads:[~2021-08-11 13:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 15:01 bug#49827: Error message for missing synopsis in opam importer Alice BRENON
2021-08-02 19:28 ` Sarah Morgensen
2021-08-11 13:15   ` Alice BRENON [this message]
2021-08-17  7:43     ` zimoun
2021-08-19 14:58       ` Alice BRENON
2021-11-21 23:22         ` Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210811151520.61c85eaa@ens-lyon.fr \
    --to=alice.brenon@ens-lyon.fr \
    --cc=49827@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).