GNU bug report logs -
#63647
[PATCH 0/2] Fix annoyance with "guix import go"
Previous Next
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
View this message in rfc822 format
* 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")
base-commit: 99fc7e5dd3c9c92f9b6c2e51db9dc5b0481a56b2
--
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.