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

From: Lars-Dominik Braun <[email-masked]>
Date: Wed, 22 Sep 2021 08:07:32 +0200

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.)

Cheers,
Lars