[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45984] [PATCH 0/5] Fix recursive importers
From: |
zimoun |
Subject: |
[bug#45984] [PATCH 0/5] Fix recursive importers |
Date: |
Wed, 27 Jan 2021 00:16:35 +0100 |
Hi Ludo,
Thanks for the review.
On Tue, 26 Jan 2021 at 23:24, Ludovic Courtès <ludo@gnu.org> wrote:
>> $ guix import gem do-not-exist -r
>> #f
>>
>> $ ./pre-inst-env guix import gem do-not-exist -r
>> guix import: error: failed to download meta-data for package 'do-not-exist'
>
> I think we do want this error message. Why should we ignore
> non-existent packages when doing ‘-r’? It would think they’re still a
> problem, no?
Do you mean instead of displaying an error about the query (what the
patch does), displaying which dependent package has failed? Something
along these lines:
$ ./pre-inst-env guix import gem foo -r
guix import: error: failed to download meta-data for package 'bar'
If it is what you have in mind, it needs to really re-think how
’recursive-import’ works. Not only fixing the corner case. :-)
>> If I understand correctly, then the way the errors are reported could be
>> uniformized between all the importers, and maybe the snippet in the
>> subcommands
>> "guix import <from>" could be refactorized a bit.
>
> Probably. ‘-r’ started as an option specific to one importer, but now
> that most of them (?) support it, it’d make sense to rethink the
> interfaces.
If we agree on the first part (the function argument “#:key
repo->guix-package” provided to ’recursive-import’ should always return
’values’), then let rethink the interface and how the errors are
handled.
Cheers,
simon