[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/07: import: go: Fix import when import path redirects.
From: |
guix-commits |
Subject: |
05/07: import: go: Fix import when import path redirects. |
Date: |
Tue, 7 Sep 2021 10:09:30 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e8a67f0fc4f7274d2447ac247df60b69d98e1b4e
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Mon Aug 30 19:05:19 2021 -0700
import: go: Fix import when import path redirects.
* guix/import/go.scm (fetch-module-meta-data): If no meta entries
have a matching import prefix, return the first entry instead of #f.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
guix/import/go.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/guix/import/go.scm b/guix/import/go.scm
index 4755571..c6ecdba 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -485,9 +485,12 @@ build a package."
(match (select (html->sxml meta-data #:strict? #t))
(() #f) ;nothing selected
((('content content-text) ..1)
- (find (lambda (meta)
- (string-prefix? (module-meta-import-prefix meta) module-path))
- (map go-import->module-meta content-text))))))
+ (or
+ (find (lambda (meta)
+ (string-prefix? (module-meta-import-prefix meta) module-path))
+ (map go-import->module-meta content-text))
+ ;; Fallback to the first meta if no import prefixes match.
+ (go-import->module-meta (first content-text)))))))
(define (module-meta-data-repo-url meta-data goproxy)
"Return the URL where the fetcher which will be used can download the
- branch master updated (5cfe5dd -> 3d42aa3), guix-commits, 2021/09/07
- 02/07: import: Add hint for importer typo., guix-commits, 2021/09/07
- 01/07: gnu: racket-minimal: Remove top-level reference to 'chez-scheme'., guix-commits, 2021/09/07
- 04/07: import: elpa: Support NonGNU ELPA., guix-commits, 2021/09/07
- 07/07: gnu: mandoc: Add $MANPATH to native-search-paths., guix-commits, 2021/09/07
- 06/07: emacs-org-roam: Add new phase after unpack., guix-commits, 2021/09/07
- 03/07: system: Add hint for action typo., guix-commits, 2021/09/07
- 05/07: import: go: Fix import when import path redirects.,
guix-commits <=