GNU bug report logs - #53165
"guix import opam coq-of-ocaml" unexpected error

Previous Next

Package: guix;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Mon, 10 Jan 2022 17:02:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53165 in the body.
You can then email your comments to 53165 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#53165; Package guix. (Mon, 10 Jan 2022 17:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to zimoun <zimon.toutoune <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 10 Jan 2022 17:02:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: "guix import opam coq-of-ocaml" unexpected error
Date: Mon, 10 Jan 2022 18:01:46 +0100
Hi,

For some reasons, the Opam importer is failing for coq-of-ocaml:

--8<---------------cut here---------------start------------->8---
$ guix import opam coq-of-ocaml

Starting download of /tmp/guix-file.058Nel
From https://github.com/clarus/coq-of-ocaml/releases/download/2.5.1/coq-of-ocaml-full.2.5.1.tar.gz...
following redirection to `https://github.com/foobar-land/coq-of-ocaml/releases/download/2.5.1/coq-of-ocaml-full.2.5.1.tar.gz'...
following redirection to `https://objects.githubusercontent.com/github-production-release-asset-2e65be/14023027/b17b0f80-d4ea-11eb-8861-d8d0c56a130f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220110T165945Z&X-Amz-Expires=300&X-Amz-Signature=7422a35182a4ae9cf511471dca445a65316a70e8baa7ffefc9381ce3588002da&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=14023027&response-content-disposition=attachment%3B%20filename%3Dcoq-of-ocaml-full.2.5.1.tar.gz&response-content-type=application%2Foctet-stream'...
 …ll.2.5.1.tar.gz  2.3MiB            44.3MiB/s 00:00 [##################] 100.0%
Backtrace:
           8 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
   2206:7  7 (run-guix . _)
  2169:10  6 (run-guix-command _ . _)
In guix/scripts/import.scm:
   124:11  5 (guix-import . _)
In guix/scripts/import/opam.scm:
   105:23  4 (guix-import-opam . _)
In guix/build/utils.scm:
    251:8  3 (call-with-temporary-output-file #<procedure 7ff70d73d500 at guix/import/opam.scm:348:12 (temp port)>)
In guix/import/opam.scm:
   374:37  2 (_ _ _)
In guix/import/utils.scm:
   244:19  1 (beautify-description #f _)
In unknown file:
           0 (string-prefix? "A " #f #<undefined> #<undefined> #<undefined> #<undefined>)

ERROR: In procedure string-prefix?:
In procedure string-prefix?: Wrong type argument in position 2 (expecting string): #f
--8<---------------cut here---------------end--------------->8---


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#53165; Package guix. (Mon, 10 Jan 2022 20:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 53165 <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 53165 <at> debbugs.gnu.org
Subject: Re: bug#53165: "guix import opam coq-of-ocaml" unexpected error
Date: Mon, 10 Jan 2022 21:36:57 +0100
On Mon, 10 Jan 2022 18:01:46 +0100
zimoun <zimon.toutoune <at> gmail.com> wrote:

> Hi,
> 
> For some reasons, the Opam importer is failing for coq-of-ocaml:
> 
> --8<---------------cut here---------------start------------->8---
> $ guix import opam coq-of-ocaml
> 
> Starting download of /tmp/guix-file.058Nel
> From
> https://github.com/clarus/coq-of-ocaml/releases/download/2.5.1/coq-of-ocaml-full.2.5.1.tar.gz...
> following redirection to
> `https://github.com/foobar-land/coq-of-ocaml/releases/download/2.5.1/coq-of-ocaml-full.2.5.1.tar.gz'...
> following redirection to
> `https://objects.githubusercontent.com/github-production-release-asset-2e65be/14023027/b17b0f80-d4ea-11eb-8861-d8d0c56a130f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220110T165945Z&X-Amz-Expires=300&X-Amz-Signature=7422a35182a4ae9cf511471dca445a65316a70e8baa7ffefc9381ce3588002da&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=14023027&response-content-disposition=attachment%3B%20filename%3Dcoq-of-ocaml-full.2.5.1.tar.gz&response-content-type=application%2Foctet-stream'...
> …ll.2.5.1.tar.gz  2.3MiB            44.3MiB/s 00:00
> [##################] 100.0% Backtrace: 8 (primitive-load
> "/home/simon/.config/guix/current/bin/guix") In guix/ui.scm: 2206:7
> 7 (run-guix . _) 2169:10  6 (run-guix-command _ . _) In
> guix/scripts/import.scm: 124:11  5 (guix-import . _)
> In guix/scripts/import/opam.scm:
>    105:23  4 (guix-import-opam . _)
> In guix/build/utils.scm:
>     251:8  3 (call-with-temporary-output-file #<procedure
> 7ff70d73d500 at guix/import/opam.scm:348:12 (temp port)>) In
> guix/import/opam.scm: 374:37  2 (_ _ _)
> In guix/import/utils.scm:
>    244:19  1 (beautify-description #f _)
> In unknown file:
>            0 (string-prefix? "A " #f #<undefined> #<undefined>
> #<undefined> #<undefined>)
> 
> ERROR: In procedure string-prefix?:
> In procedure string-prefix?: Wrong type argument in position 2
> (expecting string): #f --8<---------------cut
> here---------------end--------------->8---
> 
> 
> Cheers,
> simon
> 
> 
> 

My guess is that the package is missing a description? I vaguely recall
running into this or a similar error when trying to import Infer, but
I'm not sure how I fixed it.
Based on the backtrace, just modifying beautify-description? to act as
the identity function when the input isn't a string should be enough.

ps.:
This is why Scheme should have a Maybe type instead of this mess of
overloading boolean false. :)
Or at least Guile should have an optional type checker like MyPy.




Information forwarded to bug-guix <at> gnu.org:
bug#53165; Package guix. (Tue, 11 Jan 2022 10:57:02 GMT) Full text and rfc822 format available.

Message #11 received at 53165 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: raingloom <raingloom <at> riseup.net>
Cc: 53165 <at> debbugs.gnu.org
Subject: Re: bug#53165: "guix import opam coq-of-ocaml" unexpected error
Date: Tue, 11 Jan 2022 11:51:51 +0100
Hi,

On Mon, 10 Jan 2022 at 21:36, raingloom <raingloom <at> riseup.net> wrote:

> My guess is that the package is missing a description? I vaguely recall
> running into this or a similar error when trying to import Infer, but
> I'm not sure how I fixed it.
> Based on the backtrace, just modifying beautify-description? to act as
> the identity function when the input isn't a string should be enough.

Thanks.  If no one beats me, I will give a look.  But for now it is low
in my list. :-)


> This is why Scheme should have a Maybe type instead of this mess of
> overloading boolean false. :)
> Or at least Guile should have an optional type checker like MyPy.

Hm, I do not think Maybe would change something if the «package is
missing a description».  At best, Maybe would be another way to catch
the errors instead of raising the Backtrace, no?

And I do not think that a type checker like MyPy would raises something
here if the issue comes from the missing upstream description, no?

Something like QuickCheck seems required and would raise the bug,
eventually.  Oh wait, guile-quickcheck is around [1] and used by
Disarchive; therefore already an indirect dependency of guix. :-)

That’s said, nothing prevents Guile to have a Maybe monad.  But I think
this way of programming is not popular among Schemers. :-) And I agree
that a type checker would prevent many issues.  Even, I remember talking
this topic back on December 2018 around this event:
<https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00049.html>. ;-)


Cheers,
simon


1: <https://ngyro.com/software/guile-quickcheck.html>




Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Sun, 12 Jun 2022 05:16:01 GMT) Full text and rfc822 format available.

Notification sent to zimoun <zimon.toutoune <at> gmail.com>:
bug acknowledged by developer. (Sun, 12 Jun 2022 05:16:01 GMT) Full text and rfc822 format available.

Message #16 received at 53165-done <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 53165-done <at> debbugs.gnu.org, raingloom <raingloom <at> riseup.net>
Subject: Re: bug#53165: "guix import opam coq-of-ocaml" unexpected error
Date: Sun, 12 Jun 2022 07:15:38 +0200
Since then, this has been fixed:

guix import opam coq-of-ocaml
...
(description
   "This package lacks a description.  Run \"info '(guix) Synopses and
Descriptions'\" for more information.")
...

So, closing :)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 10 Jul 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 262 days ago.

Previous Next


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