GNU bug report logs - #50618
[PATCH] import: stackage: Don’t try to update packages not available on Stackage.

Previous Next

Package: guix-patches;

Reported by: Xinglu Chen <public <at> yoctocell.xyz>

Date: Thu, 16 Sep 2021 11:33:01 UTC

Severity: normal

Tags: patch

Done: Lars-Dominik Braun <lars <at> 6xq.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 50618 <at> debbugs.gnu.org (full text, mbox):

From: Xinglu Chen <public <at> yoctocell.xyz>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Cc: 50618 <at> debbugs.gnu.org
Subject: Re: [bug#50618] [PATCH] import: stackage: Don’t
 try to update packages not available on Stackage.
Date: Wed, 22 Sep 2021 14:37:39 +0200
[Message part 1 (text/plain, inline)]
On Wed, Sep 22 2021, Lars-Dominik Braun wrote:

> Hi,
>
>> +(define (stackage-package? package)
>> +  "Whether PACKAGE is available on the default Stackage LTS release."
>> +  (and (hackage-package? package)
>> +       (guard (c ((and (http-get-error? c)
>> +                       (= 404 (http-get-error-code c)))
>> +                  #f))
>> +         (let* ((name (guix-package->hackage-name package))
>> +                (url (string-append (%stackage-url) "/lts-"
>> +                                    %default-lts-version "/package/" name)))
>> +           (http-fetch url)))))
>> +
> since stackage-lts-info-fetch is memoized, wouldn’t it be cheaper
> to look up the package there? (At least for lots of packages.)

Ah, good idea!  I will test if what the difference is terms of time.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 330 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.