* [bug#50884] [PATCH] import: go: Handle extra whitespace in "go-import" meta tags.
@ 2021-09-29 2:49 Sarah Morgensen
2021-10-04 14:07 ` bug#50884: " Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Sarah Morgensen @ 2021-09-29 2:49 UTC (permalink / raw)
To: 50884
Some packages sites use extra whitespace in the content portion of <meta
name="go-import" ...> tags, so handle that. Example:
<https://k8s.io/api?go-get=1>
* guix/import/go.scm (fetch-module-meta-data)[go-import->module-meta]:
Use 'string-tokenize' instead of 'string-split'.
---
guix/import/go.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/import/go.scm b/guix/import/go.scm
index 9769b557ae..ca909ab35a 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -474,7 +474,7 @@ Optionally include a VERSION string to append to the name."
because goproxy servers don't currently provide all the information needed to
build a package."
(define (go-import->module-meta content-text)
- (match (string-split content-text #\space)
+ (match (string-tokenize content-text char-set:graphic)
((root-path vcs repo-url)
(make-module-meta root-path (string->symbol vcs)
(strip-.git-suffix/maybe repo-url)))))
base-commit: c582be4c38596a6a31a39c6799723dcd8b6eb909
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#50884: [PATCH] import: go: Handle extra whitespace in "go-import" meta tags.
2021-09-29 2:49 [bug#50884] [PATCH] import: go: Handle extra whitespace in "go-import" meta tags Sarah Morgensen
@ 2021-10-04 14:07 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2021-10-04 14:07 UTC (permalink / raw)
To: Sarah Morgensen; +Cc: 50884-done
Sarah Morgensen <iskarian@mgsn.dev> skribis:
> Some packages sites use extra whitespace in the content portion of <meta
> name="go-import" ...> tags, so handle that. Example:
> <https://k8s.io/api?go-get=1>
>
> * guix/import/go.scm (fetch-module-meta-data)[go-import->module-meta]:
> Use 'string-tokenize' instead of 'string-split'.
Applied, thanks! Would it make sense to have a regression test?
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-04 14:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-29 2:49 [bug#50884] [PATCH] import: go: Handle extra whitespace in "go-import" meta tags Sarah Morgensen
2021-10-04 14:07 ` bug#50884: " Ludovic Courtès
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).