Subject: Re: [bug#50618] [PATCH] import: stackage: Don’ttry to update packages not available on Stackage.

From: Xinglu Chen <[email-masked]>
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.