unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars-Dominik Braun <lars@6xq.net>
To: Xinglu Chen <public@yoctocell.xyz>
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 08:07:32 +0200	[thread overview]
Message-ID: <YUrIJHXn2JUyBFUd@noor.fritz.box> (raw)
In-Reply-To: <33ce44c6b5dc4f0c2ea2cf7a8402807d91e849a6.1631791821.git.public@yoctocell.xyz>

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





  reply	other threads:[~2021-09-22  6:08 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 [this message]
2021-09-22 12:37   ` Xinglu Chen
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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=YUrIJHXn2JUyBFUd@noor.fritz.box \
    --to=lars@6xq.net \
    --cc=50618@debbugs.gnu.org \
    --cc=public@yoctocell.xyz \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).