GNU bug report logs - #49827
Error message for missing synopsis in opam importer

Previous Next

Package: guix;

Reported by: Alice BRENON <alice.brenon <at> ens-lyon.fr>

Date: Mon, 2 Aug 2021 15:45:03 UTC

Severity: normal

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alice BRENON <alice.brenon <at> ens-lyon.fr>
Subject: bug#49827: closed (Re: bug#49827: Error message for missing
 synopsis in opam importer)
Date: Sun, 21 Nov 2021 23:23:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#49827: Error message for missing synopsis in opam importer

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 49827 <at> debbugs.gnu.org.

-- 
49827: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49827
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Julien Lepiller <julien <at> lepiller.eu>
To: Alice BRENON <alice.brenon <at> ens-lyon.fr>
Cc: 49827-done <at> debbugs.gnu.org, Sarah Morgensen <iskarian <at> mgsn.dev>,
 zimoun <zimon.toutoune <at> gmail.com>
Subject: Re: bug#49827: Error message for missing synopsis in opam importer
Date: Mon, 22 Nov 2021 00:22:33 +0100
Hi,

First, today when running guix import opam iter, I get a synopsis, and
#f as the description because the field is missing.

I also pushed a small patch to master, as
24aa7b3c21309b63cc6e8e18d6417d2cddccf6c6, that ensures that, when the
field exists but contains unknown data, we also return #f instead of a
match error that produces the ugly backtrace you saw.

Thanks for the report, closing :)

[Message part 3 (message/rfc822, inline)]
From: Alice BRENON <alice.brenon <at> ens-lyon.fr>
To: bug-guix <at> gnu.org
Subject: Error message for missing synopsis in opam importer
Date: Mon, 2 Aug 2021 17:01:15 +0200
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



This bug report was last modified 3 years and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.