unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58112: OPAM importer fails in lookup-node
@ 2022-09-27 11:33 Csepp
  2022-09-27 13:47 ` zimoun
  2022-09-27 15:42 ` Julien Lepiller
  0 siblings, 2 replies; 3+ messages in thread
From: Csepp @ 2022-09-27 11:33 UTC (permalink / raw)
  To: 58112; +Cc: julien

The specific error is this:
Wrong number of values returned to continuation (expected 2)
It is caused by opam->guix-package silencing intermediate errors by
using and-let* (the poor person's Maybe monad) and returning #f when the
receiving side expects two return values.

Initial reproducer:
guix import opam -r mirage

Also happens with opam-monorepo.

Cc-ing Julien whom might know why the code is structured this way?  It's
not like the calling side can handle a falsy return and the error is not
detected early either, so the user doesn't even know what is causing it.
Can I just turn it all into errors?  Or maybe we can use the condition
system?





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

* bug#58112: OPAM importer fails in lookup-node
  2022-09-27 11:33 bug#58112: OPAM importer fails in lookup-node Csepp
@ 2022-09-27 13:47 ` zimoun
  2022-09-27 15:42 ` Julien Lepiller
  1 sibling, 0 replies; 3+ messages in thread
From: zimoun @ 2022-09-27 13:47 UTC (permalink / raw)
  To: Csepp, 58112; +Cc: julien

Hi,

On Tue, 27 Sep 2022 at 13:33, Csepp <raingloom@riseup.net> wrote:
> The specific error is this:
> Wrong number of values returned to continuation (expected 2)
> It is caused by opam->guix-package silencing intermediate errors by
> using and-let* (the poor person's Maybe monad) and returning #f when the
> receiving side expects two return values.
>
> Initial reproducer:
> guix import opam -r mirage

I have not checked for opam, but it reminds me fixes in other importers.

5278cab3dc * scripts: import: gem: Fix recursive error handling.
7229b0e858 * import: cran: Return multiple values for unknown packages.
1fe81b349c * import: elpa: Return multiple values for unknown packages.
6bb92098b4 * import: hackage: Return multiple values for unknown packages.

And the bug#44115 report [1] mentioned opam but indeed the fix probably
fell in the crack. :-)

Do you want to give a try?

1: https://issues.guix.gnu.org/44115




Cheers,
simon




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

* bug#58112: OPAM importer fails in lookup-node
  2022-09-27 11:33 bug#58112: OPAM importer fails in lookup-node Csepp
  2022-09-27 13:47 ` zimoun
@ 2022-09-27 15:42 ` Julien Lepiller
  1 sibling, 0 replies; 3+ messages in thread
From: Julien Lepiller @ 2022-09-27 15:42 UTC (permalink / raw)
  To: raingloom, 58112

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

It's probably because other importers are structured that way. I'd be in favor of changing that and using the condition system.

Le 27 septembre 2022 13:33:56 GMT+02:00, Csepp <raingloom@riseup.net> a écrit :
>The specific error is this:
>Wrong number of values returned to continuation (expected 2)
>It is caused by opam->guix-package silencing intermediate errors by
>using and-let* (the poor person's Maybe monad) and returning #f when the
>receiving side expects two return values.
>
>Initial reproducer:
>guix import opam -r mirage
>
>Also happens with opam-monorepo.
>
>Cc-ing Julien whom might know why the code is structured this way?  It's
>not like the calling side can handle a falsy return and the error is not
>detected early either, so the user doesn't even know what is causing it.
>Can I just turn it all into errors?  Or maybe we can use the condition
>system?
>

[-- Attachment #2: Type: text/html, Size: 1181 bytes --]

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

end of thread, other threads:[~2022-09-27 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-27 11:33 bug#58112: OPAM importer fails in lookup-node Csepp
2022-09-27 13:47 ` zimoun
2022-09-27 15:42 ` 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).