all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xinglu Chen <public@yoctocell.xyz>
To: Lars-Dominik Braun <lars@6xq.net>
Cc: 50618@debbugs.gnu.org
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	[thread overview]
Message-ID: <87wnn8lrak.fsf@yoctocell.xyz> (raw)
In-Reply-To: <YUrIJHXn2JUyBFUd@noor.fritz.box>

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2021-09-22 12:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 11:31 [bug#50618] [PATCH] import: stackage: Don’t try to update packages not available on Stackage Xinglu Chen
2021-09-22  6:07 ` Lars-Dominik Braun
2021-09-22 12:37   ` Xinglu Chen [this message]
2021-09-22 15:31 ` [bug#50618] [PATCH v2] " Xinglu Chen
2021-09-27  9:18   ` Lars-Dominik Braun
2021-09-27  9:56     ` Xinglu Chen
2021-09-27 11:59       ` bug#50618: " Lars-Dominik Braun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnn8lrak.fsf@yoctocell.xyz \
    --to=public@yoctocell.xyz \
    --cc=50618@debbugs.gnu.org \
    --cc=lars@6xq.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.