From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WLSJGb6Ta2QQ9wAASxT56A (envelope-from ) for ; Mon, 22 May 2023 18:09:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SBaIGb6Ta2SKLgEA9RJhRA (envelope-from ) for ; Mon, 22 May 2023 18:09:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 32C1D2CFE3 for ; Mon, 22 May 2023 18:09:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q185s-0005nh-6w; Mon, 22 May 2023 12:09:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q185m-0005nE-P9 for guix-patches@gnu.org; Mon, 22 May 2023 12:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q185m-0001vm-Fn for guix-patches@gnu.org; Mon, 22 May 2023 12:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q185m-00066w-BJ for guix-patches@gnu.org; Mon, 22 May 2023 12:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63647] [PATCH 1/2] guix: import: go: Sort hint about available versions. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 May 2023 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63647@debbugs.gnu.org Cc: Simon Tournier Received: via spool by 63647-submit@debbugs.gnu.org id=B63647.168477171323442 (code B ref 63647); Mon, 22 May 2023 16:09:02 +0000 Received: (at 63647) by debbugs.gnu.org; 22 May 2023 16:08:33 +0000 Received: from localhost ([127.0.0.1]:36044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q185I-000661-Mi for submit@debbugs.gnu.org; Mon, 22 May 2023 12:08:32 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:41138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q185F-00065g-MV for 63647@debbugs.gnu.org; Mon, 22 May 2023 12:08:31 -0400 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3f5dbdbb477so3863195e9.0 for <63647@debbugs.gnu.org>; Mon, 22 May 2023 09:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684771704; x=1687363704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I3d9niv4mWlH5hxD8Q+v9x5ZNqotjYBaQ/qiGR/672s=; b=gzmjQLjKnIEBo2T1Dlf9MapU3tcPdU0umIN9soCTJVt77fRFJUObG7rgyYluyeEPHO DgiUyAwHrBAt2fDqc4zr/raYlhwqvOzVVi3XyjMipj/PB9zVTgFKM/+cQxYBsYhL0GAI S/FBDF/xXuFlZnYrBiuPwc1MP9dVHLLMOk6n+aRSpqXjdCh+u075G/1WIAJtovLOPLGo 2ItN4ftdx5K0lJ474OfsxaZeOjVJXC2Fes0ORxn9Aglt8rILpXwVt+/eEswRcEy4CFJH 613ywU3JbKwvlLER6D1fzkdAL3gw+fPL9qFasarshA5aGI8QByuKETNqRcGVe8voxq56 j+fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684771704; x=1687363704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I3d9niv4mWlH5hxD8Q+v9x5ZNqotjYBaQ/qiGR/672s=; b=CGYTEdOks0H3a8rfTrcdUEcrRXXkuToAiSRR2owLlc9Qdytq97n5BxrEA4gS6uhwSX o/SU+owYt5wyQ85pZOIRFcUbBtz9KamIFb2TplEkvSYOdvVH90rZIYhMbg+7aBiy/NWO DzIk2vyFeLmlPG4iVJWUqJcEMV7dzdmNSOU8gT20reeQP8q/t67Ybu6ltJXFox/61VmR zXL3bwzHX/prNXl9w6rmlRK6t4SRrc6Sbh4U+QKlTnWFmXcSSf8D1blR2CNheaa3fd2o QdOBofFf1hrirPHwlIg2auAAWLpvEvD2bYakHBRQ7LvaHb+4Jps9SY6B1NDKP6Ez42pK g/kw== X-Gm-Message-State: AC+VfDzDVX1ExnPuZBRXUXTpwtRYX37zE0y6IBHWUqdZ1iUMJpk83GCJ DIjiCiVBuNMpZPFEKRT0rIGYHGyv5sw= X-Google-Smtp-Source: ACHHUZ4hqxr7fVpw5eryfs28vFrKWQbPO9Pz3Q8oXA5ODLKBXzPSe+fLLrV2dh9+sI64+VlZJikbuw== X-Received: by 2002:a05:600c:3ba5:b0:3f5:ffe8:94ac with SMTP id n37-20020a05600c3ba500b003f5ffe894acmr5189617wms.0.1684771703595; Mon, 22 May 2023 09:08:23 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id u3-20020a7bc043000000b003f4f89bc48dsm12025107wmc.15.2023.05.22.09.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 09:08:23 -0700 (PDT) From: Simon Tournier Date: Mon, 22 May 2023 18:08:16 +0200 Message-Id: <5cb8f8989fccc4580d10b7e39633f8880c838236.1684771100.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684771774; a=rsa-sha256; cv=none; b=PWB3dkzqKZkomhEDvBhyDLEuIiN165Obae3oL3ABPDCoPwxh5V2P9wK91bKikNFmm6xU92 3EILckm6iyuDOlthiob4GBA2LsCk5Pq5bcr15r8nha87rawaNpH3o8PqZgbTmfl9FfK0Fn CjTO7mHMyLTa0R7SjiUDTarHTETRV+1O7yXlbUGXGieeGSaD8LyzCoV82AnLLMU1w2u5H9 RicusrZwUCKgzxSV7SSLvcCB837c2dfidZVFyinkScJdHAD/u/efqw6DQ+nwdaWlQ3fvPL whD7gkPgjML2FiGRMDpw4q58Szp/cJlXNg6USQePCOJn0q5BsGhIOPo9ZZBojQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=gzmjQLjK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684771774; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=I3d9niv4mWlH5hxD8Q+v9x5ZNqotjYBaQ/qiGR/672s=; b=M9Z6bZ4jgyurzoL828X0j8ZdCRT6lSIwRHEmubej34iaCma3gzq5efdNeCNojRQYaZKZoD uiddtJIa5ELmOBWG2tTDABdtnL/R1OD/K3e/7PmzElXMHnFVhH+Uyd8cgtMLqeqndTEgrL qN/QJpjvItUDAG5D9lqpcLL3CpvBob54feM+hMQepu6NzOGAWHd4aI5MKfbsEhwwoGrmUH vjlI8AuMiwqwZGI136OnI0s1ENQb5CZOxGUbM40a5BKV3nlOs/nzW2/OXr1IKTjDlWAsfV h3DNpnDd7VbCXLtEg/ZyHJHsW/4+wFJ+y+tAKYM13jPR0a+3nB/SebD1urS95g== X-Migadu-Spam-Score: -2.67 X-Spam-Score: -2.67 X-Migadu-Queue-Id: 32C1D2CFE3 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=gzmjQLjK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: WOVKutoESzWC * 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