GNU bug report logs - #63647
[PATCH 0/2] Fix annoyance with "guix import go"

Previous Next

Package: guix-patches;

Reported by: Simon Tournier <zimon.toutoune <at> gmail.com>

Date: Mon, 22 May 2023 16:06:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: 63647 <at> debbugs.gnu.org
Cc: Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: [PATCH 1/2] guix: import: go: Sort hint about available versions.
Date: Mon, 22 May 2023 18:08:16 +0200
* guix/import/go.scm (validate-version): Sort available versions.
---
 guix/import/go.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 0357e6a1eb..1943869162 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -34,6 +34,7 @@ (define-module (guix import go)
   #:use-module (guix packages)
   #:use-module (guix http-client)
   #:use-module (guix memoization)
+  #:use-module (guix utils)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
   #:autoload   (guix base32) (bytevector->nix-base32-string)
   #:autoload   (guix build utils) (mkdir-p)
@@ -588,8 +589,9 @@ (define (validate-version version available-versions module-path)
         (condition (&fix-hint
                     (hint (format #f (G_ "Pick one of the following \
 available versions:~{ ~a~}.")
-                                  (map strip-v-prefix
-                                       available-versions)))))))))
+                                  (sort (map strip-v-prefix
+                                             available-versions)
+                                        version>?)))))))))
 
 (define* (go-module->guix-package module-path #:key
                                   (goproxy "https://proxy.golang.org")
-- 
2.38.1





This bug report was last modified 93 days ago.

Previous Next


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