From: Simon Tournier <zimon.toutoune@gmail.com>
To: 63647@debbugs.gnu.org
Cc: Simon Tournier <zimon.toutoune@gmail.com>
Subject: [bug#63647] [PATCH v2 1/3] guix: import: go: Sort hint about available versions.
Date: Thu, 25 May 2023 17:41:10 +0200 [thread overview]
Message-ID: <a520128590d4b67af4c2b22ae167590b99e449dd.1685029183.git.zimon.toutoune@gmail.com> (raw)
In-Reply-To: <cover.1684771100.git.zimon.toutoune@gmail.com>
* 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
next prev parent reply other threads:[~2023-05-25 15:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 16:04 [bug#63647] [PATCH 0/2] Fix annoyance with "guix import go" Simon Tournier
2023-05-22 16:08 ` [bug#63647] [PATCH 1/2] guix: import: go: Sort hint about available versions Simon Tournier
2023-05-22 16:08 ` [bug#63647] [PATCH 2/2] guix: import: go: Catch Git error Simon Tournier
2023-05-25 15:41 ` Simon Tournier [this message]
2023-05-25 15:41 ` [bug#63647] [PATCH v2 2/3] " Simon Tournier
2023-05-25 15:41 ` [bug#63647] [PATCH v2 3/3] guix: import: go: Use correct tag for go module in subdirectory Simon Tournier
2023-05-25 16:07 ` [bug#63647] [PATCH v3 1/3] guix: import: go: Sort hint about available versions Simon Tournier
2023-05-25 16:07 ` [bug#63647] [PATCH v3 2/3] guix: import: go: Catch Git error Simon Tournier
2023-06-05 12:45 ` [bug#63647] [PATCH 0/2] Fix annoyance with "guix import go" Ludovic Courtès
2023-06-06 6:21 ` Simon Tournier
2023-06-06 15:42 ` Ludovic Courtès
2023-05-25 16:07 ` [bug#63647] [PATCH v3 3/3] guix: import: go: Use correct tag for go module in subdirectory Simon Tournier
2023-06-05 12:43 ` [bug#63647] [PATCH 0/2] Fix annoyance with "guix import go" Ludovic Courtès
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=a520128590d4b67af4c2b22ae167590b99e449dd.1685029183.git.zimon.toutoune@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=63647@debbugs.gnu.org \
/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).