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

Previous Next

Package: guix-patches;

Reported by: Robert Vollmert <rob <at> vllmrt.net>

Date: Sun, 14 Jul 2019 19:40:04 UTC

Severity: normal

Tags: patch

Done: Timothy Sample <samplet <at> ngyro.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36653 in the body.
You can then email your comments to 36653 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36653; Package guix-patches. (Sun, 14 Jul 2019 19:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Vollmert <rob <at> vllmrt.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 14 Jul 2019 19:40:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Robert Vollmert <rob <at> vllmrt.net>
To: guix-patches <at> gnu.org
Cc: Robert Vollmert <rob <at> vllmrt.net>
Subject: [PATCH] guix import stackage: default to a LTS release compatible
 with GHC 8.4
Date: Sun, 14 Jul 2019 21:38:43 +0200
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
 ;;;
 
-(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)
@@ -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."
 ;;;
 
 (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 <at> gnu.org:
bug#36653; Package guix-patches. (Tue, 16 Jul 2019 13:43:01 GMT) Full text and rfc822 format available.

Message #8 received at 36653 <at> debbugs.gnu.org (full text, mbox):

From: Robert Vollmert <rob <at> vllmrt.net>
To: 36653 <at> debbugs.gnu.org
Cc: Robert Vollmert <rob <at> vllmrt.net>
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
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 <at> gnu.org:
bug#36653; Package guix-patches. (Sat, 17 Aug 2019 13:54:02 GMT) Full text and rfc822 format available.

Message #11 received at 36653 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Robert Vollmert <rob <at> vllmrt.net>
Cc: 36653 <at> debbugs.gnu.org
Subject: Re: [bug#36653] [PATCH v2] guix import stackage: default to a LTS
 release compatible with GHC 8.4
Date: Sat, 17 Aug 2019 15:52:53 +0200
Hi Robert,

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

Robert Vollmert <rob <at> vllmrt.net> 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): Use 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 ‘properties’ field of
the ‘ghc’ package?  That should make it easier to keep these numbers in
sync.

Besides, it’s usually clearer to separate unrelated cleanups, but it’s
no big deal in this case.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36653; Package guix-patches. (Thu, 14 Nov 2019 19:04:01 GMT) Full text and rfc822 format available.

Message #14 received at 36653 <at> debbugs.gnu.org (full text, mbox):

From: John Soo <jsoo1 <at> asu.edu>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: guix-devel <guix-devel <at> gnu.org>, Timothy Sample <samplet <at> ngyro.com>,
 36653 <at> debbugs.gnu.org
Subject: Re: Stackage LTS 14
Date: Thu, 14 Nov 2019 11:03:13 -0800
Hey everyone,

When we bump to Stackage 14 can issue 36653 be closed?

- John




Information forwarded to guix-patches <at> gnu.org:
bug#36653; Package guix-patches. (Thu, 14 Nov 2019 20:31:02 GMT) Full text and rfc822 format available.

Message #17 received at 36653 <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: John Soo <jsoo1 <at> asu.edu>
Cc: guix-devel <guix-devel <at> gnu.org>, 36653 <at> debbugs.gnu.org,
 Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: Stackage LTS 14
Date: Thu, 14 Nov 2019 15:30:30 -0500
Hi John,

John Soo <jsoo1 <at> asu.edu> writes:

> When we bump to Stackage 14 can issue 36653 be closed?

I think these changes should still be merged (with review and fixes).
Eventually Stackage LTS 15 will come out while we’re still on LTS 14.
At that point, we will have the same issue with the importer and linter
giving us information about LTS 15 when we only want LTS 14.


-- Tim




Information forwarded to guix-patches <at> gnu.org:
bug#36653; Package guix-patches. (Thu, 14 Nov 2019 21:11:01 GMT) Full text and rfc822 format available.

Message #20 received at 36653 <at> debbugs.gnu.org (full text, mbox):

From: John Soo <jsoo1 <at> asu.edu>
To: Timothy Sample <samplet <at> ngyro.com>
Cc: guix-devel <guix-devel <at> gnu.org>, 36653 <at> debbugs.gnu.org,
 Marius Bakke <mbakke <at> fastmail.com>
Subject: Re: Stackage LTS 14
Date: Thu, 14 Nov 2019 13:09:58 -0800
Ah, ok makes sense!




Reply sent to Timothy Sample <samplet <at> ngyro.com>:
You have taken responsibility. (Tue, 03 Nov 2020 20:56:02 GMT) Full text and rfc822 format available.

Notification sent to Robert Vollmert <rob <at> vllmrt.net>:
bug acknowledged by developer. (Tue, 03 Nov 2020 20:56:02 GMT) Full text and rfc822 format available.

Message #25 received at 36653-done <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36653-done <at> debbugs.gnu.org, Robert Vollmert <rob <at> vllmrt.net>
Subject: Re: [bug#36653] [PATCH v2] guix import stackage: default to a LTS
 release compatible with GHC 8.4
Date: Tue, 03 Nov 2020 15:55:00 -0500
Hello,

Over a year later, and I finally went ahead and pushed this!  See commit
f0bb2662bb05625042094e124521197c5f43505e.

Ludovic Courtès <ludo <at> gnu.org> writes:

> Robert Vollmert <rob <at> vllmrt.net> skribis:
>
>> +;;; Latest LTS version compatible with bundled ghc version.
>> +(define %default-lts-version "12.26")
>
> What about storing this elsewhere?  Perhaps in the ‘properties’ field of
> the ‘ghc’ package?  That should make it easier to keep these numbers in
> sync.

That’s true, but we already have this problem with the Hackage importer.
It has a version-specific list of packages included with GHC.  It’s true
that two wrongs don’t make a right, but having this patch in place –
even with shortcomings – will prevent real problems.  Besides, we can
always fix it later.

> Besides, it’s usually clearer to separate unrelated cleanups, but it’s
> no big deal in this case.

Agreed.  (The typos were fixed in the interim, but I let the “https”
change hitch a ride along with the LTS version stuff.)

Anyway, this will pave the way for a lint check and then we can finally
put an end to the Haskell package roll-backs.  :)


-- Tim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 02 Dec 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 145 days ago.

Previous Next


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