unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49827: Error message for missing synopsis in opam importer
@ 2021-08-02 15:01 Alice BRENON
  2021-08-02 19:28 ` Sarah Morgensen
  0 siblings, 1 reply; 6+ messages in thread
From: Alice BRENON @ 2021-08-02 15:01 UTC (permalink / raw)
  To: 49827

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").

Thanks,

Alice BRENON




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-21 23:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-08-17  7:43     ` zimoun
2021-08-19 14:58       ` Alice BRENON
2021-11-21 23:22         ` Julien Lepiller

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).