GNU bug report logs - #36653
[PATCH] guix import stackage: default to a LTS release compatible with GHC 8.4

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Robert Vollmert <rob@HIDDEN>; Keywords: patch; dated Sun, 14 Jul 2019 19:40:04 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 36653 <at> debbugs.gnu.org:


Received: (at 36653) by debbugs.gnu.org; 17 Aug 2019 13:53:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 17 09:53:05 2019
Received: from localhost ([127.0.0.1]:55433 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hyz8j-0001yY-0I
	for submit <at> debbugs.gnu.org; Sat, 17 Aug 2019 09:53:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1hyz8g-0001xe-AC
 for 36653 <at> debbugs.gnu.org; Sat, 17 Aug 2019 09:53:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41492)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1hyz8a-0000Ph-81; Sat, 17 Aug 2019 09:52:56 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57936 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1hyz8Z-00055y-S1; Sat, 17 Aug 2019 09:52:56 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Robert Vollmert <rob@HIDDEN>
Subject: Re: [bug#36653] [PATCH v2] guix import stackage: default to a LTS
 release compatible with GHC 8.4
References: <20190714193843.23405-1-rob@HIDDEN>
 <20190716134122.21947-1-rob@HIDDEN>
Date: Sat, 17 Aug 2019 15:52:53 +0200
In-Reply-To: <20190716134122.21947-1-rob@HIDDEN> (Robert Vollmert's
 message of "Tue, 16 Jul 2019 15:41:23 +0200")
Message-ID: <87lfvrew5m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36653
Cc: 36653 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Robert,

Too bad this patch is still in the queue!  I=E2=80=99m not familiar with
Stackage but I trust your judgment.  One minor comment:

Robert Vollmert <rob@HIDDEN> skribis:

> In particular, this means that guix lint won't warn to update to
> versions that won't necessarily fit our package set well.
>
> Also some minor clean-up tweaks.
>
> * guix/import/stackage.scm (%stackage-url): Change to https, avoiding
> redirect log messages.
> (%default-lts-version): New field.
> (stackage-lts-info-fetch, stackage->guix-package, latest-lts-release): Us=
e it.
> (lts-info-ghc-version): Remove unused function.
> (lts-info-packages, latest-lts-release): Fix documentation typos.

[...]

> +;;; Latest LTS version compatible with bundled ghc version.
> +(define %default-lts-version "12.26")

What about storing this elsewhere?  Perhaps in the =E2=80=98properties=E2=
=80=99 field of
the =E2=80=98ghc=E2=80=99 package?  That should make it easier to keep thes=
e numbers in
sync.

Besides, it=E2=80=99s usually clearer to separate unrelated cleanups, but i=
t=E2=80=99s
no big deal in this case.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#36653; Package guix-patches. Full text available.

Message received at 36653 <at> debbugs.gnu.org:


Received: (at 36653) by debbugs.gnu.org; 16 Jul 2019 13:42:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 16 09:42:28 2019
Received: from localhost ([127.0.0.1]:49752 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hnNiu-0000ej-GC
	for submit <at> debbugs.gnu.org; Tue, 16 Jul 2019 09:42:28 -0400
Received: from mx2.mailbox.org ([80.241.60.215]:36238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rob@HIDDEN>) id 1hnNis-0000eS-7s
 for 36653 <at> debbugs.gnu.org; Tue, 16 Jul 2019 09:42:27 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240])
 (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
 (No client certificate requested)
 by mx2.mailbox.org (Postfix) with ESMTPS id 545D3A10F4;
 Tue, 16 Jul 2019 15:42:18 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
Received: from smtp1.mailbox.org ([80.241.60.240])
 by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de
 [80.241.56.117]) (amavisd-new, port 10030)
 with ESMTP id ic_YHW4vNtku; Tue, 16 Jul 2019 15:41:59 +0200 (CEST)
From: Robert Vollmert <rob@HIDDEN>
To: 36653 <at> debbugs.gnu.org
Subject: [PATCH v2] guix import stackage: default to a LTS release compatible
 with GHC 8.4
Date: Tue, 16 Jul 2019 15:41:23 +0200
Message-Id: <20190716134122.21947-1-rob@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 36653
Cc: Robert Vollmert <rob@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

In particular, this means that guix lint won't warn to update to
versions that won't necessarily fit our package set well.

Also some minor clean-up tweaks.

* guix/import/stackage.scm (%stackage-url): Change to https, avoiding
redirect log messages.
(%default-lts-version): New field.
(stackage-lts-info-fetch, stackage->guix-package, latest-lts-release): Use it.
(lts-info-ghc-version): Remove unused function.
(lts-info-packages, latest-lts-release): Fix documentation typos.
---

This fixes the patch to *also* apply to normal use of `guix import stackage`,
as originally intended.

 guix/import/stackage.scm | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index 1c1e73a723..f845da4b27 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -39,15 +39,13 @@
 ;;; Stackage info fetcher and access functions
 ;;;
 
-(define %stackage-url "http://www.stackage.org")
+(define %stackage-url "https://www.stackage.org")
 
-(define (lts-info-ghc-version lts-info)
-  "Retruns the version of the GHC compiler contained in LTS-INFO."
-  (and=> (assoc-ref lts-info "snapshot")
-         (cut assoc-ref <> "ghc")))
+;;; Latest LTS version compatible with bundled ghc version.
+(define %default-lts-version "12.26")
 
 (define (lts-info-packages lts-info)
-  "Retruns the alist of packages contained in LTS-INFO."
+  "Returns the alist of packages contained in LTS-INFO."
   (or (assoc-ref lts-info "packages") '()))
 
 (define (leave-with-message fmt . args)
@@ -57,9 +55,11 @@
   ;; "Retrieve the information about the LTS Stackage release VERSION."
   (memoize
    (lambda* (#:optional (version ""))
-     (let* ((url (if (string=? "" version)
-                     (string-append %stackage-url "/lts")
-                     (string-append %stackage-url "/lts-" version)))
+     (let* ((url (string-append %stackage-url
+                                "/lts-"
+                                (if (string=? "" version)
+                                    %default-lts-version
+                                    version)))
             (lts-info (json-fetch-alist url)))
        (if lts-info
            (reverse lts-info)
@@ -90,7 +90,7 @@
    (lambda* (package-name ; upstream name
              #:key
              (include-test-dependencies? #t)
-             (lts-version "")
+             (lts-version %default-lts-version)
              (packages-info
               (lts-info-packages
                (stackage-lts-info-fetch lts-version))))
@@ -119,10 +119,12 @@ included in the Stackage LTS release."
 ;;;
 
 (define latest-lts-release
-  (let ((pkgs-info (mlambda () (lts-info-packages (stackage-lts-info-fetch)))))
+  (let ((pkgs-info
+        (mlambda () (lts-info-packages
+                     (stackage-lts-info-fetch %default-lts-version)))))
     (lambda* (package)
       "Return an <upstream-source> for the latest Stackage LTS release of
-PACKAGE or #f it the package is not inlucded in the Stackage LTS release."
+PACKAGE or #f it the package is not included in the Stackage LTS release."
       (let* ((hackage-name (guix-package->hackage-name package))
              (version (lts-package-version (pkgs-info) hackage-name))
              (name-version (hackage-name-version hackage-name version)))
-- 
2.20.1 (Apple Git-117)





Information forwarded to guix-patches@HIDDEN:
bug#36653; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Jul 2019 19:39:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 14 15:39:07 2019
Received: from localhost ([127.0.0.1]:45998 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hmkKx-0005ae-AY
	for submit <at> debbugs.gnu.org; Sun, 14 Jul 2019 15:39:07 -0400
Received: from lists.gnu.org ([209.51.188.17]:36609)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rob@HIDDEN>) id 1hmkKu-0005aI-Bx
 for submit <at> debbugs.gnu.org; Sun, 14 Jul 2019 15:39:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40810)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <rob@HIDDEN>) id 1hmkKt-0006vI-3H
 for guix-patches@HIDDEN; Sun, 14 Jul 2019 15:39:04 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rob@HIDDEN>) id 1hmkKr-0002wh-TT
 for guix-patches@HIDDEN; Sun, 14 Jul 2019 15:39:03 -0400
Received: from mx1.mailbox.org ([80.241.60.212]:10598)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rob@HIDDEN>) id 1hmkKr-0002vT-N8
 for guix-patches@HIDDEN; Sun, 14 Jul 2019 15:39:01 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241])
 (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
 (No client certificate requested)
 by mx1.mailbox.org (Postfix) with ESMTPS id 437EF4EC43;
 Sun, 14 Jul 2019 21:38:58 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
Received: from smtp2.mailbox.org ([80.241.60.241])
 by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de
 [80.241.56.117]) (amavisd-new, port 10030)
 with ESMTP id p-M5N2K1ZmeI; Sun, 14 Jul 2019 21:38:48 +0200 (CEST)
From: Robert Vollmert <rob@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guix import stackage: default to a LTS release compatible
 with GHC 8.4
Date: Sun, 14 Jul 2019 21:38:43 +0200
Message-Id: <20190714193843.23405-1-rob@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 80.241.60.212
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
Cc: Robert Vollmert <rob@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

In particular, this means that guix lint won't warn to update to
versions that won't necessarily fit our package set well.

Also some minor clean-up tweaks.

* guix/import/stackage.scm (%stackage-url): Change to https, avoiding
redirect log messages.
(%default-lts-version): New field.
(stackage->guix-package, latest-lts-release): Use it.
(lts-info-ghc-version): Remove unused function.
(lts-info-packages, latest-lts-release): Fix documentation typos.
---
 guix/import/stackage.scm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index 1c1e73a723..de12ae4cb9 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -39,15 +39,13 @@
 ;;; Stackage info fetcher and access functions
 ;;;
=20
-(define %stackage-url "http://www.stackage.org")
+(define %stackage-url "https://www.stackage.org")
=20
-(define (lts-info-ghc-version lts-info)
-  "Retruns the version of the GHC compiler contained in LTS-INFO."
-  (and=3D> (assoc-ref lts-info "snapshot")
-         (cut assoc-ref <> "ghc")))
+;;; Latest LTS version compatible with bundled ghc version.
+(define %default-lts-version "12.26")
=20
 (define (lts-info-packages lts-info)
-  "Retruns the alist of packages contained in LTS-INFO."
+  "Returns the alist of packages contained in LTS-INFO."
   (or (assoc-ref lts-info "packages") '()))
=20
 (define (leave-with-message fmt . args)
@@ -90,7 +88,7 @@
    (lambda* (package-name ; upstream name
              #:key
              (include-test-dependencies? #t)
-             (lts-version "")
+             (lts-version %default-lts-version)
              (packages-info
               (lts-info-packages
                (stackage-lts-info-fetch lts-version))))
@@ -119,10 +117,12 @@ included in the Stackage LTS release."
 ;;;
=20
 (define latest-lts-release
-  (let ((pkgs-info (mlambda () (lts-info-packages (stackage-lts-info-fet=
ch)))))
+  (let ((pkgs-info
+        (mlambda () (lts-info-packages
+                     (stackage-lts-info-fetch %default-lts-version)))))
     (lambda* (package)
       "Return an <upstream-source> for the latest Stackage LTS release o=
f
-PACKAGE or #f it the package is not inlucded in the Stackage LTS release=
."
+PACKAGE or #f it the package is not included in the Stackage LTS release=
."
       (let* ((hackage-name (guix-package->hackage-name package))
              (version (lts-package-version (pkgs-info) hackage-name))
              (name-version (hackage-name-version hackage-name version)))
--=20
2.20.1 (Apple Git-117)





Acknowledgement sent to Robert Vollmert <rob@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#36653; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 17 Aug 2019 14:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.