GNU bug report logs -
#50885
[PATCH] import: go: Recognize major version suffixes.
Previous Next
Reported by: Sarah Morgensen <iskarian <at> mgsn.dev>
Date: Wed, 29 Sep 2021 03:00:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50885 in the body.
You can then email your comments to 50885 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#50885
; Package
guix-patches
.
(Wed, 29 Sep 2021 03:00:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sarah Morgensen <iskarian <at> mgsn.dev>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 29 Sep 2021 03:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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'.
---
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 ca909ab35a..26dbc34b63 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
base-commit: c582be4c38596a6a31a39c6799723dcd8b6eb909
prerequisite-patch-id: dbb8a05982f57aefffd5b97ab3dac4073b48245d
--
2.33.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Mon, 04 Oct 2021 14:09:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sarah Morgensen <iskarian <at> mgsn.dev>
:
bug acknowledged by developer.
(Mon, 04 Oct 2021 14:09:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 50885-done <at> debbugs.gnu.org (full text, mbox):
Sarah Morgensen <iskarian <at> mgsn.dev> skribis:
> 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'.
Applied as well, but I feel that it may be useful to have tests for
these fine points that where regressions would otherwise be hard to
notice.
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 02 Nov 2021 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.