[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/20: import: go: Do not set '%strict-tokenizer?' from the top level.
From: |
guix-commits |
Subject: |
09/20: import: go: Do not set '%strict-tokenizer?' from the top level. |
Date: |
Sun, 25 Apr 2021 08:37:54 -0400 (EDT) |
civodul pushed a commit to branch version-1.3.0
in repository guix.
commit 9406bb12ee9aa10a419eab0aa20bad3de70f9783
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Apr 22 11:43:50 2021 +0200
import: go: Do not set '%strict-tokenizer?' from the top level.
This avoids interference with other users of (htmlprag) and makes the
intent clearer.
* guix/import/go.scm <top level>: Remove call to '%strict-tokenizer?'.
(go-package-licenses, go-package-description)
(go-package-synopsis, fetch-module-meta-data): Pass #:strict? #t to
'html->sxml'.
---
guix/import/go.scm | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/guix/import/go.scm b/guix/import/go.scm
index bc53f8f..71f2316 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -63,9 +63,6 @@
#:export (go-module->guix-package
go-module-recursive-import))
-;;; Parameterize htmlprag to parse valid HTML more reliably.
-(%strict-tokenizer? #t)
-
;;; Commentary:
;;;
;;; (guix import go) attempts to make it easier to create Guix package
@@ -149,7 +146,7 @@ name (e.g. \"github.com/golang/protobuf/proto\")."
;; element marked with a "License" class attribute.
(select (sxpath `(// (* (@ (equal? (class "License"))))
h2 // *text*))))
- (select (html->sxml body))))
+ (select (html->sxml body #:strict? #t))))
(define (sxml->texi sxml-node)
"A very basic SXML to Texinfo converter which attempts to preserve HTML
@@ -167,7 +164,7 @@ formatting and links as text."
"Retrieve a short description for NAME, a Go package name,
e.g. \"google.golang.org/protobuf/proto\"."
(let* ((body (go.pkg.dev-info name))
- (sxml (html->sxml body))
+ (sxml (html->sxml body #:strict? #t))
(overview ((sxpath
`(//
(* (@ (equal? (class "Documentation-overview"))))
@@ -209,7 +206,7 @@ the https://pkg.go.dev/ web site."
(select-title (sxpath
`(// (div (@ (equal? (class "UnitReadme-content"))))
// h3 *text*))))
- (match (select-title (html->sxml body))
+ (match (select-title (html->sxml body #:strict? #t))
(() #f) ;nothing selected
((title more ...) ;title is the first string of the list
(string-trim-both title)))))
@@ -465,7 +462,7 @@ build a package."
(let* ((meta-data (http-fetch* (format #f "https://~a?go-get=1"
module-path)))
(select (sxpath `(// head (meta (@ (equal? (name "go-import"))))
// content))))
- (match (select (html->sxml meta-data))
+ (match (select (html->sxml meta-data #:strict? #t))
(() #f) ;nothing selected
(((content content-text))
(match (string-split content-text #\space)
- branch version-1.3.0 created (now 15b6c2a), guix-commits, 2021/04/25
- 01/20: Merge remote-tracking branch 'origin/wip-ungrafting' into HEAD, guix-commits, 2021/04/25
- 02/20: build-aux: Relax the regexp used to match NEWS sections., guix-commits, 2021/04/25
- 06/20: build: Use guix system image instead of disk-image, vm-image., guix-commits, 2021/04/25
- 03/20: build: Add doc-update-po as a prerequisite to the dist target., guix-commits, 2021/04/25
- 07/20: .gitignore: Ignore release artifacts., guix-commits, 2021/04/25
- 04/20: .gitignore: Ignore generated .pot files., guix-commits, 2021/04/25
- 08/20: build: Add a check for Guile-Lib., guix-commits, 2021/04/25
- 16/20: po: Remove file that no longer exists., guix-commits, 2021/04/25
- 05/20: gnu: guile-git: Update to 0.5.1., guix-commits, 2021/04/25
- 09/20: import: go: Do not set '%strict-tokenizer?' from the top level.,
guix-commits <=
- 20/20: http-client: Remove exception mishandling in 'http-multiple-get'., guix-commits, 2021/04/25
- 10/20: import: go: Autoload (htmlprag)., guix-commits, 2021/04/25
- 11/20: file-systems: read-partition-{uuid, label} don't swallow ENOENT & co., guix-commits, 2021/04/25
- 17/20: cve: Gracefully handle bogus CVE entries., guix-commits, 2021/04/25
- 19/20: http-client, substitute: Gracefully handle GnuTLS EAGAIN/EINTR., guix-commits, 2021/04/25
- 18/20: doc: Fix cross-reference URL to translated manual., guix-commits, 2021/04/25
- 12/20: gnu: icecat: Update to 78.10.0-guix0-preview1 [security fixes]., guix-commits, 2021/04/25
- 14/20: guix-install.sh: Allow overriding the Guix binary source., guix-commits, 2021/04/25
- 13/20: gnu: wireshark: Update to 3.4.5 [security fixes]., guix-commits, 2021/04/25
- 15/20: import: Remove Nix importer., guix-commits, 2021/04/25