guix-patches
[Top][All Lists]
Advanced

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

[bug#50618] [PATCH] import: stackage: Don’t try to update packages not a


From: Xinglu Chen
Subject: [bug#50618] [PATCH] import: stackage: Don’t try to update packages not available on Stackage.
Date: Wed, 22 Sep 2021 14:37:39 +0200

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.

Attachment: signature.asc
Description: PGP signature


reply via email to

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