unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53165: "guix import opam coq-of-ocaml" unexpected error
@ 2022-01-10 17:01 zimoun
  2022-01-10 20:36 ` raingloom
  0 siblings, 1 reply; 3+ messages in thread
From: zimoun @ 2022-01-10 17:01 UTC (permalink / raw)
  To: 53165

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




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

* bug#53165: "guix import opam coq-of-ocaml" unexpected error
  2022-01-10 17:01 bug#53165: "guix import opam coq-of-ocaml" unexpected error zimoun
@ 2022-01-10 20:36 ` raingloom
  2022-01-11 10:51   ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: raingloom @ 2022-01-10 20:36 UTC (permalink / raw)
  To: zimoun; +Cc: 53165

On Mon, 10 Jan 2022 18:01:46 +0100
zimoun <zimon.toutoune@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.




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

* bug#53165: "guix import opam coq-of-ocaml" unexpected error
  2022-01-10 20:36 ` raingloom
@ 2022-01-11 10:51   ` zimoun
  0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2022-01-11 10:51 UTC (permalink / raw)
  To: raingloom; +Cc: 53165

Hi,

On Mon, 10 Jan 2022 at 21:36, raingloom <raingloom@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>




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

end of thread, other threads:[~2022-01-11 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 17:01 bug#53165: "guix import opam coq-of-ocaml" unexpected error zimoun
2022-01-10 20:36 ` raingloom
2022-01-11 10:51   ` zimoun

Code repositories for project(s) associated with this 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).