all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen via Guix-patches via <guix-patches@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 49196@debbugs.gnu.org
Subject: [bug#49196] [PATCH] import: utils: 'recursive-import' skips unfound packages
Date: Thu, 24 Jun 2021 21:22:36 -0700	[thread overview]
Message-ID: <86lf6y7eur.fsf_-_@mgsn.dev> (raw)
In-Reply-To: <854kdna1wu.fsf@gmail.com> (zimoun's message of "Thu, 24 Jun 2021 14:21:37 +0200")

Hello,

Thanks for the review!

zimoun <zimon.toutoune@gmail.com> writes:

> Indeed, there is an inconsistency betweem all the recursive importers.
> An attempt to fix this is done by [1].
>
> 1: <http://issues.guix.gnu.org/issue/45984>

Thanks, that was a good read. With context, I see where you're coming
from. I agree that the direction to take with these importers is to
unify and standardize.

The goal of this patch is just to allow recursive import to provide a
usable result despite some failures, when the importer supports it. I'd
rather hunt down one package than 20+ :) This may make reporting errors
more difficult, but I think the use-case is worth it.

> ...however, I am not convinced this fixes the issue.  Compare:
>
> $ guix import go do-not-exist -r
>
> with:
>
> $ ./pre-inst-env guix import go do-not-exist -r

Good catch. I did not think to handle the toplevel package not being
found! This actually leads to making this a much simpler patch...

--8<---------------cut here---------------start------------->8---
-  (map node-package
+   (filter-map node-package
        (topological-sort (list (lookup-node package-name version))
--8<---------------cut here---------------end--------------->8---

...which also works for other importers which return (values #f ...):

--8<---------------cut here---------------start------------->8---
~/guix$ for importer in stackage elpa gem cran go ;  do printf "\n### $importer\n" ;  ./pre-inst-env guix import $importer really-does-not-exist -r ;done

### stackage
guix import: error: really-does-not-exist: Stackage package not found

### elpa
guix import: error: couldn't find meta-data for ELPA package `really-does-not-exist'.

### gem

### cran
error: failed to retrieve package information from "https://cran.r-project.org/web/packages/really-does-not-exist/DESCRIPTION": 404 ("Not Found")
guix import: error: couldn't find meta-data for R package

### go
guix import: warning: Failed to import package "really-does-not-exist".
reason: "https://proxy.golang.org/really-does-not-exist/@v/list" could not be fetched: HTTP error 410 ("Gone").
This package and its dependencies won't be imported.
--8<---------------cut here---------------end--------------->8---

> Well, it is not worse for most of the importers.  And perhaps this patch
> is worth.  As explained in [1], all the recursive importers should be
> unified and the errors correctly handled, IMHO.  With jeko, we are
> pair-programming to work on it... but we are really slow. ;-)

Yes, this is very much just a stopgap. In your words (from #45984):

> Well, this patch set are trivial changes that quickly fix the current
> broken situation without a deep revamp.

I will follow up with an updated patch.

Regards,
Sarah




  reply	other threads:[~2021-06-25  4:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 20:49 [bug#49196] [PATCH] import: utils: 'recursive-import' skips unfound packages Sarah Morgensen via Guix-patches via
2021-06-24 12:21 ` zimoun
2021-06-25  4:22   ` Sarah Morgensen via Guix-patches via [this message]
2021-06-25  6:53     ` zimoun
2021-06-25 16:47     ` zimoun
2021-06-25  4:48 ` [bug#49196] [PATCH v2] " Sarah Morgensen via Guix-patches via
2021-06-25 16:37 ` [bug#49196] [PATCH v3 1/3] import: go: Return false for package not found zimoun
2021-06-25 16:37   ` [bug#49196] [PATCH v3 2/3] import: utils: Skip not found packages zimoun
2021-06-25 16:37   ` [bug#49196] [PATCH v3 3/3] import: go: Improve error handling zimoun
2021-06-27  4:46     ` [bug#49196] [PATCH] import: utils: 'recursive-import' skips unfound packages Sarah Morgensen via Guix-patches via
2021-06-28 11:42       ` zimoun
2021-06-28 17:13         ` Sarah Morgensen via Guix-patches via
2021-06-28 16:20 ` [bug#49196] [PATCH v4 1/3] import: go: Return false for package not found zimoun
2021-06-28 16:20   ` [bug#49196] [PATCH v4 2/3] import: utils: Skip not found packages zimoun
2021-06-28 16:20   ` [bug#49196] [PATCH v4 3/3] import: go: Improve error handling zimoun
2021-06-29 10:52 ` [bug#49196] [PATCH v5 1/3] import: go: Return false for package not found zimoun
2021-06-29 10:52   ` [bug#49196] [PATCH v5 2/3] import: utils: Skip not found packages zimoun
2021-06-29 10:52   ` [bug#49196] [PATCH v5 3/3] import: go: Improve error handling zimoun
2021-08-06 18:04 ` [bug#49196] [PATCH v6 1/3] import: go: Return false for package not found Sarah Morgensen
2021-08-06 18:05   ` [bug#49196] [PATCH v6 2/3] import: utils: Skip not found packages Sarah Morgensen
2021-08-06 18:05   ` [bug#49196] [PATCH v6 3/3] import: go: Improve error handling Sarah Morgensen
2021-09-01 21:39   ` bug#49196: [PATCH] "guix import go" " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86lf6y7eur.fsf_-_@mgsn.dev \
    --to=guix-patches@gnu.org \
    --cc=49196@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.