[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/09: import: go: Recognize major version suffixes.
From: |
guix-commits |
Subject: |
06/09: import: go: Recognize major version suffixes. |
Date: |
Mon, 4 Oct 2021 10:39:38 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 834ff65e8525a9a90545b34504a9098142e3163b
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Tue Sep 28 19:59:32 2021 -0700
import: go: Recognize major version suffixes.
Do not treat major version suffixes (such as "/v3") as repository
subdirectories. See <https://golang.org/ref/mod#major-version-suffixes>.
* guix/import/go.scm (go-module->guix-package): When determining the
unpack path, compare 'root-module-path' to 'module-path-sans-suffix'
instead of 'module-path'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
guix/import/go.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/guix/import/go.scm b/guix/import/go.scm
index ca909ab..26dbc34 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -612,6 +612,8 @@ hint: use one of the following available versions ~a\n"
(dependencies (if pin-versions?
dependencies+versions
(map car dependencies+versions)))
+ (module-path-sans-suffix
+ (match:prefix (string-match "([\\./]v[0-9]+)?$" module-path)))
(guix-name (go-module->guix-package-name module-path))
(root-module-path (module-path->repository-root module-path))
;; The VCS type and URL are not included in goproxy information. For
@@ -631,7 +633,7 @@ hint: use one of the following available versions ~a\n"
(build-system go-build-system)
(arguments
'(#:import-path ,module-path
- ,@(if (string=? module-path root-module-path)
+ ,@(if (string=? module-path-sans-suffix root-module-path)
'()
`(#:unpack-path ,root-module-path))))
,@(maybe-propagated-inputs
- branch master updated (766b779 -> 688a4db), guix-commits, 2021/10/04
- 01/09: maint: Improve default diff hunk header detection., guix-commits, 2021/10/04
- 04/09: gnu: Add mjpg-streamer., guix-commits, 2021/10/04
- 05/09: import: go: Handle extra whitespace in "go-import" meta tags., guix-commits, 2021/10/04
- 06/09: import: go: Recognize major version suffixes.,
guix-commits <=
- 02/09: doc: Update htmlxref.cnf., guix-commits, 2021/10/04
- 07/09: gnu: Add python-fitsio., guix-commits, 2021/10/04
- 03/09: doc: cookbook: Mention translations of the cookbook., guix-commits, 2021/10/04
- 08/09: gnu: kicad: Update to 5.1.10., guix-commits, 2021/10/04
- 09/09: ci: Allow manifests to contain any lowerable object., guix-commits, 2021/10/04