emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#26373: closed (Various improvements to the CRAN im


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#26373: closed (Various improvements to the CRAN importer)
Date: Tue, 16 May 2017 19:49:01 +0000

Your message dated Tue, 16 May 2017 21:48:16 +0200
with message-id <address@hidden>
and subject line Re: bug#26373: [PATCH 6/6] import cran: Skip updating when 
meta data cannot be downloaded.
has caused the debbugs.gnu.org bug report #26373,
regarding Various improvements to the CRAN importer
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
26373: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26373
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Various improvements to the CRAN importer Date: Wed, 05 Apr 2017 18:40:02 +0200 User-agent: mu4e 0.9.18; emacs 25.1.1
The following patch series improves the CRAN importer.




--- End Message ---
--- Begin Message --- Subject: Re: bug#26373: [PATCH 6/6] import cran: Skip updating when meta data cannot be downloaded. Date: Tue, 16 May 2017 21:48:16 +0200 User-agent: mu4e 0.9.18; emacs 25.2.1
Ludovic Courtès <address@hidden> writes:

> Ricardo Wurmus <address@hidden> skribis:
>
>> Ludovic Courtès <address@hidden> writes:
>>
>>> Ricardo Wurmus <address@hidden> skribis:
>>>
>>>> * gnu/packages/bioinformatics.scm (latest-cran-release,
>>>> latest-bioconductor-release): Abort early when meta data cannot be 
>>>> downloaded.
>>>> ---
>>>>  guix/import/cran.scm | 6 ++++--
>>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/guix/import/cran.scm b/guix/import/cran.scm
>>>> index 557d694ad..fc7a1ed84 100644
>>>> --- a/guix/import/cran.scm
>>>> +++ b/guix/import/cran.scm
>>>> @@ -398,7 +398,8 @@ dependencies."
>>>>      (package->upstream-name package))
>>>>
>>>>    (define meta
>>>> -    (fetch-description 'cran upstream-name))
>>>> +    (false-if-exception
>>>> +     (fetch-description 'cran upstream-name)))
>>>
>>> I would prefer catching only the relevant exception.  So I suppose
>>> something like:
>>>
>>>   (guard (c ((http-get-error? c)
>>>              (if (= 404 (http-get-error-code c))
>>>                  #f
>>>                  (raise c))))
>>>     (fetch-description 'cran upstream-name))
>>>
>>> However I see that ‘fetch-description’ already does that, so what
>>> exceptions are we protecting against?
>>
>> I don’t know what the desired behaviour here is.  When updating
>> packages, I think it’s good to keep going.  If there’s an error
>> downloading the package meta data I want “meta” to be “#f”, which leads
>> to skipping the update.
>>
>> Without turning errors to “#f” I wasn’t able to just update all packages
>> with “guix refresh -t cran,bioconductor -u”.
>
> What was the exception?
>
> I think a good approach is to catch precisely the kind of error that we
> don’t want to see.  ‘false-if-exception’ catches everything and could
> thus hide genuine errors/bugs (including unbound variables and similar),
> which sounds undesirable.
>
> WDYT?

I don’t remember why I wanted this, so I didn’t push this patch.  I
agree that it’s much better to catch errors precisely.

Thanks for the review!  I pushed all the other patches (with the
exception of one that Mathieu had already implemented independently) to
master.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]