From unknown Fri Jun 20 18:16:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#44178 <44178@debbugs.gnu.org> To: bug#44178 <44178@debbugs.gnu.org> Subject: Status: Add a Go Module Importer Reply-To: bug#44178 <44178@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:16:45 +0000 retitle 44178 Add a Go Module Importer reassign 44178 guix-patches submitter 44178 Katherine Cox-Buday severity 44178 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 10:07:14 2020 Received: (at submit) by debbugs.gnu.org; 23 Oct 2020 14:07:14 +0000 Received: from localhost ([127.0.0.1]:57927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVxin-0007cI-I6 for submit@debbugs.gnu.org; Fri, 23 Oct 2020 10:07:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:53784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVxil-0007cA-0o for submit@debbugs.gnu.org; Fri, 23 Oct 2020 10:07:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVxik-0000iM-Rx for guix-patches@gnu.org; Fri, 23 Oct 2020 10:07:06 -0400 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]:41332) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVxii-0007AU-26 for guix-patches@gnu.org; Fri, 23 Oct 2020 10:07:06 -0400 Received: by mail-il1-x130.google.com with SMTP id w17so1461012ilg.8 for ; Fri, 23 Oct 2020 07:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=uyjhv6K/f097J75OsRfsyDtv4uU4brSBk+/EuWxGjPI=; b=qDOpGWxL8hmmEXsmarrpLyyVRNsgle6lHQ4SUFxfWMOMpXoGhrP5Y/YIVOMz7WOSje gGq41lpWnLzP3wvZFIN3KMdT7H9lrpjjLQg+Ue5BzDrvmVN1+uouoARfpuVhLpZFIMao q4qMjqJh3MghTAUXIL6nHsMJKj+lhLPHLRLuDDZv4paZ91gKLmqePqjZSgDRvYTijFZ/ 6toIr7QDexToUVMfTzMq80iU5eX9cIh0BuI/Gqn1Q4fEbA7WS+xuycolQ6d4RcWERCIm JSRJ8QGU5QWiyn0vTS8wn+UBwtDi1LdkGt9x5oyQQMTtA+28Ji8VnWdrHQ91F6hNqg6a mAEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=uyjhv6K/f097J75OsRfsyDtv4uU4brSBk+/EuWxGjPI=; b=Pnu9svffzmMftqOwmTZ6eCFDhhfqwOTmL8K+WkMideHSyKLr0OOen8PQTbG5DazhkA 7HJZdoSCgL/zRu/DoEZICAbP2JAWJMFZG7tAsbuZRF1GjQZFZhFDP8U6Bi667X4ZZwDP 9bKMax5yEZpDuGPI8k+3klmS6Ebch+lKAtxz/cDB5C38jJBmP7UairJ4wFmxHB0tzWR1 nQEbTj0Pb/+QqHCls2CfKyuD1+nSGgCZ0iMARFg3fFRGi61hhjKx+AhVp1L9zAiGze+3 xvXh6ib3Ym8M7YVcEjRpqcFVLt7hnwpcXH2J0bUjuJiVg651ss+Md7t0RedwFrxoyPkO SdWg== X-Gm-Message-State: AOAM530Sq1WGVwZPFV1PInVcPLZTgjgHC7JUcluWEBPHPK0V6AbepHB9 JFn02I+eX5TOpf0Vgj65P85HqM5h9D/t4Q== X-Google-Smtp-Source: ABdhPJwfzRxnccMMmCEJl4PzPVrYqW/IrhfFCoRkp+SxEa1zSFBA/pskk0kbXrJGJrT3j21fWovYFQ== X-Received: by 2002:a92:d28b:: with SMTP id p11mr1841370ilp.264.1603462020810; Fri, 23 Oct 2020 07:07:00 -0700 (PDT) Received: from washu-v4 (172-221-246-205.res.spectrum.com. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id g26sm692059ion.25.2020.10.23.07.06.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 07:06:59 -0700 (PDT) From: Katherine Cox-Buday To: guix-patches@gnu.org Subject: Add a Go Module Importer Date: Fri, 23 Oct 2020 09:06:58 -0500 Message-ID: <87sga5kpdp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::130; envelope-from=cox.katherine.e@gmail.com; helo=mail-il1-x130.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-guix-import-go.scm-Created-Go-Importer.patch Content-Transfer-Encoding: quoted-printable >From cc92cbcf5ae89891f478f319e955419800bdfcf9 Mon Sep 17 00:00:00 2001 From: Katherine Cox-Buday Date: Thu, 22 Oct 2020 19:40:17 -0500 Subject: [PATCH] * guix/import/go.scm: Created Go Importer * guix/scripts/import.scm: Created Go Importer Subcommand * guix/import/go.s= cm (importers): Added Go Importer Subcommand --- guix/import/go.scm | 276 +++++++++++++++++++++++++++++++++++++ guix/scripts/import.scm | 2 +- guix/scripts/import/go.scm | 118 ++++++++++++++++ 3 files changed, 395 insertions(+), 1 deletion(-) create mode 100644 guix/import/go.scm create mode 100644 guix/scripts/import/go.scm diff --git a/guix/import/go.scm b/guix/import/go.scm new file mode 100644 index 0000000000..61009f3565 --- /dev/null +++ b/guix/import/go.scm @@ -0,0 +1,276 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2020 Katherine Cox-Buday +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix import go) + #:use-module (ice-9 match) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 receive) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (guix json) + #:use-module ((guix download) #:prefix download:) + #:use-module (guix import utils) + #:use-module (guix import json) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module (guix utils) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix base16) + #:use-module (guix base32) + #:use-module (guix build download) + #:use-module (web uri) + + #:export (go-module->guix-package + go-module-recursive-import + infer-module-root)) + +(define (escape-capital-letters s) + "To avoid ambiguity when serving from case-insensitive file systems, the +$module and $version elements are case-encoded by replacing every uppercase +letter with an exclamation mark followed by the corresponding lower-case +letter." + (let ((escaped-string (string))) + (string-for-each-index + (lambda (i) + (let ((c (string-ref s i))) + (set! escaped-string + (string-concatenate + (list escaped-string + (if (char-upper-case? c) "!" "") + (string (char-downcase c))))))) + s) + escaped-string)) + +(define (fetch-latest-version goproxy-url module-path) + "Fetches the version number of the latest version for MODULE-PATH from t= he +given GOPROXY-URL server." + (assoc-ref + (json-fetch (format #f "~a/~a/@latest" goproxy-url + (escape-capital-letters module-path))) + "Version")) + +(define (fetch-go.mod goproxy-url module-path version file) + "Fetches go.mod from the given GOPROXY-URL server for the given MODULE-P= ATH +and VERSION." + (url-fetch (format #f "~a/~a/@v/~a.mod" goproxy-url + (escape-capital-letters module-path) + (escape-capital-letters version)) + file + #:print-build-trace? #f)) + +(define (parse-go.mod go.mod-path) + "Parses a go.mod file and returns an alist of module path to version." + (with-input-from-file go.mod-path + (lambda () + (let ((in-require? #f) + (requirements (list))) + (do ((line (read-line) (read-line))) + ((eof-object? line)) + (set! line (string-trim line)) + ;; The parser is either entering, within, exiting, or after the + ;; require block. The Go toolchain is trustworthy so edge-cases = like + ;; double-entry, etc. need not complect the parser. + (cond + ((string=3D? line "require (") + (set! in-require? #t)) + ((and in-require? (string=3D? line ")")) + (set! in-require? #f)) + (in-require? + (let* ((requirement (string-split line #\space)) + ;; Modules should be unquoted + (module-path (string-delete #\" (car requirement))) + (version (list-ref requirement 1))) + (set! requirements (acons module-path version requirements))= )) + ((string-prefix? "replace" line) + (let* ((requirement (string-split line #\space)) + (module-path (list-ref requirement 1)) + (new-module-path (list-ref requirement 3)) + (version (list-ref requirement 4))) + (set! requirements (assoc-remove! requirements module-path)) + (set! requirements (acons new-module-path version requiremen= ts)))))) + requirements)))) + +(define (module-path-without-major-version module-path) + "Go modules can be appended with a major version indicator, +e.g. /v3. Sometimes it is desirable to work with the root module path. For +instance, for a module path github.com/foo/bar/v3 this function returns +github.com/foo/bar." + (let ((m (string-match "(.*)\\/v[0-9]+$" module-path))) + (if m + (match:substring m 1) + module-path))) + +(define (infer-module-root module-path) + "Go modules can be defined at any level of a repository's tree, but quer= ying +for the meta tag usually can only be done at the webpage at the root of the +repository. Therefore, it is sometimes necessary to try and derive a modul= e's +root path from its path. For a set of well-known forges, the pattern of wh= at +consists of a module's root page is known before hand." + ;; See the following URL for the official Go equivalent: + ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21b9= 9f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 + (define-record-type + (make-scs url-prefix root-regex type) + scs? + (url-prefix scs-url-prefix) + (root-regex scs-root-regex) + (type scs-type)) + (let* ((known-scs + (list + (make-scs + "github.com" + "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-scs + "bitbucket.org" + "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[A-= Za-z0-9_.\\-]+)*$`" + 'unknown) + (make-scs + "hub.jazz.net/git/" + "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-scs + "git.apache.org" + "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-]+= )*$" + 'git) + (make-scs + "git.openstack.org" + "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(= \\.git)?(/[A-Za-z0-9_.\\-]+)*$" + 'git))) + (scs (find (lambda (scs) (string-prefix? (scs-url-prefix scs) mod= ule-path)) + known-scs))) + (if scs + (match:substring (string-match (scs-root-regex scs) module-path) 1) + module-path))) + +(define (to-guix-package-name module-path) + "Converts a module's path to the canonical Guix format for Go packages." + (string-downcase + (string-append "go-" + (string-replace-substring + (string-replace-substring + ;; Guix has its own field for version + (module-path-without-major-version module-path) + "." "-") + "/" "-")))) + +(define (fetch-module-meta-data module-path) + "Fetches module meta-data from a module's landing page. This is necessary +because goproxy servers don't currently provide all the information needed= to +build a package." + (let* ((port (http-fetch (string->uri (format #f "https://~a?go-get=3D1"= module-path)))) + (module-metadata #f) + (meta-tag-prefix "symbol (list-ref meta-data 1))) + +(define (module-meta-data-repo-url meta-data goproxy-url) + "Return the URL where the fetcher which will be used can download the so= urce +control." + (if (member (module-meta-data-scs meta-data) '(fossil mod)) + goproxy-url + (list-ref meta-data 2))) + +(define (source-uri scs-type scs-repo-url file) + "Generate the `origin' block of a package depending on what type of sour= ce +control system is being used." + (case scs-type + ((git) + `(origin + (method git-fetch) + (uri (git-reference + (url ,scs-repo-url) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + ,(guix-hash-url file))))) + ((hg) + `(origin + (method hg-fetch) + (uri (hg-reference + (url ,scs-repo-url) + (changeset ,version))) + (file-name (format #f "~a-~a-checkout" name version)))) + ((svn) + `(origin + (method svn-fetch) + (uri (svn-reference + (url ,scs-repo-url) + (revision (string->number version)) + (recursive? #f))) + (file-name (format #f "~a-~a-checkout" name version)) + (sha256 + (base32 + ,(guix-hash-url file))))) + (else + (raise-exception (format #f "unsupported scs type: ~a" scs-type))))) + +(define* (go-module->guix-package module-path #:key (goproxy-url "https://= proxy.golang.org")) + (call-with-temporary-output-file + (lambda (temp port) + (let* ((latest-version (fetch-latest-version goproxy-url module-path)) + (go.mod-path (fetch-go.mod goproxy-url module-path latest-vers= ion + temp)) + (dependencies (map car (parse-go.mod temp))) + (guix-name (to-guix-package-name module-path)) + (root-module-path (infer-module-root module-path)) + ;; SCS type and URL are not included in goproxy information. F= or + ;; this we need to fetch it from the official module page. + (meta-data (fetch-module-meta-data root-module-path)) + (scs-type (module-meta-data-scs meta-data)) + (scs-repo-url (module-meta-data-repo-url meta-data goproxy-url= ))) + (values + `(package + (name ,guix-name) + ;; Elide the "v" prefix Go uses + (version ,(string-trim latest-version #\v)) + (source + ,(source-uri scs-type scs-repo-url temp)) + (build-system go-build-system) + ,@(maybe-inputs (map to-guix-package-name dependencies)) + ;; TODO(katco): It would be nice to make an effort to fetch this + ;; from known forges, e.g. GitHub + (home-page ,(format #f "https://~a" root-module-path)) + (synopsis "A Go package") + (description ,(format #f "~a is a Go package." guix-name)) + (license #f)) + dependencies))))) + +(define* (go-module-recursive-import package-name + #:key (goproxy-url "https://proxy.gol= ang.org")) + (recursive-import package-name #f + #:repo->guix-package + (lambda (name _) + (go-module->guix-package name + #:goproxy-url goproxy-url)) + #:guix-name to-guix-package-name)) diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 0a3863f965..1d2b45d942 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -77,7 +77,7 @@ rather than \\n." ;;; =20 (define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa" = "gem" - "cran" "crate" "texlive" "json" "opam")) + "go" "cran" "crate" "texlive" "json" "opam")) =20 (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm new file mode 100644 index 0000000000..000039769c --- /dev/null +++ b/guix/scripts/import/go.scm @@ -0,0 +1,118 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2020 Katherine Cox-Buday +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts import go) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix scripts) + #:use-module (guix import go) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-go)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + '()) + +(define (show-help) + (display (G_ "Usage: guix import go PACKAGE-PATH +Import and convert the Go module for PACKAGE-PATH.\n")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (display (G_ " + -r, --recursive generate package expressions for all Go modules\ + that are not yet in Guix")) + (display (G_ " + -p, --goproxy=3DGOPROXY specify which goproxy server to use")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import go"))) + (option '(#\r "recursive") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive #t result))) + (option '(#\p "goproxy") #t #f + (lambda (opt name arg result) + (alist-cons 'goproxy + (string->symbol arg) + (alist-delete 'goproxy result)))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-go . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (G_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((module-name) + (if (assoc-ref opts 'recursive) + (map (match-lambda + ((and ('package ('name name) . rest) pkg) + `(define-public ,(string->symbol name) + ,pkg)) + (_ #f)) + (go-module-recursive-import module-name + #:goproxy-url + (or (assoc-ref opts 'goproxy) + "https://proxy.golang.org"= ))) + (let ((sexp (go-module->guix-package module-name + #:goproxy-url + (or (assoc-ref opts 'gopro= xy) + "https://proxy.golang.= org")))) + (unless sexp + (leave (G_ "failed to download meta-data for module '~a'~%") + module-name)) + sexp))) + (() + (leave (G_ "too few arguments~%"))) + ((many ...) + (leave (G_ "too many arguments~%")))))) --=20 2.28.0 --=-=-= Content-Type: text/plain -- Katherine --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 06:41:55 2020 Received: (at 44178) by debbugs.gnu.org; 28 Oct 2020 10:41:55 +0000 Received: from localhost ([127.0.0.1]:47330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXitv-0003EJ-6V for submit@debbugs.gnu.org; Wed, 28 Oct 2020 06:41:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXitt-0003E8-PQ for 44178@debbugs.gnu.org; Wed, 28 Oct 2020 06:41:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41106) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXito-0003nQ-FO; Wed, 28 Oct 2020 06:41:48 -0400 Received: from vpn-0-27.aquilenet.fr ([2a0c:e300:4:27::]:38490 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kXitn-000517-RP; Wed, 28 Oct 2020 06:41:48 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Katherine Cox-Buday Subject: Re: [bug#44178] Add a Go Module Importer References: <87sga5kpdp.fsf@gmail.com> Date: Wed, 28 Oct 2020 11:41:45 +0100 In-Reply-To: <87sga5kpdp.fsf@gmail.com> (Katherine Cox-Buday's message of "Fri, 23 Oct 2020 09:06:58 -0500") Message-ID: <87a6w64opi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44178 Cc: 44178@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Katherine, Katherine Cox-Buday skribis: >>>From cc92cbcf5ae89891f478f319e955419800bdfcf9 Mon Sep 17 00:00:00 2001 > From: Katherine Cox-Buday > Date: Thu, 22 Oct 2020 19:40:17 -0500 > Subject: [PATCH] * guix/import/go.scm: Created Go Importer * > guix/scripts/import.scm: Created Go Importer Subcommand * guix/import/go= .scm > (importers): Added Go Importer Subcommand Nice! I think that can make a lot of people happy. :-) Here=E2=80=99s a quick review. I won=E2=80=99t promise I can reply to foll= owups in the coming days because with the release preparation going on, I=E2=80=99d rath= er focus on that. So perhaps this patch will have to wait until after this release, but certainly before the next one! > +(define (escape-capital-letters s) > + "To avoid ambiguity when serving from case-insensitive file systems, t= he > +$module and $version elements are case-encoded by replacing every upperc= ase > +letter with an exclamation mark followed by the corresponding lower-case > +letter." > + (let ((escaped-string (string))) > + (string-for-each-index > + (lambda (i) > + (let ((c (string-ref s i))) > + (set! escaped-string > + (string-concatenate > + (list escaped-string > + (if (char-upper-case? c) "!" "") > + (string (char-downcase c))))))) > + s) > + escaped-string)) As a general comment, the coding style in Guix is functional =E2=80=9Cby default=E2=80=9D (info "(guix) Coding Style"). That means we almost never = use =E2=80=98set!=E2=80=99 and procedures that modify their arguments. We also avoid idioms like car/cdr and =E2=80=98do=E2=80=99, which are more = commonly used in other Lisps, as you know very well. ;-) In the case above, I=E2=80=99d probably use =E2=80=98string-fold=E2=80=99. = The resulting code should be easier to reason about and likely more efficient. > +(define (fetch-latest-version goproxy-url module-path) > + "Fetches the version number of the latest version for MODULE-PATH from= the > +given GOPROXY-URL server." > + (assoc-ref > + (json-fetch (format #f "~a/~a/@latest" goproxy-url > + (escape-capital-letters module-path))) > + "Version")) I=E2=80=99d suggest using =E2=80=98define-json-mapping=E2=80=99 from (json)= like in the other importers. > +(define (infer-module-root module-path) > + "Go modules can be defined at any level of a repository's tree, but qu= erying > +for the meta tag usually can only be done at the webpage at the root of = the > +repository. Therefore, it is sometimes necessary to try and derive a mod= ule's > +root path from its path. For a set of well-known forges, the pattern of = what > +consists of a module's root page is known before hand." > + ;; See the following URL for the official Go equivalent: > + ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21= b99f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 > + (define-record-type > + (make-scs url-prefix root-regex type) > + scs? > + (url-prefix scs-url-prefix) > + (root-regex scs-root-regex) > + (type scs-type)) Maybe VCS as =E2=80=9Cversion control system=E2=80=9D? (It took me a while= to guess what =E2=80=9CSCS=E2=80=9D meant.) > +(define (fetch-module-meta-data module-path) > + "Fetches module meta-data from a module's landing page. This is necess= ary > +because goproxy servers don't currently provide all the information need= ed to > +build a package." > + (let* ((port (http-fetch (string->uri (format #f "https://~a?go-get=3D= 1" module-path)))) > + (module-metadata #f) > + (meta-tag-prefix " + (meta-tag-prefix-length (string-length meta-tag-prefix))) > + (do ((line (read-line port) (read-line port))) > + ((or (eof-object? line) > + module-metadata)) > + (let ((meta-tag-index (string-contains line meta-tag-prefix))) > + (when meta-tag-index > + (let* ((start (+ meta-tag-index meta-tag-prefix-length)) > + (end (string-index line #\" start))) > + (set! module-metadata > + (string-split (substring/shared line start end) #\space)))= ))) I=E2=80=99d suggest a named =E2=80=98let=E2=80=99 or =E2=80=98fold=E2=80=99= here. Likewise, instead of concatenating XML strings (which could lead to malformed XML), I recommend using SXML: you would create an sexp like (meta (@ (name "go-import") (content =E2=80=A6))) and at the end pass it to =E2=80=98sxml->sxml=E2=80=99 (info "(guile) Readi= ng and Writing XML"). > + (else > + (raise-exception (format #f "unsupported scs type: ~a" scs-type))))) =E2=80=98raise-exception=E2=80=99 takes an error condition. In this case, = we should use (srfi srfi-34) for =E2=80=98raise=E2=80=99 write something like: (raise (condition (formatted-message (G_ "=E2=80=A6" =E2=80=A6)))) > +(define* (go-module->guix-package module-path #:key (goproxy-url "https:= //proxy.golang.org")) > + (call-with-temporary-output-file > + (lambda (temp port) > + (let* ((latest-version (fetch-latest-version goproxy-url module-pat= h)) > + (go.mod-path (fetch-go.mod goproxy-url module-path latest-ve= rsion > + temp)) It seems that =E2=80=98go.mod-path=E2=80=99 isn=E2=80=99t used, and thus = =E2=80=98fetch-go.mod=E2=80=99 & co. aren=E2=80=99t used either, or am I overlooking something? > + (dependencies (map car (parse-go.mod temp))) Please use =E2=80=98match=E2=80=99 instead, or perhaps define a record type= for the abstraction at hand. > + (guix-name (to-guix-package-name module-path)) > + (root-module-path (infer-module-root module-path)) > + ;; SCS type and URL are not included in goproxy information.= For > + ;; this we need to fetch it from the official module page. > + (meta-data (fetch-module-meta-data root-module-path)) > + (scs-type (module-meta-data-scs meta-data)) > + (scs-repo-url (module-meta-data-repo-url meta-data goproxy-u= rl))) > + (values > + `(package > + (name ,guix-name) > + ;; Elide the "v" prefix Go uses > + (version ,(string-trim latest-version #\v)) > + (source > + ,(source-uri scs-type scs-repo-url temp)) > + (build-system go-build-system) > + ,@(maybe-inputs (map to-guix-package-name dependencies)) > + ;; TODO(katco): It would be nice to make an effort to fetch t= his > + ;; from known forges, e.g. GitHub > + (home-page ,(format #f "https://~a" root-module-path)) > + (synopsis "A Go package") > + (description ,(format #f "~a is a Go package." guix-name)) Maybe something like =E2=80=9Cfill it out!=E2=80=9D so we don=E2=80=99t get= patch submissions with the default synopsis/description. :-) > + (license #f)) Likewise. Two more things: could you (1) and an entry under =E2=80=9CInvoking guix im= port=E2=80=9D in doc/guix.texi, and (2) add tests, taking inspiration from the existing importer tests? Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 06:42:34 2020 Received: (at 44178) by debbugs.gnu.org; 28 Oct 2020 10:42:34 +0000 Received: from localhost ([127.0.0.1]:47341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXiuX-0003Fs-Ri for submit@debbugs.gnu.org; Wed, 28 Oct 2020 06:42:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXiuV-0003Fg-TU for 44178@debbugs.gnu.org; Wed, 28 Oct 2020 06:42:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41114) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXiuQ-00040m-Kw; Wed, 28 Oct 2020 06:42:26 -0400 Received: from vpn-0-27.aquilenet.fr ([2a0c:e300:4:27::]:38492 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kXiuQ-00054k-3K; Wed, 28 Oct 2020 06:42:26 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Katherine Cox-Buday Subject: Re: [bug#44178] Add a Go Module Importer In-Reply-To: <87sga5kpdp.fsf@gmail.com> (Katherine Cox-Buday's message of "Fri, 23 Oct 2020 09:06:58 -0500") References: <87sga5kpdp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Date: Wed, 28 Oct 2020 11:42:24 +0100 Message-ID: <878sbq4oof.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44178 Cc: 44178@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Katherine, Katherine Cox-Buday skribis: >>>From cc92cbcf5ae89891f478f319e955419800bdfcf9 Mon Sep 17 00:00:00 2001 > From: Katherine Cox-Buday > Date: Thu, 22 Oct 2020 19:40:17 -0500 > Subject: [PATCH] * guix/import/go.scm: Created Go Importer * > guix/scripts/import.scm: Created Go Importer Subcommand * guix/import/go= .scm > (importers): Added Go Importer Subcommand Nice! I think that can make a lot of people happy. :-) Here=E2=80=99s a quick review. I won=E2=80=99t promise I can reply to foll= owups in the coming days because with the release preparation going on, I=E2=80=99d rath= er focus on that. So perhaps this patch will have to wait until after this release, but certainly before the next one! > +(define (escape-capital-letters s) > + "To avoid ambiguity when serving from case-insensitive file systems, t= he > +$module and $version elements are case-encoded by replacing every upperc= ase > +letter with an exclamation mark followed by the corresponding lower-case > +letter." > + (let ((escaped-string (string))) > + (string-for-each-index > + (lambda (i) > + (let ((c (string-ref s i))) > + (set! escaped-string > + (string-concatenate > + (list escaped-string > + (if (char-upper-case? c) "!" "") > + (string (char-downcase c))))))) > + s) > + escaped-string)) As a general comment, the coding style in Guix is functional =E2=80=9Cby default=E2=80=9D (info "(guix) Coding Style"). That means we almost never = use =E2=80=98set!=E2=80=99 and procedures that modify their arguments. We also avoid idioms like car/cdr and =E2=80=98do=E2=80=99, which are more = commonly used in other Lisps, as you know very well. ;-) In the case above, I=E2=80=99d probably use =E2=80=98string-fold=E2=80=99. = The resulting code should be easier to reason about and likely more efficient. > +(define (fetch-latest-version goproxy-url module-path) > + "Fetches the version number of the latest version for MODULE-PATH from= the > +given GOPROXY-URL server." > + (assoc-ref > + (json-fetch (format #f "~a/~a/@latest" goproxy-url > + (escape-capital-letters module-path))) > + "Version")) I=E2=80=99d suggest using =E2=80=98define-json-mapping=E2=80=99 from (json)= like in the other importers. > +(define (infer-module-root module-path) > + "Go modules can be defined at any level of a repository's tree, but qu= erying > +for the meta tag usually can only be done at the webpage at the root of = the > +repository. Therefore, it is sometimes necessary to try and derive a mod= ule's > +root path from its path. For a set of well-known forges, the pattern of = what > +consists of a module's root page is known before hand." > + ;; See the following URL for the official Go equivalent: > + ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21= b99f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 > + (define-record-type > + (make-scs url-prefix root-regex type) > + scs? > + (url-prefix scs-url-prefix) > + (root-regex scs-root-regex) > + (type scs-type)) Maybe VCS as =E2=80=9Cversion control system=E2=80=9D? (It took me a while= to guess what =E2=80=9CSCS=E2=80=9D meant.) > +(define (fetch-module-meta-data module-path) > + "Fetches module meta-data from a module's landing page. This is necess= ary > +because goproxy servers don't currently provide all the information need= ed to > +build a package." > + (let* ((port (http-fetch (string->uri (format #f "https://~a?go-get=3D= 1" module-path)))) > + (module-metadata #f) > + (meta-tag-prefix " + (meta-tag-prefix-length (string-length meta-tag-prefix))) > + (do ((line (read-line port) (read-line port))) > + ((or (eof-object? line) > + module-metadata)) > + (let ((meta-tag-index (string-contains line meta-tag-prefix))) > + (when meta-tag-index > + (let* ((start (+ meta-tag-index meta-tag-prefix-length)) > + (end (string-index line #\" start))) > + (set! module-metadata > + (string-split (substring/shared line start end) #\space)))= ))) I=E2=80=99d suggest a named =E2=80=98let=E2=80=99 or =E2=80=98fold=E2=80=99= here. Likewise, instead of concatenating XML strings (which could lead to malformed XML), I recommend using SXML: you would create an sexp like (meta (@ (name "go-import") (content =E2=80=A6))) and at the end pass it to =E2=80=98sxml->sxml=E2=80=99 (info "(guile) Readi= ng and Writing XML"). > + (else > + (raise-exception (format #f "unsupported scs type: ~a" scs-type))))) =E2=80=98raise-exception=E2=80=99 takes an error condition. In this case, = we should use (srfi srfi-34) for =E2=80=98raise=E2=80=99 write something like: (raise (condition (formatted-message (G_ "=E2=80=A6" =E2=80=A6)))) > +(define* (go-module->guix-package module-path #:key (goproxy-url "https:= //proxy.golang.org")) > + (call-with-temporary-output-file > + (lambda (temp port) > + (let* ((latest-version (fetch-latest-version goproxy-url module-pat= h)) > + (go.mod-path (fetch-go.mod goproxy-url module-path latest-ve= rsion > + temp)) It seems that =E2=80=98go.mod-path=E2=80=99 isn=E2=80=99t used, and thus = =E2=80=98fetch-go.mod=E2=80=99 & co. aren=E2=80=99t used either, or am I overlooking something? > + (dependencies (map car (parse-go.mod temp))) Please use =E2=80=98match=E2=80=99 instead, or perhaps define a record type= for the abstraction at hand. > + (guix-name (to-guix-package-name module-path)) > + (root-module-path (infer-module-root module-path)) > + ;; SCS type and URL are not included in goproxy information.= For > + ;; this we need to fetch it from the official module page. > + (meta-data (fetch-module-meta-data root-module-path)) > + (scs-type (module-meta-data-scs meta-data)) > + (scs-repo-url (module-meta-data-repo-url meta-data goproxy-u= rl))) > + (values > + `(package > + (name ,guix-name) > + ;; Elide the "v" prefix Go uses > + (version ,(string-trim latest-version #\v)) > + (source > + ,(source-uri scs-type scs-repo-url temp)) > + (build-system go-build-system) > + ,@(maybe-inputs (map to-guix-package-name dependencies)) > + ;; TODO(katco): It would be nice to make an effort to fetch t= his > + ;; from known forges, e.g. GitHub > + (home-page ,(format #f "https://~a" root-module-path)) > + (synopsis "A Go package") > + (description ,(format #f "~a is a Go package." guix-name)) Maybe something like =E2=80=9Cfill it out!=E2=80=9D so we don=E2=80=99t get= patch submissions with the default synopsis/description. :-) > + (license #f)) Likewise. Two more things: could you (1) and an entry under =E2=80=9CInvoking guix im= port=E2=80=9D in doc/guix.texi, and (2) add tests, taking inspiration from the existing importer tests? Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 10 15:26:52 2020 Received: (at 44178) by debbugs.gnu.org; 10 Nov 2020 20:26:52 +0000 Received: from localhost ([127.0.0.1]:39035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcaE8-0002wy-1i for submit@debbugs.gnu.org; Tue, 10 Nov 2020 15:26:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcaE6-0002wZ-Gi for 44178@debbugs.gnu.org; Tue, 10 Nov 2020 15:26:50 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40212) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcaE1-0007XA-7Q; Tue, 10 Nov 2020 15:26:45 -0500 Received: from host-37-191-236-253.lynet.no ([37.191.236.253]:51050 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kcaE0-0004zO-02; Tue, 10 Nov 2020 15:26:44 -0500 From: Marius Bakke To: Katherine Cox-Buday , 44178@debbugs.gnu.org Subject: Re: [bug#44178] Add a Go Module Importer In-Reply-To: <87sga5kpdp.fsf@gmail.com> References: <87sga5kpdp.fsf@gmail.com> Date: Tue, 10 Nov 2020 21:26:41 +0100 Message-ID: <87blg5dkla.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44178 Cc: Helio Machado <0x2b3bfa0@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Katherine Cox-Buday writes: >>>From cc92cbcf5ae89891f478f319e955419800bdfcf9 Mon Sep 17 00:00:00 2001 > From: Katherine Cox-Buday > Date: Thu, 22 Oct 2020 19:40:17 -0500 > Subject: [PATCH] * guix/import/go.scm: Created Go Importer * > guix/scripts/import.scm: Created Go Importer Subcommand * guix/import/go.scm > (importers): Added Go Importer Subcommand I just want to say thanks a lot for this! I tested it, and it pretty much works as advertised. Cc'ing Helio who was working on a Go importer as well recently. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl+q94EPHG1hcml1c0Bn bnUub3JnAAoJEKKgbfKjOlT6smgH/ibghemWudkskluP5si3VgUb9JO49uiUgDv3 CaKbs/SOvySUPFgl+8ceLWKgLTQeNVGBgcRBA+aiL0hgAYw/JTBndMHEJ1aZMevw WUDhIMojlbtfw8wBJuVROjPKcXZW5WXZIKQ1GyqpQ/AP72uZcgI7xB0Qbh0ztQq4 uhZcEiDvgCGfsFWOphpuqxoB2rUpEruLaUj4kkEhccArt79WbgVLF3lTijM1Fhff Mk3r+4MCdmCL3pZsnDcoY/qNl4jGxqP2mj+rszQFqR6da8gIEhkM52NI3U9VoWLp gaLq4y4jQp4cdMPY4r2WE5jm7KryGcP/4KHFmf4g/8cvD0Lj5dk= =hW6A -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 10 20:23:44 2020 Received: (at 44178) by debbugs.gnu.org; 11 Nov 2020 01:23:44 +0000 Received: from localhost ([127.0.0.1]:39569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcerQ-0006Dc-DP for submit@debbugs.gnu.org; Tue, 10 Nov 2020 20:23:44 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:33788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0x2b3bfa0@gmail.com>) id 1kcerO-0006DP-1T for 44178@debbugs.gnu.org; Tue, 10 Nov 2020 20:23:42 -0500 Received: by mail-qt1-f173.google.com with SMTP id i12so300949qtj.0 for <44178@debbugs.gnu.org>; Tue, 10 Nov 2020 17:23:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=y8nrYLjKxck1A5J3/CkEvWoKDcNwo+P2S2p8LTJikj0=; b=pJ92/7zMYpww19dNeo18coiYTUrcwoiwRN4F/lnifFVRL+J08XedjNKy3rV3ekS6GQ IHKZlZY6l4GgB0TwHVVwee72JboJTmiZRhs3Hdygr0gFPKPNa34VwLurJuUO7IRrUmcy LCLtsDAZqdCR8Oy7BBK4Up3ryYfE24oMsbhLELMtp5ZI7YMvwLqVlcAM1B+f/B1/L2ow qoidMmUzhBbCkTK6zkXRNUnTWK6cmXuX5pScDHffRzisu+C6eMVNzeJNV6Z8uOK1T1LA j0xBNhBSW1dbqu3S4lynuci1PhyPu28WyRMNcUySVMfovd5FIHAoy3iinzAdYJqQnfZS cshg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=y8nrYLjKxck1A5J3/CkEvWoKDcNwo+P2S2p8LTJikj0=; b=meFK0MF+eoC+DOnwoZ5xrQxpV1c6HTzZF44zpNduMk36PQAuiMvr6zM0ezVutEL4nT lVneCVs+j4OyVSHa4rSrpcnq6XPOhoaQlHdpG4KUikaZOP03H7gGaJ2cW/TM7pL8zrup 2KxJe0SbDSP0Zq+7lvIZmJw2BmLoVA+TukxJhHAJYK6vcWk6nLGFozIGXaL3q/eoTGbx wzQym2Cj4/g1KL/R3angSoPbspUGseOqC8DYRh8eKKlephLjnTcY+LmL/viK8pUEZkvh gW0CPD+kOvFsSpQgi+tsUnyAOTiFoOW0yzZ0b6yWJpNXtlLDY6Rsrc1fqhYKR9X2mKOs jCgQ== X-Gm-Message-State: AOAM532NlKbhFlzPtE8JKDAgLr3fcZZaSkvd3IRLog8dASOnBgXg6Un0 QHUBHFZeHybsj2AhkWsATIM9TrUFSB6tUwF2LKy5urTWU2m0Fg== X-Google-Smtp-Source: ABdhPJwUFF5LFW9/3Jc0IaAkwlIhgRoO1lw96fGyv9DWUA2xlV8DdmcubDXszWCkJL6MTmRRSQeku3gX/3yRG9v2OiI= X-Received: by 2002:aed:38ca:: with SMTP id k68mr9742206qte.28.1605057816323; Tue, 10 Nov 2020 17:23:36 -0800 (PST) MIME-Version: 1.0 References: <87sga5kpdp.fsf@gmail.com> <87blg5dkla.fsf@gnu.org> In-Reply-To: From: Helio Machado <0x2b3bfa0@gmail.com> Date: Wed, 11 Nov 2020 02:23:00 +0100 Message-ID: Subject: Re: [bug#44178] Add a Go Module Importer To: 44178@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000fc6c5a05b3caa49f" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 44178 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000fc6c5a05b3caa49f Content-Type: text/plain; charset="UTF-8" Thanks for the ping, Marius! I've been quite busy with some yak shaving tasks, but my importer is already working and has some interesting improvements, like elegant module fetching from the official module proxy, license extraction and recursive import support. I need to fix an esoteric bug that trips the kernel's out-of-memory killer when building a derivation with dependencies, but the importer part works pretty well. You can take a look to [my changes][1] for some readily backportable ideas, like [the compact algorithm for uppercase path escaping][2]. Please forgive the code quality and the possible backwards-compatibility mistakes; this is an unfinished proof of concept. $ guix import go-modules -r github.com/FiloSottile/age # Please refer to the issue 43872 for more information about the resting environment [1]: https://github.com/0x2b3bfa0/guix-go-modules/commit/5defe897065c5d3e63740932b360474132c77877 [2]: https://github.com/0x2b3bfa0/guix-go-modules/blob/main/guix/build-system/go.scm#L65-L71 On Wed, 11 Nov 2020 at 02:19, Helio Machado <0x2b3bfa0@gmail.com> wrote: > Thanks for the ping, Marius! I've been quite busy with some yak shaving > tasks, but my importer is already working and has some interesting > improvements, like elegant module fetching from the official module proxy, > license extraction and recursive import support. > > I need to fix an esoteric bug that trips the kernel's out-of-memory killer > when building a derivation with dependencies, but the importer part works > pretty well. > > You can take a look to [my changes][1] for some readily backportable > ideas, like [the compact algorithm for uppercase path escaping][2]. > > Please forgive the code quality and the possible backwards-compatibility > mistakes; this is an unfinished proof of concept. > > [1]: > https://github.com/0x2b3bfa0/guix-go-modules/commit/5defe897065c5d3e63740932b360474132c77877 > [2]: > https://github.com/0x2b3bfa0/guix-go-modules/blob/main/guix/build-system/go.scm#L65-L71 > > On Tue, 10 Nov 2020 at 21:26, Marius Bakke wrote: > >> Katherine Cox-Buday writes: >> >> >>From cc92cbcf5ae89891f478f319e955419800bdfcf9 Mon Sep 17 00:00:00 2001 >> > From: Katherine Cox-Buday >> > Date: Thu, 22 Oct 2020 19:40:17 -0500 >> > Subject: [PATCH] * guix/import/go.scm: Created Go Importer * >> > guix/scripts/import.scm: Created Go Importer Subcommand * >> guix/import/go.scm >> > (importers): Added Go Importer Subcommand >> >> I just want to say thanks a lot for this! I tested it, and it pretty >> much works as advertised. >> >> Cc'ing Helio who was working on a Go importer as well recently. >> > --000000000000fc6c5a05b3caa49f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the ping, Marius! I've been quite= busy with some yak shaving tasks, but my importer is already working and h= as some interesting improvements, like elegant module fetching from the off= icial module proxy, license extraction and recursive=C2=A0import support.

I need to fix an esoteric bug that trips the = kernel's out-of-memory killer when building a derivation with dependenc= ies, but the importer part works pretty well.

You = can take a look to [my changes][1] for some readily backportable ideas, lik= e [the compact algorithm for uppercase path escaping][2].

Please forgive the code quality and the possible backwards-compatib= ility mistakes; this is an unfinished proof of concept.

On Wed, 11 Nov 2= 020 at 02:19, Helio Machado <0x2b3bfa0@gmail.com> wrote:
=
Thanks = for the ping, Marius! I've been quite busy with some yak shaving tasks,= but my importer is already working and has some interesting improvements, = like elegant module fetching from the official module proxy, license extrac= tion and recursive=C2=A0import support.

I ne= ed to fix an esoteric bug that trips the kernel's out-of-memory killer = when building a derivation with dependencies, but the importer part works p= retty well.

You can take a look to [my changes][1]= for some readily backportable ideas, like [the compact algorithm for upper= case path escaping][2].

Please forgive the code qu= ality and the possible backwards-compatibility mistakes; this is an unfinis= hed proof of concept.


On Tue, 10 Nov 2020 at 21:26, Marius Bakke <marius@gnu.org> wrote:
Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:

>>From cc92cbcf5ae89891f478f319e955419800bdfcf9 Mon Sep 17 00:00:00 2= 001
> From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
> Date: Thu, 22 Oct 2020 19:40:17 -0500
> Subject: [PATCH] * guix/import/go.scm: Created Go Importer *
>=C2=A0 guix/scripts/import.scm: Created Go Importer Subcommand * guix/i= mport/go.scm
>=C2=A0 (importers): Added Go Importer Subcommand

I just want to say thanks a lot for this!=C2=A0 I tested it, and it pretty<= br> much works as advertised.

Cc'ing Helio who was working on a Go importer as well recently.
--000000000000fc6c5a05b3caa49f-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 11 15:48:26 2020 Received: (at 44178) by debbugs.gnu.org; 11 Nov 2020 20:48:26 +0000 Received: from localhost ([127.0.0.1]:42958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcx2U-0000WW-UY for submit@debbugs.gnu.org; Wed, 11 Nov 2020 15:48:26 -0500 Received: from mail-il1-f169.google.com ([209.85.166.169]:46754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcx2Q-0000WF-Jt for 44178@debbugs.gnu.org; Wed, 11 Nov 2020 15:48:22 -0500 Received: by mail-il1-f169.google.com with SMTP id a20so3188783ilk.13 for <44178@debbugs.gnu.org>; Wed, 11 Nov 2020 12:48:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+MxwqtKzYmC/HnM93tPv6rhG6PUxVf3KaxMdg82XBAs=; b=E8rJmYziBt3hK9T5sxcVwxIXXAmud5yEi55UKBlVCeuXKsFbMBiJTm7DmVNnqsgSbl roGAMAG9E/S7HucJBiAsmNYQzHmf3a2R+K42TzVIJ3fu4pQEUj1UHRiiJZnxDHjruKY4 sb0AYpMIOQzEobPOa97y7HyYVFI5gAVPLW0PmULJbGpldWsojxfC/xGgTalFt6B73Pzi Fysex3xkxTgoTsPJHXSct6XIrLFAzF09HcsIfxXJSZRE665KKXEzIk2fzkWePd+jrpdk Fq2fvFnz4fuOYnL8fo+96px7u6CWJbJEIQEWLGbNfnbqQ5qZVZ0/8O0k2si0bjmbUkjJ 7vng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+MxwqtKzYmC/HnM93tPv6rhG6PUxVf3KaxMdg82XBAs=; b=oDRZU7WBOhAzLxCyX1aojUZXRiIQByTiK80WDKWiGEn9xD6kinfKe4AkHA3GKidEhd iUJhrYTqKiFiqr+GFjbONmsL20IDlxJk6Urp73xp9l5ldaiBsVPvxfRyOvbQx/wxvgLX FjGouNAsLdjD2CamRRU7f6qpHLkT03sImn75NvOcezzK8LK7i9qrUXZcgCZCadrTFGMG Vlmaxv8ggZIVnEzK7YNqljqTFPKLZtl3u9LHTKl4dt4A3B3tj7bDLLfyc7Uxtl94+sum PIQgL4yyKkVN5Do2fiIC6/f/QTmIQLJxFcdY+mvtUdnvIGXNe1uUFWrQ5dcwBQiMlAdX y5uw== X-Gm-Message-State: AOAM5311aVPKRRsVZsTZQuoNiq5/cUgIK8EN5eTr6gHlR2hPjDKCSgeg OQTAGt+/9PC0e2MiW8k3XbY= X-Google-Smtp-Source: ABdhPJyo+zFYmTwxwTzKFvclNSiDlotuDzDWuJIE8LKe6EAxRMvyLmdEw7HRQGDThy6FwYLG9/fZwg== X-Received: by 2002:a05:6e02:2cc:: with SMTP id v12mr20786794ilr.115.1605127692911; Wed, 11 Nov 2020 12:48:12 -0800 (PST) Received: from washu-v4 (172-221-246-205.res.spectrum.com. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id y9sm1725065ily.85.2020.11.11.12.48.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 12:48:11 -0800 (PST) From: Katherine Cox-Buday To: Marius Bakke Subject: Re: [bug#44178] Add a Go Module Importer References: <87sga5kpdp.fsf@gmail.com> <87blg5dkla.fsf@gnu.org> Date: Wed, 11 Nov 2020 14:48:10 -0600 In-Reply-To: <87blg5dkla.fsf@gnu.org> (Marius Bakke's message of "Tue, 10 Nov 2020 21:26:41 +0100") Message-ID: <87v9ebpqlx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: 44178@debbugs.gnu.org, Helio Machado <0x2b3bfa0@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Marius Bakke writes: > I just want to say thanks a lot for this! I tested it, and it pretty > much works as advertised. You're very welcome! I have more changes locally which fix some edge-cases. I'm using `go-ethereum` as my test case since someone mentioned that. Plus I need to make some of the changes Ludovic pointed out. Still, we're underway! -- Katherine From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 09 09:23:41 2020 Received: (at 44178) by debbugs.gnu.org; 9 Dec 2020 14:23:41 +0000 Received: from localhost ([127.0.0.1]:33159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kn0NY-0006G3-WA for submit@debbugs.gnu.org; Wed, 09 Dec 2020 09:23:41 -0500 Received: from smtp4-g21.free.fr ([212.27.42.4]:60222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kn0NU-0006Fn-KU for 44178@debbugs.gnu.org; Wed, 09 Dec 2020 09:23:38 -0500 Received: from [192.168.0.27] (unknown [82.64.145.38]) (Authenticated sender: dftxbs3e) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 1025419F5CF for <44178@debbugs.gnu.org>; Wed, 9 Dec 2020 15:23:33 +0100 (CET) Message-ID: <9395ba7c7499d6c4423982486a0a0fb31cb76e93.camel@free.fr> Subject: From: dftxbs3e To: 44178@debbugs.gnu.org Date: Wed, 09 Dec 2020 15:22:18 +0100 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 4.9 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thanks a lot for this! I'm getting some error trying to use it (patching on top of 8e2aad26ae9b7365db83d4f6c74e9e79c57766a6), maybe that's fixed in your local changes? $ ./pre-inst-env guix import go -r github.com/syncthing/syncthing WARNING: (guix import go): `url-fetch' imported from both (guix import utils) and (guix build download) Backtrace: In ice-9/boot-9.scm [...] Content analysis details: (4.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.3 HK_RANDOM_FROM From username looks random 0.6 HK_RANDOM_ENVFROM Envelope sender username looks random -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.27.42.4 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [212.27.42.4 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dftxbs3e[at]free.fr) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: 44178 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thanks a lot for this! I'm getting some error trying to use it (patching on top of 8e2aad26ae9b7365db83d4f6c74e9e79c57766a6), maybe that's fixed in your local changes? $ ./pre-inst-env guix import go -r github.com/syncthing/syncthing WARNING: (guix import go): `url-fetch' imported from both (guix import utils) and (guix build download) Backtrace: In ice-9/boot-9.scm [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.27.42.4 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [212.27.42.4 listed in wl.mailspike.net] 0.3 HK_RANDOM_FROM From username looks random 0.6 HK_RANDOM_ENVFROM Envelope sender username looks random 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dftxbs3e[at]free.fr) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty Thanks a lot for this! I'm getting some error trying to use it (patching on top of 8e2aad26ae9b7365db83d4f6c74e9e79c57766a6), maybe that's fixed in your local changes? $ ./pre-inst-env guix import go -r github.com/syncthing/syncthing WARNING: (guix import go): `url-fetch' imported from both (guix import utils) and (guix build download) Backtrace: In ice-9/boot-9.scm: 1736:10 7 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 6 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 5 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 4 (_ #(#(#))) In guix/ui.scm: 2127:12 3 (run-guix-command _ . _) In guix/scripts/import.scm: 120:11 2 (guix-import . _) In ice-9/eval.scm: 159:9 1 (_ #(#(#(#(#(#(#(#(#(#) …) …) …) …) …) …) …) …)) In guix/import/utils.scm: 429:0 0 (recursive-import _ #:repo->guix-package _ #:guix-name _ …) guix/import/utils.scm:429:0: In procedure recursive-import: Invalid keyword: #f From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 09 21:42:19 2020 Received: (at 44178) by debbugs.gnu.org; 10 Dec 2020 02:42:19 +0000 Received: from localhost ([127.0.0.1]:36609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knBuN-0002BM-CH for submit@debbugs.gnu.org; Wed, 09 Dec 2020 21:42:19 -0500 Received: from smtp2-g21.free.fr ([212.27.42.2]:63520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knBuL-0002BD-AM for 44178@debbugs.gnu.org; Wed, 09 Dec 2020 21:42:18 -0500 Received: from [IPv6:2a01:e0a:2a2:1350:cd10:777c:7b57:3bb6] (unknown [IPv6:2a01:e0a:2a2:1350:cd10:777c:7b57:3bb6]) (Authenticated sender: dftxbs3e) by smtp2-g21.free.fr (Postfix) with ESMTPSA id E352A20039E for <44178@debbugs.gnu.org>; Thu, 10 Dec 2020 03:42:14 +0100 (CET) Message-ID: Subject: Re: From: dftxbs3e To: 44178@debbugs.gnu.org Date: Thu, 10 Dec 2020 03:42:14 +0100 In-Reply-To: <9395ba7c7499d6c4423982486a0a0fb31cb76e93.camel@free.fr> References: <9395ba7c7499d6c4423982486a0a0fb31cb76e93.camel@free.fr> Content-Type: multipart/mixed; boundary="=-ZH7kF50bShwKrEP89x8F" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 44178 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-ZH7kF50bShwKrEP89x8F Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Wed, 2020-12-09 at 15:22 +0100, dftxbs3e wrote: > Thanks a lot for this! > > I'm getting some error trying to use it (patching on top of > 8e2aad26ae9b7365db83d4f6c74e9e79c57766a6), maybe that's fixed in your > local changes? > > $ ./pre-inst-env guix import go -r github.com/syncthing/syncthing > WARNING: (guix import go): `url-fetch' imported from both (guix > import > utils) and (guix build download) > Backtrace: > In ice-9/boot-9.scm: > 1736:10 7 (with-exception-handler _ _ #:unwind? _ # _) > In unknown file: > 6 (apply-smob/0 #) > In ice-9/boot-9.scm: > 718:2 5 (call-with-prompt _ _ # handle…>) > In ice-9/eval.scm: > 619:8 4 (_ #(#(#))) > In guix/ui.scm: > 2127:12 3 (run-guix-command _ . _) > In guix/scripts/import.scm: > 120:11 2 (guix-import . _) > In ice-9/eval.scm: > 159:9 1 (_ #(#(#(#(#(#(#(#(#(#) …) …) …) …) …) …) …) > …)) > In guix/import/utils.scm: > 429:0 0 (recursive-import _ #:repo->guix-package _ #:guix-name _ > …) > > guix/import/utils.scm:429:0: In procedure recursive-import: > Invalid keyword: #f I could fix it using the attached patch! However, I noticed it doesnt pin versions in GNU Guix to what they are in go.mod file, is that expected? It always takes the latest. It might work but I am thinking it might cause breakage at some point? Thank you! --=-ZH7kF50bShwKrEP89x8F Content-Disposition: attachment; filename*0=go-module-importer-fix-guix-8e2aad26ae9b7365db83d4f6c74e9e79c; filename*1=57766a6.patch Content-Type: text/x-patch; name*0=go-module-importer-fix-guix-8e2aad26ae9b7365db83d4f6c74e9e79c5776; name*1=6a6.patch; charset="UTF-8" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2d1aXgvaW1wb3J0L2dvLnNjbSBiL2d1aXgvaW1wb3J0L2dvLnNjbQppbmRl eCA2MTAwOWYzNTY1Li5jN2ExYjFhNWQ0IDEwMDY0NAotLS0gYS9ndWl4L2ltcG9ydC9nby5zY20K KysrIGIvZ3VpeC9pbXBvcnQvZ28uc2NtCkBAIC0yMyw3ICsyMyw3IEBACiAgICM6dXNlLW1vZHVs ZSAoaWNlLTkgcmVnZXgpCiAgICM6dXNlLW1vZHVsZSAoc3JmaSBzcmZpLTEpCiAgICM6dXNlLW1v ZHVsZSAoc3JmaSBzcmZpLTkpCi0gICM6dXNlLW1vZHVsZSAoZ3VpeCBqc29uKQorICAjOnVzZS1t b2R1bGUgKGpzb24pCiAgICM6dXNlLW1vZHVsZSAoKGd1aXggZG93bmxvYWQpICM6cHJlZml4IGRv d25sb2FkOikKICAgIzp1c2UtbW9kdWxlIChndWl4IGltcG9ydCB1dGlscykKICAgIzp1c2UtbW9k dWxlIChndWl4IGltcG9ydCBqc29uKQpAQCAtMjY4LDkgKzI2OCw5IEBAIGNvbnRyb2wgc3lzdGVt IGlzIGJlaW5nIHVzZWQuIgogCiAoZGVmaW5lKiAoZ28tbW9kdWxlLXJlY3Vyc2l2ZS1pbXBvcnQg cGFja2FnZS1uYW1lCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIzprZXkg KGdvcHJveHktdXJsICJodHRwczovL3Byb3h5LmdvbGFuZy5vcmciKSkKLSAgKHJlY3Vyc2l2ZS1p bXBvcnQgcGFja2FnZS1uYW1lICNmCisgIChyZWN1cnNpdmUtaW1wb3J0IHBhY2thZ2UtbmFtZQog ICAgICAgICAgICAgICAgICAgICAjOnJlcG8tPmd1aXgtcGFja2FnZQotICAgICAgICAgICAgICAg ICAgICAobGFtYmRhIChuYW1lIF8pCisgICAgICAgICAgICAgICAgICAgIChsYW1iZGEqIChuYW1l ICM6a2V5IHJlcG8gdmVyc2lvbikKICAgICAgICAgICAgICAgICAgICAgICAoZ28tbW9kdWxlLT5n dWl4LXBhY2thZ2UgbmFtZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAjOmdvcHJveHktdXJsIGdvcHJveHktdXJsKSkKICAgICAgICAgICAgICAgICAgICAg IzpndWl4LW5hbWUgdG8tZ3VpeC1wYWNrYWdlLW5hbWUpKQo= --=-ZH7kF50bShwKrEP89x8F-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 09 22:14:36 2020 Received: (at 44178) by debbugs.gnu.org; 10 Dec 2020 03:14:36 +0000 Received: from localhost ([127.0.0.1]:36616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knCPb-0002v6-Vy for submit@debbugs.gnu.org; Wed, 09 Dec 2020 22:14:36 -0500 Received: from smtp2-g21.free.fr ([212.27.42.2]:4883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knCPZ-0002uw-Jy for 44178@debbugs.gnu.org; Wed, 09 Dec 2020 22:14:34 -0500 Received: from [IPv6:2a01:e0a:2a2:1350:cd10:777c:7b57:3bb6] (unknown [IPv6:2a01:e0a:2a2:1350:cd10:777c:7b57:3bb6]) (Authenticated sender: dftxbs3e) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 6FD6520039C for <44178@debbugs.gnu.org>; Thu, 10 Dec 2020 04:14:31 +0100 (CET) Message-ID: <97498b5966a4e1cd64bc85ec30bbd8007df09173.camel@free.fr> Subject: Re: From: dftxbs3e To: 44178@debbugs.gnu.org Date: Thu, 10 Dec 2020 04:14:31 +0100 In-Reply-To: References: <9395ba7c7499d6c4423982486a0a0fb31cb76e93.camel@free.fr> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 44178 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) It now fails with: $ ./pre-inst-env guix import go -r github.com/hashicorp/consul/api WARNING: (guix import go): `url-fetch' imported from both (guix import utils) and (guix build download) Starting download of /tmp/guix-file.i8tqa2 >From https://proxy.golang.org/github.com/hashicorp/consul/api/@v/v1.8.0.mod. .. v1.8.0.mod 424B 334KiB/s 00:00 [##################] 100.0% Backtrace: In ice-9/boot-9.scm: 1736:10 17 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 16 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 15 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 14 (_ #(#(#))) In guix/ui.scm: 2127:12 13 (run-guix-command _ . _) In guix/scripts/import.scm: 120:11 12 (guix-import . _) In ice-9/eval.scm: 159:9 11 (_ _) In guix/import/utils.scm: 458:31 10 (recursive-import _ #:repo->guix-package _ #:guix-name _ …) 449:33 9 (lookup-node "github.com/hashicorp/consul/api" #f) In guix/utils.scm: 697:8 8 (call-with-temporary-output-file _) In ice-9/eval.scm: 293:34 7 (_ #(#(#(#(# …) …) …) …)) 159:9 6 (_ #(#(#(#(# …) …) …) …)) In ice-9/ports.scm: 445:17 5 (call-with-input-file _ _ #:binary _ #:encoding _ # _) 470:4 4 (_ _) In ice-9/eval.scm: 619:8 3 (_ #(#(#(#)) …)) 619:8 2 (_ #(#(# # …) …)) 293:34 1 (_ #(#(#(#(#(# …) …) …) …) …)) In unknown file: 0 (list-ref ("replace" "github.com/hashicorp/consul/s…" …) …) ERROR: In procedure list-ref: In procedure list-ref: Argument 2 out of range: 4 It's probably because the go.mod file contains a self-referencing replace line (seems unsupported by the code): module github.com/hashicorp/consul/api go 1.12 replace github.com/hashicorp/consul/sdk => ../sdk require ( github.com/hashicorp/consul/sdk v0.7.0 github.com/hashicorp/go-cleanhttp v0.5.1 github.com/hashicorp/go-hclog v0.12.0 github.com/hashicorp/go-rootcerts v1.0.2 github.com/hashicorp/go-uuid v1.0.1 github.com/hashicorp/serf v0.9.5 github.com/mitchellh/mapstructure v1.1.2 github.com/stretchr/testify v1.4.0 ) From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 17:41:38 2021 Received: (at 44178) by debbugs.gnu.org; 23 Jan 2021 22:41:38 +0000 Received: from localhost ([127.0.0.1]:35558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Rb0-0007rf-1n for submit@debbugs.gnu.org; Sat, 23 Jan 2021 17:41:38 -0500 Received: from mail-io1-f43.google.com ([209.85.166.43]:33310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Rax-0007rR-9N for 44178@debbugs.gnu.org; Sat, 23 Jan 2021 17:41:29 -0500 Received: by mail-io1-f43.google.com with SMTP id q129so19009727iod.0 for <44178@debbugs.gnu.org>; Sat, 23 Jan 2021 14:41:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=AfIQgd61Sh0kD6UzUU9JSc0rKkmRCaaBFD1ebOlxmbY=; b=gxEzTPMSm/IdJcxoS6huIgC2Xx1lQow/faxXqn05fPaXQeRj5pxB+/WIo8DdppzOdL tWChQjZ1cXdUxQrsb2CdpII7L3zghkbGAmogPuP0ZEnLz8I4UgwXdrs7ZmouBJ03Yxp6 SlZjGN0lGjkM1awuMh5Q5+ExlwnrVhaiWuuTVopaiVTX4uT2NHVLIXWzmhnRp1cmtXnd OXwB3WRdWIrl4rWXWZUnoE9hHa68X98NZ1ytmAn5DUGT+kGQ3dS2kouJKcshXpdPRacQ s3T8u3hUkDFpvwkpFKhwip4eIsjtm69F4XQ9rVLuPkHW2BqWgGj2oQBz2X1oZJXFyOhU onKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=AfIQgd61Sh0kD6UzUU9JSc0rKkmRCaaBFD1ebOlxmbY=; b=tdxCRjn168qfer+d+aOtI22gQwSUABlYpH1obqRcX+J9D5JwMCD5+P/0O11cVvsklb 7kC0dgA8JNQmr8lYUKU9fR/8Mdr6RnRduxaaDMN9U1lbjIzGfKCw/+5twwsDkpoM5yAe ujjvdUS6ZF1FDLNxihQHTfBRpsJPSHSZGhdB1HCSsOVIdkIHiQeZEIFwIJkFnl/s+uqw C+Pj16zrIJ4ts41UAxoyXXiXq21XoTsKmvUv8x6lKGQGYVGn6rGqwkrSdavABtPMjQ2r eSaEcQMoTN6ILbgTZjknx3WPTyt99yFRgEUNbYvFfPNm+iqQQJfVtd3o4Rz+jfIj8x0P 0TUg== X-Gm-Message-State: AOAM532Q38fwWK76wuVoASpWGd4NHua1vihoG4HeXehU9gFwxmiy5OIr mYeP5C83jE/r/y+WfTK2aAM= X-Google-Smtp-Source: ABdhPJwH0j51zZ4xfe52L9k6xwXb1ysRv9DBuw4UmFEh2AK46CrDeZYuhAJzEREPM+NxWG7u+qu8Gg== X-Received: by 2002:a05:6e02:1c85:: with SMTP id w5mr4897234ill.253.1611441681068; Sat, 23 Jan 2021 14:41:21 -0800 (PST) Received: from washu-v4 (172-221-246-205.res.spectrum.com. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id b17sm9221685ilr.1.2021.01.23.14.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jan 2021 14:41:19 -0800 (PST) From: Katherine Cox-Buday To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: [PATCH] Create importer for Go modules References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> Date: Sat, 23 Jan 2021 16:41:18 -0600 In-Reply-To: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> ("JOULAUD =?utf-8?Q?Fran=C3=A7ois=22's?= message of "Sat, 23 Jan 2021 21:35:08 +0000") Message-ID: <87r1mb6zu9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 44178 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Helio Machado <0x2b3bfa0@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Thanks so much for the patches, Helio, Joulaud! I apologize for the long delay before looking at this again. My time right now is extremely limited due to COVID-19 related childcare and activities. I was negligent and left a patch to bitrot on my computer[1]. This patch supersedes it. In addition to the things this patch corrects, I was/am working on a few other bugs: - There are valid Go Module paths which when queried will not serve the requisite meta tag. I had modified `fetch-module-meta-data` to recursively walk up the module path searching for a valid meta tag (see diff[1]). - I think Joulaud's patch covers this, but replacements relative to a module are a possibility. - For reasons Joulaud calls out, a simple line-parser of the HTML for a module is not sufficient. Since we are pulling pages down from the wider internet, we should fall back on a library made for parsing HTML so we handle any edge-cases (e.g. meta tags split across lines). I am currently looking at `sxml`, and if that doesn't pan out `htmlprag` - Some module homepages issue HTTP redirects. Last time I tested this, `http-fetch` does not handle this properly. I think that covers everything. I have pushed everything (including Joulaud's patch with appropriate attribution) here[2]. I am admittedly new at using email to organize code changes, but using a forge seems easier. [1] https://github.com/guix-mirror/guix/commit/cce35c6d68a9bddf9558e85d2cb8= 8be323da9247 [2] https://github.com/kat-co/guix/tree/create-go-importer Can I suggest we coordinate there, or is that too much of an imposition? - Katherine JOULAUD Fran=C3=A7ois writes: > This patch add a `guix import go` command. > > It was tested with several big repositories and seems to mostly work for > the import part (because building Guix packages is an other story). There > is still bugs blocking e.g. use of any k8s.io modules. > > * guix/import/go.scm: Created Go Importer > * guix/scripts/import.scm: Created Go Importer Subcommand > * guix/import/go.scm (importers): Added Go Importer Subcommand > > Signed-off-by: Francois Joulaud > --- > The patch is a rebased and modified version of the one proposed by > Katherine Cox-Buday. > > Notable modifications are=C2=A0: > - move from (guix json) to (json) > - new parse-go.mod with no "set!" and parsing some go.mod which were in > error before > - adding comments (maybe too much comments) > - renamed SCS to VCS to be in accordance with vocabulary in use in Guix > and in Go worlds > - replacing escape-capital-letters by Helio Machado's go-path-escape > - no pruning of major version in go module names as they are considered > as completely different artefacts by Go programmers > - fixed recursive-import probably broken by the rebase > - force usage of url-fetch from (guix build download) > > I would be happy to hear about problems and perspective for this patch and > will now focus on my next step which is actually building any package. > > Hope I CCed the right persons, I am not really aware of applicable > netiquette here. > > Interdiff=C2=A0: > diff --git a/guix/import/go.scm b/guix/import/go.scm > index 61009f3565..7f5f300f0a 100644 > --- a/guix/import/go.scm > +++ b/guix/import/go.scm > @@ -1,5 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2020 Katherine Cox-Buday > +;;; Copyright =C2=A9 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> > +;;; Copyright =C2=A9 2021 Fran=C3=A7ois Joulaud > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -16,6 +18,21 @@ > ;;; You should have received a copy of the GNU General Public License > ;;; along with GNU Guix. If not, see . >=20=20=20=20 > +;;; (guix import golang) wants to make easier to create Guix package > +;;; declaration for Go modules. > +;;; > +;;; Modules in Go are "collection of related Go packages" which are > +;;; "the unit of source code interchange and versioning". > +;;; Modules are generally hosted in a repository. > +;;; > +;;; At this point it should handle correctly modules which > +;;; - have only Go dependencies; > +;;; - use go.mod; > +;;; - and are accessible from proxy.golang.org (or configured GOPROXY). > +;;; > +;;; We translate Go module paths to a Guix package name under the > +;;; assumption that there will be no collision. > + > (define-module (guix import go) > #:use-module (ice-9 match) > #:use-module (ice-9 rdelim) > @@ -23,7 +40,7 @@ > #:use-module (ice-9 regex) > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-9) > - #:use-module (guix json) > + #:use-module (json) > #:use-module ((guix download) #:prefix download:) > #:use-module (guix import utils) > #:use-module (guix import json) > @@ -33,88 +50,129 @@ > #:use-module ((guix licenses) #:prefix license:) > #:use-module (guix base16) > #:use-module (guix base32) > - #:use-module (guix build download) > + #:use-module ((guix build download) #:prefix build-download:) > #:use-module (web uri) >=20=20=20=20 > #:export (go-module->guix-package > go-module-recursive-import > infer-module-root)) >=20=20=20=20 > -(define (escape-capital-letters s) > - "To avoid ambiguity when serving from case-insensitive file systems,= the > -$module and $version elements are case-encoded by replacing every uppe= rcase > -letter with an exclamation mark followed by the corresponding lower-ca= se > -letter." > - (let ((escaped-string (string))) > - (string-for-each-index > - (lambda (i) > - (let ((c (string-ref s i))) > - (set! escaped-string > - (string-concatenate > - (list escaped-string > - (if (char-upper-case? c) "!" "") > - (string (char-downcase c))))))) > - s) > - escaped-string)) > +(define (go-path-escape path) > + "Escape a module path by replacing every uppercase letter with an ex= clamation > +mark followed with its lowercase equivalent, as per the module Escaped= Paths > +specification. https://godoc.org/golang.org/x/mod/module#hdr-Escaped_P= aths" > + (define (escape occurrence) > + (string-append "!" (string-downcase (match:substring occurrence)))) > + (regexp-substitute/global #f "[A-Z]" path 'pre escape 'post)) > + >=20=20=20=20 > (define (fetch-latest-version goproxy-url module-path) > "Fetches the version number of the latest version for MODULE-PATH fr= om the > given GOPROXY-URL server." > (assoc-ref > (json-fetch (format #f "~a/~a/@latest" goproxy-url > - (escape-capital-letters module-path))) > + (go-path-escape module-path))) > "Version")) >=20=20=20=20 > (define (fetch-go.mod goproxy-url module-path version file) > "Fetches go.mod from the given GOPROXY-URL server for the given MODU= LE-PATH > and VERSION." > - (url-fetch (format #f "~a/~a/@v/~a.mod" goproxy-url > - (escape-capital-letters module-path) > - (escape-capital-letters version)) > - file > - #:print-build-trace? #f)) > + (let ((url (format #f "~a/~a/@v/~a.mod" goproxy-url > + (go-path-escape module-path) > + (go-path-escape version)))) > + (parameterize ((current-output-port (current-error-port))) > + (build-download:url-fetch url > + file > + #:print-build-trace? #f)))) >=20=20=20=20 > (define (parse-go.mod go.mod-path) > - "Parses a go.mod file and returns an alist of module path to version= ." > + "PARSE-GO.MOD takes a filename in GO.MOD-PATH and extract a list of > +requirements from it." > + ;; We parse only a subset of https://golang.org/ref/mod#go-mod-file-= grammar > + ;; which we think necessary for our use case. > + (define (toplevel results) > + "Main parser, RESULTS is a pair of alist serving as accumulator for > + all encountered requirements and replacements." > + (let ((line (read-line))) > + (cond > + ((eof-object? line) > + ;; parsing ended, give back the result > + results) > + ((string=3D? line "require (") > + ;; a require block begins, delegate parsing to IN-REQUIRE > + (in-require results)) > + ((string-prefix? "require " line) > + ;; a require directive by itself > + (let* ((stripped-line (string-drop line 8)) > + (new-results (require-directive results stripped-line))) > + (toplevel new-results))) > + ((string-prefix? "replace " line) > + ;; a replace directive by itself > + (let* ((stripped-line (string-drop line 8)) > + (new-results (replace-directive results stripped-line))) > + (toplevel new-results))) > + (#t > + ;; unrecognised line, ignore silently > + (toplevel results))))) > + (define (in-require results) > + (let ((line (read-line))) > + (cond > + ((eof-object? line) > + ;; this should never happen here but we ignore silently > + results) > + ((string=3D? line ")") > + ;; end of block, coming back to toplevel > + (toplevel results)) > + (#t > + (in-require (require-directive results line)))))) > + (define (replace-directive results line) > + "Extract replaced modules and new requirements from replace direct= ive > + in LINE and add to RESULTS." > + ;; ReplaceSpec =3D ModulePath [ Version ] "=3D>" FilePath newline > + ;; | ModulePath [ Version ] "=3D>" ModulePath Version = newline . > + (let* ((requirements (car results)) > + (replaced (cdr results)) > + (re (string-concatenate > + '("([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?" > + "[[:blank:]]+" "=3D>" "[[:blank:]]+" > + "([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?"))) > + (match (string-match re line)) > + (module-path (match:substring match 1)) > + (version (match:substring match 3)) > + (new-module-path (match:substring match 4)) > + (new-version (match:substring match 6)) > + (new-replaced (acons module-path version replaced)) > + (new-requirements > + (if (string-match "^\\.?\\./" new-module-path) > + requirements > + (acons new-module-path new-version requirements)))) > + (cons new-requirements new-replaced))) > + (define (require-directive results line) > + "Extract requirement from LINE and add it to RESULTS." > + (let* ((requirements (car results)) > + (replaced (cdr results)) > + ;; A line in a require directive is composed of a module pa= th and > + ;; a version separated by whitespace and an optionnal '//' = comment at > + ;; the end. > + (re (string-concatenate > + '("^[[:blank:]]*" > + "([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)" > + "([[:blank:]]+//.*)?"))) > + (match (string-match re line)) > + (module-path (match:substring match 1)) > + (version (match:substring match 2))) > + (cons (acons module-path version requirements) replaced))) > (with-input-from-file go.mod-path > (lambda () > - (let ((in-require? #f) > - (requirements (list))) > - (do ((line (read-line) (read-line))) > - ((eof-object? line)) > - (set! line (string-trim line)) > - ;; The parser is either entering, within, exiting, or after = the > - ;; require block. The Go toolchain is trustworthy so edge-ca= ses like > - ;; double-entry, etc. need not complect the parser. > - (cond > - ((string=3D? line "require (") > - (set! in-require? #t)) > - ((and in-require? (string=3D? line ")")) > - (set! in-require? #f)) > - (in-require? > - (let* ((requirement (string-split line #\space)) > - ;; Modules should be unquoted > - (module-path (string-delete #\" (car requirement))) > - (version (list-ref requirement 1))) > - (set! requirements (acons module-path version requiremen= ts)))) > - ((string-prefix? "replace" line) > - (let* ((requirement (string-split line #\space)) > - (module-path (list-ref requirement 1)) > - (new-module-path (list-ref requirement 3)) > - (version (list-ref requirement 4))) > - (set! requirements (assoc-remove! requirements module-pa= th)) > - (set! requirements (acons new-module-path version requir= ements)))))) > - requirements)))) > - > -(define (module-path-without-major-version module-path) > - "Go modules can be appended with a major version indicator, > -e.g. /v3. Sometimes it is desirable to work with the root module path.= For > -instance, for a module path github.com/foo/bar/v3 this function returns > -github.com/foo/bar." > - (let ((m (string-match "(.*)\\/v[0-9]+$" module-path))) > - (if m > - (match:substring m 1) > - module-path))) > + (let* ((results (toplevel '(() . ()))) > + (requirements (car results)) > + (replaced (cdr results))) > + ;; At last we remove replaced modules from the requirements li= st > + (fold > + (lambda (replacedelem requirements) > + (alist-delete! (car replacedelem) requirements)) > + requirements > + replaced))))) >=20=20=20=20 > (define (infer-module-root module-path) > "Go modules can be defined at any level of a repository's tree, but = querying > @@ -124,38 +182,42 @@ root path from its path. For a set of well-known = forges, the pattern of what > consists of a module's root page is known before hand." > ;; See the following URL for the official Go equivalent: > ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea= 21b99f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 > - (define-record-type > - (make-scs url-prefix root-regex type) > - scs? > - (url-prefix scs-url-prefix) > - (root-regex scs-root-regex) > - (type scs-type)) > - (let* ((known-scs > + ;; > + ;; FIXME: handle module path with VCS qualifier as described in > + ;; https://golang.org/ref/mod#vcs-find and > + ;; https://golang.org/cmd/go/#hdr-Remote_import_paths > + (define-record-type > + (make-vcs url-prefix root-regex type) > + vcs? > + (url-prefix vcs-url-prefix) > + (root-regex vcs-root-regex) > + (type vcs-type)) > + (let* ((known-vcs > (list > - (make-scs > + (make-vcs > "github.com" > "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Z= a-z0-9_.\\-]+)*$" > 'git) > - (make-scs > + (make-vcs > "bitbucket.org" > "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(= /[A-Za-z0-9_.\\-]+)*$`" > 'unknown) > - (make-scs > + (make-vcs > "hub.jazz.net/git/" > "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Z= a-z0-9_.\\-]+)*$" > 'git) > - (make-scs > + (make-vcs > "git.apache.org" > "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\= \-]+)*$" > 'git) > - (make-scs > + (make-vcs > "git.openstack.org" > "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-= ]+)(\\.git)?(/[A-Za-z0-9_.\\-]+)*$" > 'git))) > - (scs (find (lambda (scs) (string-prefix? (scs-url-prefix scs)= module-path)) > - known-scs))) > - (if scs > - (match:substring (string-match (scs-root-regex scs) module-pat= h) 1) > + (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs)= module-path)) > + known-vcs))) > + (if vcs > + (match:substring (string-match (vcs-root-regex vcs) module-pat= h) 1) > module-path))) >=20=20=20=20 > (define (to-guix-package-name module-path) > @@ -164,8 +226,7 @@ consists of a module's root page is known before ha= nd." > (string-append "go-" > (string-replace-substring > (string-replace-substring > - ;; Guix has its own field for version > - (module-path-without-major-version module-path) > + module-path > "." "-") > "/" "-")))) >=20=20=20=20 > @@ -173,7 +234,9 @@ consists of a module's root page is known before ha= nd." > "Fetches module meta-data from a module's landing page. This is nece= ssary > because goproxy servers don't currently provide all the information ne= eded to > build a package." > - (let* ((port (http-fetch (string->uri (format #f "https://~a?go-get= =3D1" module-path)))) > + ;; FIXME: This code breaks on k8s.io which have a meta tag splitted > + ;; on several lines > + (let* ((port (build-download:http-fetch (string->uri (format #f "htt= ps://~a?go-get=3D1" module-path)))) > (module-metadata #f) > (meta-tag-prefix " (meta-tag-prefix-length (string-length meta-tag-prefix))) > @@ -185,7 +248,7 @@ build a package." > (let* ((start (+ meta-tag-index meta-tag-prefix-length)) > (end (string-index line #\" start))) > (set! module-metadata > - (string-split (substring/shared line start end) #\space)= ))))) > + (string-split (substring/shared line start end) #\sp= ace)))))) > (close-port port) > module-metadata)) >=20=20=20=20 > @@ -244,7 +307,7 @@ control system is being used." > (dependencies (map car (parse-go.mod temp))) > (guix-name (to-guix-package-name module-path)) > (root-module-path (infer-module-root module-path)) > - ;; SCS type and URL are not included in goproxy informatio= n. For > + ;; VCS type and URL are not included in goproxy informatio= n. For > ;; this we need to fetch it from the official module page. > (meta-data (fetch-module-meta-data root-module-path)) > (scs-type (module-meta-data-scs meta-data)) > @@ -268,9 +331,10 @@ control system is being used." >=20=20=20=20 > (define* (go-module-recursive-import package-name > #:key (goproxy-url "https://proxy= .golang.org")) > - (recursive-import package-name #f > - #:repo->guix-package > - (lambda (name _) > - (go-module->guix-package name > - #:goproxy-url goproxy-u= rl)) > - #:guix-name to-guix-package-name)) > + (recursive-import > + package-name > + #:repo->guix-package (lambda* (name . _) > + (go-module->guix-package > + name > + #:goproxy-url goproxy-url)) > + #:guix-name to-guix-package-name)) > > guix/import/go.scm | 340 +++++++++++++++++++++++++++++++++++++ > guix/scripts/import.scm | 2 +- > guix/scripts/import/go.scm | 118 +++++++++++++ > 3 files changed, 459 insertions(+), 1 deletion(-) > create mode 100644 guix/import/go.scm > create mode 100644 guix/scripts/import/go.scm > > diff --git a/guix/import/go.scm b/guix/import/go.scm > new file mode 100644 > index 0000000000..7f5f300f0a > --- /dev/null > +++ b/guix/import/go.scm > @@ -0,0 +1,340 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2020 Katherine Cox-Buday > +;;; Copyright =C2=A9 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> > +;;; Copyright =C2=A9 2021 Fran=C3=A7ois Joulaud > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +;;; (guix import golang) wants to make easier to create Guix package > +;;; declaration for Go modules. > +;;; > +;;; Modules in Go are "collection of related Go packages" which are > +;;; "the unit of source code interchange and versioning". > +;;; Modules are generally hosted in a repository. > +;;; > +;;; At this point it should handle correctly modules which > +;;; - have only Go dependencies; > +;;; - use go.mod; > +;;; - and are accessible from proxy.golang.org (or configured GOPROXY). > +;;; > +;;; We translate Go module paths to a Guix package name under the > +;;; assumption that there will be no collision. > + > +(define-module (guix import go) > + #:use-module (ice-9 match) > + #:use-module (ice-9 rdelim) > + #:use-module (ice-9 receive) > + #:use-module (ice-9 regex) > + #:use-module (srfi srfi-1) > + #:use-module (srfi srfi-9) > + #:use-module (json) > + #:use-module ((guix download) #:prefix download:) > + #:use-module (guix import utils) > + #:use-module (guix import json) > + #:use-module (guix packages) > + #:use-module (guix upstream) > + #:use-module (guix utils) > + #:use-module ((guix licenses) #:prefix license:) > + #:use-module (guix base16) > + #:use-module (guix base32) > + #:use-module ((guix build download) #:prefix build-download:) > + #:use-module (web uri) > + > + #:export (go-module->guix-package > + go-module-recursive-import > + infer-module-root)) > + > +(define (go-path-escape path) > + "Escape a module path by replacing every uppercase letter with an excl= amation > +mark followed with its lowercase equivalent, as per the module Escaped P= aths > +specification. https://godoc.org/golang.org/x/mod/module#hdr-Escaped_Pat= hs" > + (define (escape occurrence) > + (string-append "!" (string-downcase (match:substring occurrence)))) > + (regexp-substitute/global #f "[A-Z]" path 'pre escape 'post)) > + > + > +(define (fetch-latest-version goproxy-url module-path) > + "Fetches the version number of the latest version for MODULE-PATH from= the > +given GOPROXY-URL server." > + (assoc-ref > + (json-fetch (format #f "~a/~a/@latest" goproxy-url > + (go-path-escape module-path))) > + "Version")) > + > +(define (fetch-go.mod goproxy-url module-path version file) > + "Fetches go.mod from the given GOPROXY-URL server for the given MODULE= -PATH > +and VERSION." > + (let ((url (format #f "~a/~a/@v/~a.mod" goproxy-url > + (go-path-escape module-path) > + (go-path-escape version)))) > + (parameterize ((current-output-port (current-error-port))) > + (build-download:url-fetch url > + file > + #:print-build-trace? #f)))) > + > +(define (parse-go.mod go.mod-path) > + "PARSE-GO.MOD takes a filename in GO.MOD-PATH and extract a list of > +requirements from it." > + ;; We parse only a subset of https://golang.org/ref/mod#go-mod-file-gr= ammar > + ;; which we think necessary for our use case. > + (define (toplevel results) > + "Main parser, RESULTS is a pair of alist serving as accumulator for > + all encountered requirements and replacements." > + (let ((line (read-line))) > + (cond > + ((eof-object? line) > + ;; parsing ended, give back the result > + results) > + ((string=3D? line "require (") > + ;; a require block begins, delegate parsing to IN-REQUIRE > + (in-require results)) > + ((string-prefix? "require " line) > + ;; a require directive by itself > + (let* ((stripped-line (string-drop line 8)) > + (new-results (require-directive results stripped-line))) > + (toplevel new-results))) > + ((string-prefix? "replace " line) > + ;; a replace directive by itself > + (let* ((stripped-line (string-drop line 8)) > + (new-results (replace-directive results stripped-line))) > + (toplevel new-results))) > + (#t > + ;; unrecognised line, ignore silently > + (toplevel results))))) > + (define (in-require results) > + (let ((line (read-line))) > + (cond > + ((eof-object? line) > + ;; this should never happen here but we ignore silently > + results) > + ((string=3D? line ")") > + ;; end of block, coming back to toplevel > + (toplevel results)) > + (#t > + (in-require (require-directive results line)))))) > + (define (replace-directive results line) > + "Extract replaced modules and new requirements from replace directive > + in LINE and add to RESULTS." > + ;; ReplaceSpec =3D ModulePath [ Version ] "=3D>" FilePath newline > + ;; | ModulePath [ Version ] "=3D>" ModulePath Version ne= wline . > + (let* ((requirements (car results)) > + (replaced (cdr results)) > + (re (string-concatenate > + '("([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?" > + "[[:blank:]]+" "=3D>" "[[:blank:]]+" > + "([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?"))) > + (match (string-match re line)) > + (module-path (match:substring match 1)) > + (version (match:substring match 3)) > + (new-module-path (match:substring match 4)) > + (new-version (match:substring match 6)) > + (new-replaced (acons module-path version replaced)) > + (new-requirements > + (if (string-match "^\\.?\\./" new-module-path) > + requirements > + (acons new-module-path new-version requirements)))) > + (cons new-requirements new-replaced))) > + (define (require-directive results line) > + "Extract requirement from LINE and add it to RESULTS." > + (let* ((requirements (car results)) > + (replaced (cdr results)) > + ;; A line in a require directive is composed of a module path= and > + ;; a version separated by whitespace and an optionnal '//' co= mment at > + ;; the end. > + (re (string-concatenate > + '("^[[:blank:]]*" > + "([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)" > + "([[:blank:]]+//.*)?"))) > + (match (string-match re line)) > + (module-path (match:substring match 1)) > + (version (match:substring match 2))) > + (cons (acons module-path version requirements) replaced))) > + (with-input-from-file go.mod-path > + (lambda () > + (let* ((results (toplevel '(() . ()))) > + (requirements (car results)) > + (replaced (cdr results))) > + ;; At last we remove replaced modules from the requirements list > + (fold > + (lambda (replacedelem requirements) > + (alist-delete! (car replacedelem) requirements)) > + requirements > + replaced))))) > + > +(define (infer-module-root module-path) > + "Go modules can be defined at any level of a repository's tree, but qu= erying > +for the meta tag usually can only be done at the webpage at the root of = the > +repository. Therefore, it is sometimes necessary to try and derive a mod= ule's > +root path from its path. For a set of well-known forges, the pattern of = what > +consists of a module's root page is known before hand." > + ;; See the following URL for the official Go equivalent: > + ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21= b99f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 > + ;; > + ;; FIXME: handle module path with VCS qualifier as described in > + ;; https://golang.org/ref/mod#vcs-find and > + ;; https://golang.org/cmd/go/#hdr-Remote_import_paths > + (define-record-type > + (make-vcs url-prefix root-regex type) > + vcs? > + (url-prefix vcs-url-prefix) > + (root-regex vcs-root-regex) > + (type vcs-type)) > + (let* ((known-vcs > + (list > + (make-vcs > + "github.com" > + "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-= z0-9_.\\-]+)*$" > + 'git) > + (make-vcs > + "bitbucket.org" > + "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[= A-Za-z0-9_.\\-]+)*$`" > + 'unknown) > + (make-vcs > + "hub.jazz.net/git/" > + "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-= z0-9_.\\-]+)*$" > + 'git) > + (make-vcs > + "git.apache.org" > + "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-= ]+)*$" > + 'git) > + (make-vcs > + "git.openstack.org" > + "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+= )(\\.git)?(/[A-Za-z0-9_.\\-]+)*$" > + 'git))) > + (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs) m= odule-path)) > + known-vcs))) > + (if vcs > + (match:substring (string-match (vcs-root-regex vcs) module-path)= 1) > + module-path))) > + > +(define (to-guix-package-name module-path) > + "Converts a module's path to the canonical Guix format for Go packages= ." > + (string-downcase > + (string-append "go-" > + (string-replace-substring > + (string-replace-substring > + module-path > + "." "-") > + "/" "-")))) > + > +(define (fetch-module-meta-data module-path) > + "Fetches module meta-data from a module's landing page. This is necess= ary > +because goproxy servers don't currently provide all the information need= ed to > +build a package." > + ;; FIXME: This code breaks on k8s.io which have a meta tag splitted > + ;; on several lines > + (let* ((port (build-download:http-fetch (string->uri (format #f "https= ://~a?go-get=3D1" module-path)))) > + (module-metadata #f) > + (meta-tag-prefix " + (meta-tag-prefix-length (string-length meta-tag-prefix))) > + (do ((line (read-line port) (read-line port))) > + ((or (eof-object? line) > + module-metadata)) > + (let ((meta-tag-index (string-contains line meta-tag-prefix))) > + (when meta-tag-index > + (let* ((start (+ meta-tag-index meta-tag-prefix-length)) > + (end (string-index line #\" start))) > + (set! module-metadata > + (string-split (substring/shared line start end) #\spac= e)))))) > + (close-port port) > + module-metadata)) > + > +(define (module-meta-data-scs meta-data) > + "Return the source control system specified by a module's meta-data." > + (string->symbol (list-ref meta-data 1))) > + > +(define (module-meta-data-repo-url meta-data goproxy-url) > + "Return the URL where the fetcher which will be used can download the = source > +control." > + (if (member (module-meta-data-scs meta-data) '(fossil mod)) > + goproxy-url > + (list-ref meta-data 2))) > + > +(define (source-uri scs-type scs-repo-url file) > + "Generate the `origin' block of a package depending on what type of so= urce > +control system is being used." > + (case scs-type > + ((git) > + `(origin > + (method git-fetch) > + (uri (git-reference > + (url ,scs-repo-url) > + (commit (string-append "v" version)))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + ,(guix-hash-url file))))) > + ((hg) > + `(origin > + (method hg-fetch) > + (uri (hg-reference > + (url ,scs-repo-url) > + (changeset ,version))) > + (file-name (format #f "~a-~a-checkout" name version)))) > + ((svn) > + `(origin > + (method svn-fetch) > + (uri (svn-reference > + (url ,scs-repo-url) > + (revision (string->number version)) > + (recursive? #f))) > + (file-name (format #f "~a-~a-checkout" name version)) > + (sha256 > + (base32 > + ,(guix-hash-url file))))) > + (else > + (raise-exception (format #f "unsupported scs type: ~a" scs-type))))) > + > +(define* (go-module->guix-package module-path #:key (goproxy-url "https:= //proxy.golang.org")) > + (call-with-temporary-output-file > + (lambda (temp port) > + (let* ((latest-version (fetch-latest-version goproxy-url module-pat= h)) > + (go.mod-path (fetch-go.mod goproxy-url module-path latest-ve= rsion > + temp)) > + (dependencies (map car (parse-go.mod temp))) > + (guix-name (to-guix-package-name module-path)) > + (root-module-path (infer-module-root module-path)) > + ;; VCS type and URL are not included in goproxy information.= For > + ;; this we need to fetch it from the official module page. > + (meta-data (fetch-module-meta-data root-module-path)) > + (scs-type (module-meta-data-scs meta-data)) > + (scs-repo-url (module-meta-data-repo-url meta-data goproxy-u= rl))) > + (values > + `(package > + (name ,guix-name) > + ;; Elide the "v" prefix Go uses > + (version ,(string-trim latest-version #\v)) > + (source > + ,(source-uri scs-type scs-repo-url temp)) > + (build-system go-build-system) > + ,@(maybe-inputs (map to-guix-package-name dependencies)) > + ;; TODO(katco): It would be nice to make an effort to fetch t= his > + ;; from known forges, e.g. GitHub > + (home-page ,(format #f "https://~a" root-module-path)) > + (synopsis "A Go package") > + (description ,(format #f "~a is a Go package." guix-name)) > + (license #f)) > + dependencies))))) > + > +(define* (go-module-recursive-import package-name > + #:key (goproxy-url "https://proxy.g= olang.org")) > + (recursive-import > + package-name > + #:repo->guix-package (lambda* (name . _) > + (go-module->guix-package > + name > + #:goproxy-url goproxy-url)) > + #:guix-name to-guix-package-name)) > diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm > index 0a3863f965..1d2b45d942 100644 > --- a/guix/scripts/import.scm > +++ b/guix/scripts/import.scm > @@ -77,7 +77,7 @@ rather than \\n." > ;;; >=20=20 > (define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa= " "gem" > - "cran" "crate" "texlive" "json" "opam")) > + "go" "cran" "crate" "texlive" "json" "opam")) >=20=20 > (define (resolve-importer name) > (let ((module (resolve-interface > diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm > new file mode 100644 > index 0000000000..fde7555973 > --- /dev/null > +++ b/guix/scripts/import/go.scm > @@ -0,0 +1,118 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2020 Katherine Cox-Buday > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (guix scripts import go) > + #:use-module (guix ui) > + #:use-module (guix utils) > + #:use-module (guix scripts) > + #:use-module (guix import go) > + #:use-module (guix scripts import) > + #:use-module (srfi srfi-1) > + #:use-module (srfi srfi-11) > + #:use-module (srfi srfi-37) > + #:use-module (ice-9 match) > + #:use-module (ice-9 format) > + #:export (guix-import-go)) > + > + > +;;; > +;;; Command-line options. > +;;; > + > +(define %default-options > + '()) > + > +(define (show-help) > + (display (G_ "Usage: guix import go PACKAGE-PATH > +Import and convert the Go module for PACKAGE-PATH.\n")) > + (display (G_ " > + -h, --help display this help and exit")) > + (display (G_ " > + -V, --version display version information and exit")) > + (display (G_ " > + -r, --recursive generate package expressions for all Go modules\ > + that are not yet in Guix")) > + (display (G_ " > + -p, --goproxy=3DGOPROXY specify which goproxy server to use")) > + (newline) > + (show-bug-report-information)) > + > +(define %options > + ;; Specification of the command-line options. > + (cons* (option '(#\h "help") #f #f > + (lambda args > + (show-help) > + (exit 0))) > + (option '(#\V "version") #f #f > + (lambda args > + (show-version-and-exit "guix import go"))) > + (option '(#\r "recursive") #f #f > + (lambda (opt name arg result) > + (alist-cons 'recursive #t result))) > + (option '(#\p "goproxy") #t #f > + (lambda (opt name arg result) > + (alist-cons 'goproxy > + (string->symbol arg) > + (alist-delete 'goproxy result)))) > + %standard-import-options)) > + > + > +;;; > +;;; Entry point. > +;;; > + > +(define (guix-import-go . args) > + (define (parse-options) > + ;; Return the alist of option values. > + (args-fold* args %options > + (lambda (opt name arg result) > + (leave (G_ "~A: unrecognized option~%") name)) > + (lambda (arg result) > + (alist-cons 'argument arg result)) > + %default-options)) > + > + (let* ((opts (parse-options)) > + (args (filter-map (match-lambda > + (('argument . value) > + value) > + (_ #f)) > + (reverse opts)))) > + (match args > + ((module-name) > + (if (assoc-ref opts 'recursive) > + (map (match-lambda > + ((and ('package ('name name) . rest) pkg) > + `(define-public ,(string->symbol name) > + ,pkg)) > + (_ #f)) > + (go-module-recursive-import module-name > + #:goproxy-url > + (or (assoc-ref opts 'goproxy) > + "https://proxy.golang.or= g"))) > + (let ((sexp (go-module->guix-package module-name > + #:goproxy-url > + (or (assoc-ref opts 'gop= roxy) > + "https://proxy.golan= g.org")))) > + (unless sexp > + (leave (G_ "failed to download meta-data for module '~a'~= %") > + module-name)) > + sexp))) > + (() > + (leave (G_ "too few arguments~%"))) > + ((many ...) > + (leave (G_ "too many arguments~%")))))) --=20 Katherine From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 18:23:51 2021 Received: (at 44178) by debbugs.gnu.org; 23 Jan 2021 23:23:51 +0000 Received: from localhost ([127.0.0.1]:35599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3SFx-0006jw-Vq for submit@debbugs.gnu.org; Sat, 23 Jan 2021 18:23:51 -0500 Received: from mx08-00115501.pphosted.com ([91.207.212.23]:30758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3QYq-0001wR-T0 for 44178@debbugs.gnu.org; Sat, 23 Jan 2021 16:35:15 -0500 Received: from pps.filterd (m0030078.ppops.net [127.0.0.1]) by mx08-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10NLUv5S024623; Sat, 23 Jan 2021 22:35:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=radiofrance20190306; bh=c/E7epY40VpNm3Ov0BETlgEjFfGd5m1P1cmMca8kwXs=; b=YWMs10D9sjJkknF1SiAFuXdp1e3SMgXV/8cANWHS1OF97CFt4U4IcZKDENduheDwezq5 vwGMwefubpxojjzmST345FdlGffGTFqPpaPo+aIzo3Bi74wr/ClM7h9P8Iqi33Is3YBg PZ9WEhmZdFMwc9yovrp4F4Hc+QRhRh7faXpAiYSubJwAnXLTysJpUEiqAbWQjNYpvKyt CCJq+3qVF7lH+1VTYibbF6S36kWnrRDD9fzQiPHwo+YptWFqHAbgZz4fE0cdgxp/u7xK HE5MlfWL6Iab6sdHMPaWzoe+HknfToer2HH4cEwZoTRun8shWmk4F0auUHgUtKxh1jNE Zg== Received: from fra01-pr2-obe.outbound.protection.outlook.com (mail-pr2fra01lp0105.outbound.protection.outlook.com [104.47.24.105]) by mx08-00115501.pphosted.com with ESMTP id 3688byh1xc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Jan 2021 22:35:11 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LfVN/cdBq/yLjAPbyIBXqyyY5clJH4b5NoGWgJFTO65w1ZL3V1jWZhv6FLroKmFkzVsgd/4C79VsO3g3WyPr3Pv4i5x6YS1b2KwiSd8KUp3buNtid3tJ8a5JrENgGiwutWC2jqUTvBOb1tiSPFy3HzIbhneL+Y16XAd0RG1WKaY6Fmf/1McPeeQ1Hf+ZBFA6qRe9jx445ftMkLF4qvEclDLFJO7fyE/eHoNB9UaGyZx0cAggnb8Tku7nujS2Cybu1d4LFN5MclioIuAIG2SKAUlkDOpXkRe5de6wf48St+aiiaTgwOiCPqgQp7RW9Te6ys7D6PR9RdP9wPaBR9hC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c/E7epY40VpNm3Ov0BETlgEjFfGd5m1P1cmMca8kwXs=; b=iSwmKoYHubU3ILVJ0HzJxGrYHAG3WRUgfAwGOb+Kvvhcw23v9yM0ejgjTM3v2LR4jWj7ZeSObXSZPO8hR2f+wDBu/E1yGEcVy0ReEJTu3XXJLxA4brGxPYS9x3Ehdm5QtdDPN68hJGc5sluLo9wMIwxBtHhgtTrVOXUl718e7/fcXaRMcXs62nG4hgKb54a7gOaQ7buioOn6RUS/fJGtEBR/hZXB0HCnGdmp8eNGeUBKOS8W2WYatjctVEaz1FyyC6NChyc2MEjkHJdn4NV/MgfErTxEB469t2k1GiaEDFqs0e+70xkJxjFbpP7SDLwFxlQYqsafB84Z+315gFJ4Ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c/E7epY40VpNm3Ov0BETlgEjFfGd5m1P1cmMca8kwXs=; b=HRLN3aYCqz0zydCI1cH38ZD1cmNSSgGMGcPrh9vq9Y1VgOMqdg0TCssQyCgXnJ4CfUxNiEoyi8ts9iO3pIM9rNae/OqzFOzeaSPd7o4uxlyne+FS4/tu4z+yYYIBS5WMYs60cSdN/pVZX77hXEUPHi6F5HWAru4u5l9p02a3/6c= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.14; Sat, 23 Jan 2021 21:35:09 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::9b7:6491:8aa7:550b]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::9b7:6491:8aa7:550b%3]) with mapi id 15.20.3763.016; Sat, 23 Jan 2021 21:35:08 +0000 From: =?iso-8859-1?Q?JOULAUD_Fran=E7ois?= To: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org> Subject: [PATCH] Create importer for Go modules Thread-Topic: [PATCH] Create importer for Go modules Thread-Index: AQHW8c+fh3EThKxKn0aE+FBPMWbUYQ== Date: Sat, 23 Jan 2021 21:35:08 +0000 Message-ID: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> In-Reply-To: Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: debbugs.gnu.org; dkim=none (message not signed) header.d=none;debbugs.gnu.org; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b4cff3e2-da60-4670-2bdf-08d8bfe6c1e3 x-ms-traffictypediagnostic: PR0P264MB0492: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rnEERXYaoW2OULCXw/mUlKraibknnUUws9gOkVlVHpMh+RJUhmV4vekN2QYY8I19i78maZw+A+Cb8frsDKk5SSXFeP/5qcTyozvPK2/ax0EjT8okxxY/T+BZSd5asOqzNZVZ+DKiTjf0Gq1wLAJOpDE+PU/wkRz+QhbBdbv421ZwxFgRyBEoCA82tF8vBbN47Rrgh0+0M95zVM3+JB0e3W1XZTngcy0AXcWFFE3Uk3Ee0jH0jOV3TMCGcuY4bRnl6Ujjz4PVtUK7ZnJAZDjD1HKiMjVbHzVhHltj2ltalS8zZgLPPQAzXqL6mg6kXX0eV8BrnhMyiK6Qbr/JQClRonzu3TRGYmtsB37n7Zxu/tv2ZibcRTB1+h1dGfb4RoX+wIEYT8o7FDesILxdaAtRRNRt50ZmMxhkHeiNNjZ+rOybdltobaziRSzM+E7GRFY+Ba0ewGOJfv51nG+XR5r5y4ZzWB0Jum78B6wdBYFbTikcLchbLS/0JK1joNeQMqVxFqIg0IjUCjWhFOtQIAlGVwPPSVaptrrOaQ9nW1bboFTjWfArQZ3ANHaLmj/NJAtqDb2lgXnivzDLfqDcZCdMMvgeDQKG7nCN4Ser9Q+TXHs1ewg8/NEF/J5NMKwbG8GOyo65dyuyc4ExeMvdTD0KBw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39850400004)(136003)(366004)(396003)(8936002)(6506007)(186003)(5660300002)(1076003)(26005)(316002)(4326008)(6486002)(8676002)(64756008)(66446008)(66556008)(66476007)(66946007)(76116006)(2906002)(86362001)(966005)(54906003)(6916009)(83380400001)(9686003)(478600001)(71200400001)(30864003)(66574015)(6512007)(2004002)(579004)(559001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?gfjjLxBpUS5W8JxwSwrheKPOMubV6kb1Nsnf5ct/xZMf/rIINPxNtnItdG?= =?iso-8859-1?Q?gNgLgY/sSoD3kxFxVw2caCjgCbI93lLtVp+wxJAk+CVEeCd86YttxaPt1Y?= =?iso-8859-1?Q?c1yvbR2J0v5wY7jS3Q8xDYaOWPp0LSvxaa996hpTEbMjqXGkoBvAke0IEJ?= =?iso-8859-1?Q?NxgSYbAS5XDXDZk9DNlIB3p6BVOnJy3RXdOjO2EJnIiP1glKH2pI1BUTlC?= =?iso-8859-1?Q?H33HOffUe4JOg8W+lkL/MP2vhL5KGLY4F6X4Jm5jWM2o8zpzI3DIVDKXnm?= =?iso-8859-1?Q?ysRzJEyN+CRLKEze6h/UL89l8aUuF+yUTZ7NhxGpXusIYzvbsxhXysPjb6?= =?iso-8859-1?Q?EtJZW/Br61O0y661MAJN/BnKnmkVvrxR6TtR1i67nC5qXABWhsaOiKy3AF?= =?iso-8859-1?Q?seGZ9oAeETOV9SXSw9SeynhdEPvh2shhdCZW5Kn31ASZ4z+mfnT8bVMOrn?= =?iso-8859-1?Q?IVIGxK8KlibQwWkJ/YxOab8vzTcDKijhOFbvm5KHyIvIGuH78VArRKmSKX?= =?iso-8859-1?Q?MaM8tZ1ekI/StFAEwI1xfDUN3+nrDDlxmhJ9VRxWSjHNxezbo/fVNrZjQE?= =?iso-8859-1?Q?m+p2Fks456Vmw2gko0MCa8tEzV582xk38PUskqPYJJ0Y7J0Hr1weKcfDn5?= =?iso-8859-1?Q?S+Ru1q/jWY20votRwFyYyzJNtMdh++FAczxI0x1jyqx9Ej3EqKKpxyx2/e?= =?iso-8859-1?Q?YGmBj45FzHaoWMP40/Tx6tJzeHcyhSVrWzvjJ/C1BoEARwSUTELBqR8bCI?= =?iso-8859-1?Q?qMhnUzERqs1uqkYyIQl/wWFAtIKLgtA/GQLYsd4Pd49568Cip4JhKvRcXM?= =?iso-8859-1?Q?Gr6M8KpkO5bIcbgVRGeZf/cV6KoehNQjif9ZBu3G6NAIu0aUqjYG65AdK+?= =?iso-8859-1?Q?ZdCKNnh45pyaEp1nP2Ho4oTW93TUvMPrLXAnffZM6i+QsAAL2JgG8PKODt?= =?iso-8859-1?Q?w7c17fiut0ZOgfx8xKTfVU8ZWY7RwT+1Zy2XSbf6y9e7RZE0AUolWBgiJK?= =?iso-8859-1?Q?offyn+BbKyR69e3eQPYFBKtAUzFfqw9lp2QusOGfB9MaRl6qM7TGaOHg3x?= =?iso-8859-1?Q?oWEATgY3YNals5n8IqymBj/jt2YZLrAI5yPdsd2gJYU/?= Content-Type: text/plain; charset="iso-8859-1" Content-ID: <69EE4CB1F6B8DF45B593FA40B59EECD4@FRAP264.PROD.OUTLOOK.COM> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: b4cff3e2-da60-4670-2bdf-08d8bfe6c1e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2021 21:35:08.7889 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SVkCT04BH8E7Oy7MxTI9EMda5NS5POdgtEKmebBf6xr+G/eqEjW056NAehlPZFFUdDDeFgd6ufviX19+ijlEJ5i869l+qdQIAmeFpe+eOWn+bLgMkq8LhhXGgb/uRzYY X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB0492 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-23_12:2021-01-22, 2021-01-23 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 clxscore=1011 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101230127 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 X-Mailman-Approved-At: Sat, 23 Jan 2021 18:23:48 -0500 Cc: Katherine Cox-Buday , =?iso-8859-1?Q?Ludovic_Court=E8s?= , Helio Machado <0x2b3bfa0@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This patch add a `guix import go` command. It was tested with several big repositories and seems to mostly work for the import part (because building Guix packages is an other story). There is still bugs blocking e.g. use of any k8s.io modules. * guix/import/go.scm: Created Go Importer * guix/scripts/import.scm: Created Go Importer Subcommand * guix/import/go.scm (importers): Added Go Importer Subcommand Signed-off-by: Francois Joulaud --- The patch is a rebased and modified version of the one proposed by Katherine Cox-Buday. Notable modifications are=A0: - move from (guix json) to (json) - new parse-go.mod with no "set!" and parsing some go.mod which were in error before - adding comments (maybe too much comments) - renamed SCS to VCS to be in accordance with vocabulary in use in Guix and in Go worlds - replacing escape-capital-letters by Helio Machado's go-path-escape - no pruning of major version in go module names as they are considered as completely different artefacts by Go programmers - fixed recursive-import probably broken by the rebase - force usage of url-fetch from (guix build download) I would be happy to hear about problems and perspective for this patch and will now focus on my next step which is actually building any package. Hope I CCed the right persons, I am not really aware of applicable netiquette here. Interdiff=A0: diff --git a/guix/import/go.scm b/guix/import/go.scm index 61009f3565..7f5f300f0a 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -1,5 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =A9 2020 Katherine Cox-Buday +;;; Copyright =A9 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> +;;; Copyright =A9 2021 Fran=E7ois Joulaud ;;; ;;; This file is part of GNU Guix. ;;; @@ -16,6 +18,21 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . =20 +;;; (guix import golang) wants to make easier to create Guix package +;;; declaration for Go modules. +;;; +;;; Modules in Go are "collection of related Go packages" which are +;;; "the unit of source code interchange and versioning". +;;; Modules are generally hosted in a repository. +;;; +;;; At this point it should handle correctly modules which +;;; - have only Go dependencies; +;;; - use go.mod; +;;; - and are accessible from proxy.golang.org (or configured GOPROXY). +;;; +;;; We translate Go module paths to a Guix package name under the +;;; assumption that there will be no collision. + (define-module (guix import go) #:use-module (ice-9 match) #:use-module (ice-9 rdelim) @@ -23,7 +40,7 @@ #:use-module (ice-9 regex) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) - #:use-module (guix json) + #:use-module (json) #:use-module ((guix download) #:prefix download:) #:use-module (guix import utils) #:use-module (guix import json) @@ -33,88 +50,129 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix base16) #:use-module (guix base32) - #:use-module (guix build download) + #:use-module ((guix build download) #:prefix build-download:) #:use-module (web uri) =20 #:export (go-module->guix-package go-module-recursive-import infer-module-root)) =20 -(define (escape-capital-letters s) - "To avoid ambiguity when serving from case-insensitive file systems, t= he -$module and $version elements are case-encoded by replacing every upperc= ase -letter with an exclamation mark followed by the corresponding lower-case -letter." - (let ((escaped-string (string))) - (string-for-each-index - (lambda (i) - (let ((c (string-ref s i))) - (set! escaped-string - (string-concatenate - (list escaped-string - (if (char-upper-case? c) "!" "") - (string (char-downcase c))))))) - s) - escaped-string)) +(define (go-path-escape path) + "Escape a module path by replacing every uppercase letter with an excl= amation +mark followed with its lowercase equivalent, as per the module Escaped P= aths +specification. https://godoc.org/golang.org/x/mod/module#hdr-Escaped_Pat= hs" + (define (escape occurrence) + (string-append "!" (string-downcase (match:substring occurrence)))) + (regexp-substitute/global #f "[A-Z]" path 'pre escape 'post)) + =20 (define (fetch-latest-version goproxy-url module-path) "Fetches the version number of the latest version for MODULE-PATH from= the given GOPROXY-URL server." (assoc-ref (json-fetch (format #f "~a/~a/@latest" goproxy-url - (escape-capital-letters module-path))) + (go-path-escape module-path))) "Version")) =20 (define (fetch-go.mod goproxy-url module-path version file) "Fetches go.mod from the given GOPROXY-URL server for the given MODULE= -PATH and VERSION." - (url-fetch (format #f "~a/~a/@v/~a.mod" goproxy-url - (escape-capital-letters module-path) - (escape-capital-letters version)) - file - #:print-build-trace? #f)) + (let ((url (format #f "~a/~a/@v/~a.mod" goproxy-url + (go-path-escape module-path) + (go-path-escape version)))) + (parameterize ((current-output-port (current-error-port))) + (build-download:url-fetch url + file + #:print-build-trace? #f)))) =20 (define (parse-go.mod go.mod-path) - "Parses a go.mod file and returns an alist of module path to version." + "PARSE-GO.MOD takes a filename in GO.MOD-PATH and extract a list of +requirements from it." + ;; We parse only a subset of https://golang.org/ref/mod#go-mod-file-gr= ammar + ;; which we think necessary for our use case. + (define (toplevel results) + "Main parser, RESULTS is a pair of alist serving as accumulator for + all encountered requirements and replacements." + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; parsing ended, give back the result + results) + ((string=3D? line "require (") + ;; a require block begins, delegate parsing to IN-REQUIRE + (in-require results)) + ((string-prefix? "require " line) + ;; a require directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (require-directive results stripped-line))) + (toplevel new-results))) + ((string-prefix? "replace " line) + ;; a replace directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (replace-directive results stripped-line))) + (toplevel new-results))) + (#t + ;; unrecognised line, ignore silently + (toplevel results))))) + (define (in-require results) + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; this should never happen here but we ignore silently + results) + ((string=3D? line ")") + ;; end of block, coming back to toplevel + (toplevel results)) + (#t + (in-require (require-directive results line)))))) + (define (replace-directive results line) + "Extract replaced modules and new requirements from replace directiv= e + in LINE and add to RESULTS." + ;; ReplaceSpec =3D ModulePath [ Version ] "=3D>" FilePath newline + ;; | ModulePath [ Version ] "=3D>" ModulePath Version ne= wline . + (let* ((requirements (car results)) + (replaced (cdr results)) + (re (string-concatenate + '("([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?" + "[[:blank:]]+" "=3D>" "[[:blank:]]+" + "([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + (version (match:substring match 3)) + (new-module-path (match:substring match 4)) + (new-version (match:substring match 6)) + (new-replaced (acons module-path version replaced)) + (new-requirements + (if (string-match "^\\.?\\./" new-module-path) + requirements + (acons new-module-path new-version requirements)))) + (cons new-requirements new-replaced))) + (define (require-directive results line) + "Extract requirement from LINE and add it to RESULTS." + (let* ((requirements (car results)) + (replaced (cdr results)) + ;; A line in a require directive is composed of a module path= and + ;; a version separated by whitespace and an optionnal '//' co= mment at + ;; the end. + (re (string-concatenate + '("^[[:blank:]]*" + "([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)" + "([[:blank:]]+//.*)?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + (version (match:substring match 2))) + (cons (acons module-path version requirements) replaced))) (with-input-from-file go.mod-path (lambda () - (let ((in-require? #f) - (requirements (list))) - (do ((line (read-line) (read-line))) - ((eof-object? line)) - (set! line (string-trim line)) - ;; The parser is either entering, within, exiting, or after th= e - ;; require block. The Go toolchain is trustworthy so edge-case= s like - ;; double-entry, etc. need not complect the parser. - (cond - ((string=3D? line "require (") - (set! in-require? #t)) - ((and in-require? (string=3D? line ")")) - (set! in-require? #f)) - (in-require? - (let* ((requirement (string-split line #\space)) - ;; Modules should be unquoted - (module-path (string-delete #\" (car requirement))) - (version (list-ref requirement 1))) - (set! requirements (acons module-path version requirements= )))) - ((string-prefix? "replace" line) - (let* ((requirement (string-split line #\space)) - (module-path (list-ref requirement 1)) - (new-module-path (list-ref requirement 3)) - (version (list-ref requirement 4))) - (set! requirements (assoc-remove! requirements module-path= )) - (set! requirements (acons new-module-path version requirem= ents)))))) - requirements)))) - -(define (module-path-without-major-version module-path) - "Go modules can be appended with a major version indicator, -e.g. /v3. Sometimes it is desirable to work with the root module path. F= or -instance, for a module path github.com/foo/bar/v3 this function returns -github.com/foo/bar." - (let ((m (string-match "(.*)\\/v[0-9]+$" module-path))) - (if m - (match:substring m 1) - module-path))) + (let* ((results (toplevel '(() . ()))) + (requirements (car results)) + (replaced (cdr results))) + ;; At last we remove replaced modules from the requirements list + (fold + (lambda (replacedelem requirements) + (alist-delete! (car replacedelem) requirements)) + requirements + replaced))))) =20 (define (infer-module-root module-path) "Go modules can be defined at any level of a repository's tree, but qu= erying @@ -124,38 +182,42 @@ root path from its path. For a set of well-known fo= rges, the pattern of what consists of a module's root page is known before hand." ;; See the following URL for the official Go equivalent: ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21= b99f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 - (define-record-type - (make-scs url-prefix root-regex type) - scs? - (url-prefix scs-url-prefix) - (root-regex scs-root-regex) - (type scs-type)) - (let* ((known-scs + ;; + ;; FIXME: handle module path with VCS qualifier as described in + ;; https://golang.org/ref/mod#vcs-find and + ;; https://golang.org/cmd/go/#hdr-Remote_import_paths + (define-record-type + (make-vcs url-prefix root-regex type) + vcs? + (url-prefix vcs-url-prefix) + (root-regex vcs-root-regex) + (type vcs-type)) + (let* ((known-vcs (list - (make-scs + (make-vcs "github.com" "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-= z0-9_.\\-]+)*$" 'git) - (make-scs + (make-vcs "bitbucket.org" "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[= A-Za-z0-9_.\\-]+)*$`" 'unknown) - (make-scs + (make-vcs "hub.jazz.net/git/" "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-= z0-9_.\\-]+)*$" 'git) - (make-scs + (make-vcs "git.apache.org" "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-= ]+)*$" 'git) - (make-scs + (make-vcs "git.openstack.org" "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+= )(\\.git)?(/[A-Za-z0-9_.\\-]+)*$" 'git))) - (scs (find (lambda (scs) (string-prefix? (scs-url-prefix scs) m= odule-path)) - known-scs))) - (if scs - (match:substring (string-match (scs-root-regex scs) module-path)= 1) + (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs) m= odule-path)) + known-vcs))) + (if vcs + (match:substring (string-match (vcs-root-regex vcs) module-path)= 1) module-path))) =20 (define (to-guix-package-name module-path) @@ -164,8 +226,7 @@ consists of a module's root page is known before hand= ." (string-append "go-" (string-replace-substring (string-replace-substring - ;; Guix has its own field for version - (module-path-without-major-version module-path) + module-path "." "-") "/" "-")))) =20 @@ -173,7 +234,9 @@ consists of a module's root page is known before hand= ." "Fetches module meta-data from a module's landing page. This is necess= ary because goproxy servers don't currently provide all the information need= ed to build a package." - (let* ((port (http-fetch (string->uri (format #f "https://~a?go-get=3D= 1" module-path)))) + ;; FIXME: This code breaks on k8s.io which have a meta tag splitted + ;; on several lines + (let* ((port (build-download:http-fetch (string->uri (format #f "https= ://~a?go-get=3D1" module-path)))) (module-metadata #f) (meta-tag-prefix "guix-package - (lambda (name _) - (go-module->guix-package name - #:goproxy-url goproxy-url= )) - #:guix-name to-guix-package-name)) + (recursive-import + package-name + #:repo->guix-package (lambda* (name . _) + (go-module->guix-package + name + #:goproxy-url goproxy-url)) + #:guix-name to-guix-package-name)) guix/import/go.scm | 340 +++++++++++++++++++++++++++++++++++++ guix/scripts/import.scm | 2 +- guix/scripts/import/go.scm | 118 +++++++++++++ 3 files changed, 459 insertions(+), 1 deletion(-) create mode 100644 guix/import/go.scm create mode 100644 guix/scripts/import/go.scm diff --git a/guix/import/go.scm b/guix/import/go.scm new file mode 100644 index 0000000000..7f5f300f0a --- /dev/null +++ b/guix/import/go.scm @@ -0,0 +1,340 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2020 Katherine Cox-Buday +;;; Copyright =A9 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> +;;; Copyright =A9 2021 Fran=E7ois Joulaud +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;;; (guix import golang) wants to make easier to create Guix package +;;; declaration for Go modules. +;;; +;;; Modules in Go are "collection of related Go packages" which are +;;; "the unit of source code interchange and versioning". +;;; Modules are generally hosted in a repository. +;;; +;;; At this point it should handle correctly modules which +;;; - have only Go dependencies; +;;; - use go.mod; +;;; - and are accessible from proxy.golang.org (or configured GOPROXY). +;;; +;;; We translate Go module paths to a Guix package name under the +;;; assumption that there will be no collision. + +(define-module (guix import go) + #:use-module (ice-9 match) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 receive) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (json) + #:use-module ((guix download) #:prefix download:) + #:use-module (guix import utils) + #:use-module (guix import json) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module (guix utils) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix base16) + #:use-module (guix base32) + #:use-module ((guix build download) #:prefix build-download:) + #:use-module (web uri) + + #:export (go-module->guix-package + go-module-recursive-import + infer-module-root)) + +(define (go-path-escape path) + "Escape a module path by replacing every uppercase letter with an exclam= ation +mark followed with its lowercase equivalent, as per the module Escaped Pat= hs +specification. https://godoc.org/golang.org/x/mod/module#hdr-Escaped_Paths= " + (define (escape occurrence) + (string-append "!" (string-downcase (match:substring occurrence)))) + (regexp-substitute/global #f "[A-Z]" path 'pre escape 'post)) + + +(define (fetch-latest-version goproxy-url module-path) + "Fetches the version number of the latest version for MODULE-PATH from t= he +given GOPROXY-URL server." + (assoc-ref + (json-fetch (format #f "~a/~a/@latest" goproxy-url + (go-path-escape module-path))) + "Version")) + +(define (fetch-go.mod goproxy-url module-path version file) + "Fetches go.mod from the given GOPROXY-URL server for the given MODULE-P= ATH +and VERSION." + (let ((url (format #f "~a/~a/@v/~a.mod" goproxy-url + (go-path-escape module-path) + (go-path-escape version)))) + (parameterize ((current-output-port (current-error-port))) + (build-download:url-fetch url + file + #:print-build-trace? #f)))) + +(define (parse-go.mod go.mod-path) + "PARSE-GO.MOD takes a filename in GO.MOD-PATH and extract a list of +requirements from it." + ;; We parse only a subset of https://golang.org/ref/mod#go-mod-file-gram= mar + ;; which we think necessary for our use case. + (define (toplevel results) + "Main parser, RESULTS is a pair of alist serving as accumulator for + all encountered requirements and replacements." + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; parsing ended, give back the result + results) + ((string=3D? line "require (") + ;; a require block begins, delegate parsing to IN-REQUIRE + (in-require results)) + ((string-prefix? "require " line) + ;; a require directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (require-directive results stripped-line))) + (toplevel new-results))) + ((string-prefix? "replace " line) + ;; a replace directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (replace-directive results stripped-line))) + (toplevel new-results))) + (#t + ;; unrecognised line, ignore silently + (toplevel results))))) + (define (in-require results) + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; this should never happen here but we ignore silently + results) + ((string=3D? line ")") + ;; end of block, coming back to toplevel + (toplevel results)) + (#t + (in-require (require-directive results line)))))) + (define (replace-directive results line) + "Extract replaced modules and new requirements from replace directive + in LINE and add to RESULTS." + ;; ReplaceSpec =3D ModulePath [ Version ] "=3D>" FilePath newline + ;; | ModulePath [ Version ] "=3D>" ModulePath Version newl= ine . + (let* ((requirements (car results)) + (replaced (cdr results)) + (re (string-concatenate + '("([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?" + "[[:blank:]]+" "=3D>" "[[:blank:]]+" + "([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + (version (match:substring match 3)) + (new-module-path (match:substring match 4)) + (new-version (match:substring match 6)) + (new-replaced (acons module-path version replaced)) + (new-requirements + (if (string-match "^\\.?\\./" new-module-path) + requirements + (acons new-module-path new-version requirements)))) + (cons new-requirements new-replaced))) + (define (require-directive results line) + "Extract requirement from LINE and add it to RESULTS." + (let* ((requirements (car results)) + (replaced (cdr results)) + ;; A line in a require directive is composed of a module path a= nd + ;; a version separated by whitespace and an optionnal '//' comm= ent at + ;; the end. + (re (string-concatenate + '("^[[:blank:]]*" + "([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)" + "([[:blank:]]+//.*)?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + (version (match:substring match 2))) + (cons (acons module-path version requirements) replaced))) + (with-input-from-file go.mod-path + (lambda () + (let* ((results (toplevel '(() . ()))) + (requirements (car results)) + (replaced (cdr results))) + ;; At last we remove replaced modules from the requirements list + (fold + (lambda (replacedelem requirements) + (alist-delete! (car replacedelem) requirements)) + requirements + replaced))))) + +(define (infer-module-root module-path) + "Go modules can be defined at any level of a repository's tree, but quer= ying +for the meta tag usually can only be done at the webpage at the root of th= e +repository. Therefore, it is sometimes necessary to try and derive a modul= e's +root path from its path. For a set of well-known forges, the pattern of wh= at +consists of a module's root page is known before hand." + ;; See the following URL for the official Go equivalent: + ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21b9= 9f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 + ;; + ;; FIXME: handle module path with VCS qualifier as described in + ;; https://golang.org/ref/mod#vcs-find and + ;; https://golang.org/cmd/go/#hdr-Remote_import_paths + (define-record-type + (make-vcs url-prefix root-regex type) + vcs? + (url-prefix vcs-url-prefix) + (root-regex vcs-root-regex) + (type vcs-type)) + (let* ((known-vcs + (list + (make-vcs + "github.com" + "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-vcs + "bitbucket.org" + "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[A-= Za-z0-9_.\\-]+)*$`" + 'unknown) + (make-vcs + "hub.jazz.net/git/" + "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-vcs + "git.apache.org" + "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-]+= )*$" + 'git) + (make-vcs + "git.openstack.org" + "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(= \\.git)?(/[A-Za-z0-9_.\\-]+)*$" + 'git))) + (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs) mod= ule-path)) + known-vcs))) + (if vcs + (match:substring (string-match (vcs-root-regex vcs) module-path) 1= ) + module-path))) + +(define (to-guix-package-name module-path) + "Converts a module's path to the canonical Guix format for Go packages." + (string-downcase + (string-append "go-" + (string-replace-substring + (string-replace-substring + module-path + "." "-") + "/" "-")))) + +(define (fetch-module-meta-data module-path) + "Fetches module meta-data from a module's landing page. This is necessar= y +because goproxy servers don't currently provide all the information needed= to +build a package." + ;; FIXME: This code breaks on k8s.io which have a meta tag splitted + ;; on several lines + (let* ((port (build-download:http-fetch (string->uri (format #f "https:/= /~a?go-get=3D1" module-path)))) + (module-metadata #f) + (meta-tag-prefix "symbol (list-ref meta-data 1))) + +(define (module-meta-data-repo-url meta-data goproxy-url) + "Return the URL where the fetcher which will be used can download the so= urce +control." + (if (member (module-meta-data-scs meta-data) '(fossil mod)) + goproxy-url + (list-ref meta-data 2))) + +(define (source-uri scs-type scs-repo-url file) + "Generate the `origin' block of a package depending on what type of sour= ce +control system is being used." + (case scs-type + ((git) + `(origin + (method git-fetch) + (uri (git-reference + (url ,scs-repo-url) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + ,(guix-hash-url file))))) + ((hg) + `(origin + (method hg-fetch) + (uri (hg-reference + (url ,scs-repo-url) + (changeset ,version))) + (file-name (format #f "~a-~a-checkout" name version)))) + ((svn) + `(origin + (method svn-fetch) + (uri (svn-reference + (url ,scs-repo-url) + (revision (string->number version)) + (recursive? #f))) + (file-name (format #f "~a-~a-checkout" name version)) + (sha256 + (base32 + ,(guix-hash-url file))))) + (else + (raise-exception (format #f "unsupported scs type: ~a" scs-type))))) + +(define* (go-module->guix-package module-path #:key (goproxy-url "https://= proxy.golang.org")) + (call-with-temporary-output-file + (lambda (temp port) + (let* ((latest-version (fetch-latest-version goproxy-url module-path)= ) + (go.mod-path (fetch-go.mod goproxy-url module-path latest-vers= ion + temp)) + (dependencies (map car (parse-go.mod temp))) + (guix-name (to-guix-package-name module-path)) + (root-module-path (infer-module-root module-path)) + ;; VCS type and URL are not included in goproxy information. F= or + ;; this we need to fetch it from the official module page. + (meta-data (fetch-module-meta-data root-module-path)) + (scs-type (module-meta-data-scs meta-data)) + (scs-repo-url (module-meta-data-repo-url meta-data goproxy-url= ))) + (values + `(package + (name ,guix-name) + ;; Elide the "v" prefix Go uses + (version ,(string-trim latest-version #\v)) + (source + ,(source-uri scs-type scs-repo-url temp)) + (build-system go-build-system) + ,@(maybe-inputs (map to-guix-package-name dependencies)) + ;; TODO(katco): It would be nice to make an effort to fetch thi= s + ;; from known forges, e.g. GitHub + (home-page ,(format #f "https://~a" root-module-path)) + (synopsis "A Go package") + (description ,(format #f "~a is a Go package." guix-name)) + (license #f)) + dependencies))))) + +(define* (go-module-recursive-import package-name + #:key (goproxy-url "https://proxy.gol= ang.org")) + (recursive-import + package-name + #:repo->guix-package (lambda* (name . _) + (go-module->guix-package + name + #:goproxy-url goproxy-url)) + #:guix-name to-guix-package-name)) diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 0a3863f965..1d2b45d942 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -77,7 +77,7 @@ rather than \\n." ;;; =20 (define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa" = "gem" - "cran" "crate" "texlive" "json" "opam")) + "go" "cran" "crate" "texlive" "json" "opam")) =20 (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm new file mode 100644 index 0000000000..fde7555973 --- /dev/null +++ b/guix/scripts/import/go.scm @@ -0,0 +1,118 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2020 Katherine Cox-Buday +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts import go) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix scripts) + #:use-module (guix import go) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-go)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + '()) + +(define (show-help) + (display (G_ "Usage: guix import go PACKAGE-PATH +Import and convert the Go module for PACKAGE-PATH.\n")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (display (G_ " + -r, --recursive generate package expressions for all Go modules\ + that are not yet in Guix")) + (display (G_ " + -p, --goproxy=3DGOPROXY specify which goproxy server to use")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import go"))) + (option '(#\r "recursive") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive #t result))) + (option '(#\p "goproxy") #t #f + (lambda (opt name arg result) + (alist-cons 'goproxy + (string->symbol arg) + (alist-delete 'goproxy result)))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-go . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (G_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((module-name) + (if (assoc-ref opts 'recursive) + (map (match-lambda + ((and ('package ('name name) . rest) pkg) + `(define-public ,(string->symbol name) + ,pkg)) + (_ #f)) + (go-module-recursive-import module-name + #:goproxy-url + (or (assoc-ref opts 'goproxy) + "https://proxy.golang.org"= ))) + (let ((sexp (go-module->guix-package module-name + #:goproxy-url + (or (assoc-ref opts 'gopro= xy) + "https://proxy.golang.= org")))) + (unless sexp + (leave (G_ "failed to download meta-data for module '~a'~%"= ) + module-name)) + sexp))) + (() + (leave (G_ "too few arguments~%"))) + ((many ...) + (leave (G_ "too many arguments~%")))))) --=20 2.28.0= From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 16:03:10 2021 Received: (at 44178) by debbugs.gnu.org; 25 Jan 2021 21:03:10 +0000 Received: from localhost ([127.0.0.1]:40153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l490v-0000yi-NW for submit@debbugs.gnu.org; Mon, 25 Jan 2021 16:03:09 -0500 Received: from mx07-00115501.pphosted.com ([185.132.182.48]:47844 helo=mx08-00115501.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l490t-0000yZ-Ve for 44178@debbugs.gnu.org; Mon, 25 Jan 2021 16:03:09 -0500 Received: from pps.filterd (m0001505.ppops.net [127.0.0.1]) by mx07-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10PKv0BL015879; Mon, 25 Jan 2021 22:03:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=radiofrance20190306; bh=pcGnQKCkv479kwfLqk89lQCEBjAr4sZeG4KyThO+RVw=; b=JA25OJPjyaGE58itCW+YJPhgrvvHLk3MvV1EO0UVk7Ug0b8gersgWw9dBLZvIirCsGjc b01/3dKVVT2APpLVUGLbRg3JMpzgkvo0f841bTMOuMbMtGHZ4q0NUkZrVHPq4Iz0LgV4 4nMc3EZMBlDzHGAKyB8dI0i8vnnHDZtxO0ZtdFFr2wW3dZ9NAJbN1G+BeQyiMc3PPyyF 7LLoJ9GRdgXcELut5VWxUPWRTVc8cVlLgNG5u5BC/yOTgWA8BjD2plljnqCqDeNcZncY BKXX/0CaPDGM+TWZlnF6w1yVPKtB859RlB+dH5zO46ZXIOIf+/9aFYS0THCO12gtplN0 gg== Received: from fra01-pr2-obe.outbound.protection.outlook.com (mail-pr2fra01lp0108.outbound.protection.outlook.com [104.47.24.108]) by mx07-00115501.pphosted.com with ESMTP id 36895rbr0y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Jan 2021 22:03:06 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ge6Vf5dhuLoLX7+WuL6pFx3r8DuRtkv9VPwDMsSk1V+v0r2YLlPwYNmaqqmqz7r2whM1/Gb0WscisgukaOrSb1nEbxkkLgw9pZ7GB5ze7eU1MDg1oerreszOC7+Ty28n6E5u0hyFIcXxqgRy54mPW1p4j4/BERYxyR1/+8AcRB7SzeAOb0/goI1RTITvZp8c2gJR/KFNuVsUCtn+TW75LZomUlNFAP/WMw5WrR7/mESaGUVstoMvzFgMqOAg00yRnoVZcPVGUXHlMorgKXOm5G2ODhSWInffC3fdUVu5l6rqjLjdL8YO8IeBfOdrpDEFiIhglGa8HjZelKmJt5zBdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pcGnQKCkv479kwfLqk89lQCEBjAr4sZeG4KyThO+RVw=; b=DTGdw5ZZzFnv7/bC0sdr4v7Nkb1eA0CcoRL/NFxSVpQN84Sxm4QRPiBXQ/Jnhait+JOy8Vd+FcRzwqvyjCv3rGI1Yp3pOjE0Wkn/eTE2V0YbOQ5TfHbINha2QP3ioYpJqEqmSgyuMwLpfdxCSpRyFuin4OBdEr3Y+IbTjIW6jrtO2ttE9NQAwLB0wqfiY6y/2Vsv5QoY2XuCxALApHWfMAM6davVJ0fC/znLYD3XLGDO0hrqs2Dvg+N0KtaFUx2C3urUbuwN7lfV+z9EF/CsaKlC+c7IZHv+OFsb/88QkFHDlV5xjBU5Xio+ItcpqxVBtOG2kmBSc4deP0eWC+HJ0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pcGnQKCkv479kwfLqk89lQCEBjAr4sZeG4KyThO+RVw=; b=etfoUz16CAMtmcerH3L3T0xHaZmI+ZDrowm1b0JVO86FNrBzyYMlZlvDBeRSdkg2SONKunkejV5H0LKLFcLbJYO0SpHQjuEGcezpANlLANQ+yMW92T2MxDRCdRwt86e34qLcKMBq2VJkeXWi9DgR2L47tdDOpAJQV+KQ7cNnJCc= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR2P264MB0238.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101:7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.16; Mon, 25 Jan 2021 21:03:02 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58%6]) with mapi id 15.20.3784.017; Mon, 25 Jan 2021 21:03:02 +0000 From: =?iso-8859-1?Q?JOULAUD_Fran=E7ois?= To: Katherine Cox-Buday Subject: Re: [PATCH] Create importer for Go modules Thread-Topic: [PATCH] Create importer for Go modules Thread-Index: AQHW8c+fh3EThKxKn0aE+FBPMWbUYao1zif4gAMIIAA= Date: Mon, 25 Jan 2021 21:03:01 +0000 Message-ID: <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> <87r1mb6zu9.fsf@gmail.com> In-Reply-To: <87r1mb6zu9.fsf@gmail.com> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d70e99bf-fdb7-4d6a-2b37-08d8c1749a2f x-ms-traffictypediagnostic: PR2P264MB0238: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: X0eMOyKzs/z+tBeVSLuskaZiCLX+z9Cx+IoFwy1l3YYNnJV6caTibDyhh/Ka1voGrfz4a8mCYTn8gE3KTufgiKka94l3THf6ooEe5J0kxKgpcc7FJQQEeYqfBsLgu2DqmLDwGKRK7ihUA4PlyVuw8bVDczs+e0kztOmO1UH4E73CeAFUONs/K9PzNBIg1yyLnKYJ92/ZFUBVa32oGRxfsbhO+tvVmanuLWSQ4SfwPGFEfZwCrPrUFj3/hkqhvPF2n3mBP1B1KsFqjwC7tJ7bh+VKLyfTp5403V3VrKZb54WC2rw+URyFBavgQOJT4nFbsg42u7Dg7UqCmaawDjWhjCRv7tWNHFTPS2Q6+JYK9yQvqPO9Vqh5zEI6uLGKBNXd1mh9tyF6xWRQ5YX6+1qALQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(366004)(39850400004)(136003)(346002)(4744005)(66574015)(6506007)(316002)(6486002)(86362001)(83380400001)(71200400001)(6512007)(5660300002)(8936002)(4326008)(1076003)(26005)(186003)(2906002)(8676002)(64756008)(66946007)(6916009)(66446008)(478600001)(66556008)(54906003)(76116006)(66476007)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?WzJP7ZD5EPVyRbshm+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?= =?iso-8859-1?Q?sWyO9/lDgiP25zzmf0dC4GA3PF4DBkowWhb1xmX0W2776uhiihwxf1MJri?= =?iso-8859-1?Q?Dpy2VZTBlNmlw9d9HgZKEe3h6+Awo+Ty1CTyRkFgwI2Cyk7ehZpodZ1LpO?= =?iso-8859-1?Q?nsGw+ph350BYfN6V//M11HVgMy9TO5sv5AbFg6yzOCU4X/K/d57W9thZDd?= =?iso-8859-1?Q?IPmoNeiAPvdv/7KaVjcE+Q9o9LT0+ynsZnK9PHtepH17?= Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: d70e99bf-fdb7-4d6a-2b37-08d8c1749a2f X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2021 21:03:01.8855 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: q3w3Lsa8QmbFYMJ6vcdMjSGsCE42Fq8w7IheR2JukC+6+eNfIIPSLliDs2Obbfrim6q3PjwLoOqPwmoDU3SjVWakoGNbzCegZNTDO8yVUOd2p8BZmsJvFSvkeSefaYtf X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2P264MB0238 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-25_09:2021-01-25, 2021-01-25 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 clxscore=1015 mlxscore=0 suspectscore=0 adultscore=0 impostorscore=0 priorityscore=1501 spamscore=0 phishscore=0 lowpriorityscore=0 mlxlogscore=766 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101250107 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: =?iso-8859-1?Q?Ludovic_Court=E8s?= , "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Helio Machado <0x2b3bfa0@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Sat, Jan 23, 2021 at 04:41:18PM -0600, Katherine Cox-Buday wrote: > Thanks so much for the patches, Helio, Joulaud! You're welcome! As a side note I prefer to be adressed as "Fran=E7ois" ;-) > I have pushed everything (including Joulaud's patch with appropriate > attribution) here[2]. I am admittedly new at using email to organize > code changes, but using a forge seems easier. > Can I suggest we coordinate there, or is that too much of an imposition? I have no problem to coordinate in a forge and can push in a shared branch if you give me access. Even if I must say I found it refreshing to be able to work with mails. It has the nice property of fully-offline and asynchronous communication and it helped me to better articulate my problems. Best regards, Fran=E7ois= From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 09:31:50 2021 Received: (at 44178) by debbugs.gnu.org; 27 Jan 2021 14:31:50 +0000 Received: from localhost ([127.0.0.1]:44106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4lrK-0005l5-FO for submit@debbugs.gnu.org; Wed, 27 Jan 2021 09:31:50 -0500 Received: from mail-io1-f49.google.com ([209.85.166.49]:33374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4lrJ-0005kt-7T for 44178@debbugs.gnu.org; Wed, 27 Jan 2021 09:31:49 -0500 Received: by mail-io1-f49.google.com with SMTP id q129so2048212iod.0 for <44178@debbugs.gnu.org>; Wed, 27 Jan 2021 06:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=u/CmG5FTW/hs/0K70KZEImhaONhUwJ0MGav121V+hFM=; b=LngMACNKW9xmGQEV5b/H9mMWXpY+tqfTI2+liUWR2Sjkx9TszpSvpO0Wrf4zkKoROt ZxcjVDFutl2ezDHQDHwo0q3B6vW4y0nC1zje09tLOCYK2VjEU0XGp19Mym/5UsftNAXw JtZ7GMXsQ9LZb/IPgXgYtFzWswbm0+gf6Rh09LAxS7ysoCEuCmmgDG4R6RyzGRAdqT89 4BFZiXrw+eaznlz7kRxXJxetyBI/0oq+uZ0gBCeeAiGAuKvmZKkxCHyQ6P2Chtw7czWZ wZJfvpXrJOM92DbIAUFBWD/72S/PtLP8rkmIS3D4KAVKRSefQ+5xtPTDCZ3vsf0Wl8XN 92sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=u/CmG5FTW/hs/0K70KZEImhaONhUwJ0MGav121V+hFM=; b=KNgCAaBaL7fFIyllsMJOwX5XJzCcF3G4VekNG0aYH4zbQddzK55tqM5BDli6aA92Y+ jEBgPAod0XzXj6ka4uR0xSauHS5aAWMhasCWrs/1Sxk7Opad9MeDlFVM8nIhaP+qn2/m Skd5qTn+Rb3TJqEqhdX16D4hI4teGHPZdHjlQlf7OcaWhkbwpjcLmCloDHfJdRBm2mH+ cgsLlrLL2FWQOFUoat5zSn5HPcI0kUOCneOxAUveIq3jNbFEC5tunU9JU2FiVk98D9g1 WTjzzHUxX5OUma9YTUTVxZSlaSCe5bm/YZ01UxIHK29PIYEH6JjXdcAauwhJUwUF7N49 oJZA== X-Gm-Message-State: AOAM530X47JXy3VVG/fDxzLRfPgcH0l4Cau9cg4VpT+QlfIBWBRddIDl uBThlmj5QHBAFuqIdLyiTYU= X-Google-Smtp-Source: ABdhPJyghzR/b3IQs0VM7s0D8GlPY1D3ZwZ08D+PNV85/Tz4fXz8oXpVfYRZjAh0RFxtEPkDUnNOYw== X-Received: by 2002:a05:6602:2c4e:: with SMTP id x14mr7736968iov.58.1611757903512; Wed, 27 Jan 2021 06:31:43 -0800 (PST) Received: from washu-v4 (172-221-246-205.res.spectrum.com. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id i72sm1070151ioa.6.2021.01.27.06.31.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 06:31:42 -0800 (PST) From: Katherine Cox-Buday To: 44178@debbugs.gnu.org, JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: packaging a golang package References: <87h7nrud2a.fsf@timmydouglas.com> <4bdbc469-ad45-4739-b001-739ad3a60adc@www.fastmail.com> <87a6thtyvm.fsf@timmydouglas.com> <87bldw0ztb.fsf@timmydouglas.com> <20210125204534.ovhvt7rzj7tbqrnt@fjo-extia-HPdeb.example.avalenn.eu> Date: Wed, 27 Jan 2021 08:31:41 -0600 In-Reply-To: <20210125204534.ovhvt7rzj7tbqrnt@fjo-extia-HPdeb.example.avalenn.eu> ("JOULAUD =?utf-8?Q?Fran=C3=A7ois=22's?= message of "Mon, 25 Jan 2021 20:49:02 +0000") Message-ID: <87wnvymoxe.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: guix-devel@gnu.org, "help-guix@gnu.org" , Helio Machado <0x2b3bfa0@gmail.com>, Timmy Douglas , Leo Famulari X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Fran=C3=A7ois! I've redirected this thread to guix-devel, and the bug since we've begun discussing implementation details. JOULAUD Fran=C3=A7ois writes: > First is to use vendored dependencies (when upstream provides them). This > one has the merits of simplicity (as we just have to download the > source and launch `go build` or whatever is needed) and less risks of > bugs. The downsides are known: difficult to audit Licences, duplication > of code source, difficulty to follow security bugs, etc. -1 to this approach (explanation below). > Second is to re-vendor package from go.mod (coming directly from code > source or synthetized from source) by creating a source derivation > including all dependencies. This is the strategy followed by Nixpkgs > as explained in [1]. (It seems to me this is the route followed in > the patches to from Helio in [2] but I did not take the time to read > them.) With this approach we still have some of the downsides of using > vendored upstream but it is at least easier to verify the existence > of upstream. I don't fully understand this approach, so I don't understand how this is different to approach three? Does this mean we create a pseudo, non-public package which states all the dependencies as inputs? If so, why wouldn't we just go with option three? > Third is to package every dependencies. This is the most transparent way > and the one that leads to less code duplication but the downside is the > difficulty to scale with the number of packages (even if the objective of > patch at [3] is to automate it) and the need to have only one reference > version for each package in the distribution which have its own share of > problems (one of them being that we don't use those tested by upstream > as stated in [4]). I think this is the eternal conflict between distributions and code-bases. As a software engineer, I am a fan of vendoring. It removes entire classes of issues: - Dependency on remote servers to be up to fetch dependencies and perform builds - Requiring some kind of system to pin versions - Needing to stay on top of releases even if that doesn't meet your schedule or needs As a packager for a distribution, I dislike vendoring because of the reasons you outlined above, _but_ I also dislike building upstream software with versions of dependencies that weren't approved, tested, and verified, upstream. It seems to me like that's a recipe for unstable, maybe even insecure, software. Normally, distributions are forced to do this because their packaging and build systems are only set up to support one version at a time. Guix can theoretically support all versions, but doesn't want to take on the dependency graph explosion this approach would cause. If we go on historical precedent, and how Guix handles the other language ecosystems, we should only have one version of each dependency, and build all software which relies on that dependency on the version we have packaged. Guix has already begun taking on the difficult challenges with this approach, including patching upstream to work with versions of dependencies upstream was not built for. I dislike it, but I also don't think we should try to solve the broader class of issues while trying to implement an importer. It should be a larger discussion within the Guix community across _all_ language packages about how we might achieve upstream parity while still maintaining our goals as a distribution, all while not crippling our infrastructure and people :) That's my viewpoint, but I think we should all defer to some of the longer-term maintainers who have helped guide Guix. Thanks for writing up these options. -- Katherine From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 09:39:05 2021 Received: (at 44178) by debbugs.gnu.org; 27 Jan 2021 14:39:05 +0000 Received: from localhost ([127.0.0.1]:44110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4lyH-0005uu-BD for submit@debbugs.gnu.org; Wed, 27 Jan 2021 09:39:05 -0500 Received: from mail-io1-f44.google.com ([209.85.166.44]:45079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4lyF-0005ug-8R for 44178@debbugs.gnu.org; Wed, 27 Jan 2021 09:39:00 -0500 Received: by mail-io1-f44.google.com with SMTP id p72so2022008iod.12 for <44178@debbugs.gnu.org>; Wed, 27 Jan 2021 06:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=oG+u2aqsC/nRCv4LkvIeDSrdsmmZkakZ5eisqO+AGtc=; b=dFu9yONWO9YDvIQ+0gi7l4kg2UqsfVJ4DfBmgrooEfIoYS8TJcoLtgF4OfDE9yxgjD W4S16b7Glz90aBsEthaxm4eqsXX4mp+fMYjr8godQUwzEMPyARaUX2oOBn4D7z73/p7n MsDDsqa6S6YP/XmTDsHKm59ejW4l8OAto1RxWhJA9REWSyWnJtroVX+6ogc8+g3jCvBC 7qJePasjKVl+3RrEdfAVfCG7EXxn49uTL7e4H+Kw74I9FsFZ7F+fiCUA4zsQmYD1ftU+ TFJ2+L4VfPyyVRa9brpflfOzzm0hT6vxp4Bg9/91FKR+4tdrTBZh6zWqd4YQiaoSS5MF ymcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=oG+u2aqsC/nRCv4LkvIeDSrdsmmZkakZ5eisqO+AGtc=; b=BX+MmIeNhskvNzwT3Plamz4pPBfOYttXBB+hUSceFIiiLFHGyR7IL/qNh9Rz68Flly 8eQTrAfIICTmF6i+sA6IrBBe/twn6ZpPIx213JgEBsWazGGMDmo2Q5NA8y1lMBJMn8Dk sNkLL5B9igGdbDu7vhact3TXSsexddZKLLcRFyHs615+FcwS0wKMEUoqZ3tdpQyBfgmE 3ijUnn0CUJid+4RVUJQaQCyPoGsieecAVX6sEfphM+Ay2Jkj2ZSu50rYlU4UnvE9dtpy CUpJlOJcjy+6tbuT75l4feadFASQbj73Indy+ibmKJSpoePYkWBcXFlgghiaz5ocSB36 EFig== X-Gm-Message-State: AOAM533TO10bMZEcN+fFPLGxxVr9JTqFqya9G/+Ndq6hm7ZO1eGY32SY h9Z1jR1a7AeHFkWJLIBMsyk= X-Google-Smtp-Source: ABdhPJwjZpx5hn2WiuPAcmBYG+yHtzt3vXvrGt2Q0R480DUK4Ue0A6O/jiC9xoakxYwrRXU4ZDmXtg== X-Received: by 2002:a05:6602:8da:: with SMTP id h26mr7773334ioz.154.1611758333646; Wed, 27 Jan 2021 06:38:53 -0800 (PST) Received: from washu-v4 (172-221-246-205.res.spectrum.com. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id c9sm1156597ili.34.2021.01.27.06.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 06:38:52 -0800 (PST) From: Katherine Cox-Buday To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: [PATCH] Create importer for Go modules References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> <87r1mb6zu9.fsf@gmail.com> <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> Date: Wed, 27 Jan 2021 08:38:51 -0600 In-Reply-To: <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> ("JOULAUD =?utf-8?Q?Fran=C3=A7ois=22's?= message of "Mon, 25 Jan 2021 21:03:01 +0000") Message-ID: <87sg6mmolg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Helio Machado <0x2b3bfa0@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) JOULAUD Fran=C3=A7ois writes: > Hello, > > On Sat, Jan 23, 2021 at 04:41:18PM -0600, Katherine Cox-Buday wrote: >> Thanks so much for the patches, Helio, Joulaud! > > You're welcome! As a side note I prefer to be adressed as "Fran=C3=A7ois" > ;-) I'm very sorry, Fran=C3=A7ois! >> I have pushed everything (including Joulaud's patch with appropriate >> attribution) here[2]. I am admittedly new at using email to organize >> code changes, but using a forge seems easier. > >> Can I suggest we coordinate there, or is that too much of an imposition? > > I have no problem to coordinate in a forge and can push in a shared > branch if you give me access. > > Even if I must say I found it refreshing to be able to work with mails. It > has the nice property of fully-offline and asynchronous communication > and it helped me to better articulate my problems. OK, how about we stick to the preferred Guix approach then and coordinate here. Maybe you can teach me some things along the way :) I do like the idea of an email-based forge! The main problems I've had thus far are: - The inter-diff patch you sent was not formatted correctly because it contained some extra leading whitespace. I found myself juggling a few different tools just to understand your changes. =20=20 - The conversation about this seems to be happening in 3 different places: here, help-guix, and guix-devel. I guess we should be centralizing here. =20=20 - I don't have any experience coordinating with people in this email-style forge. I don't know how the inter-diff patches work with attribution, nor how to get everyone on the same page. It seems like multiple people are making conflicting changes at once (maybe that's just my perception). --=20 Katherine From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 02:29:41 2021 Received: (at 44178) by debbugs.gnu.org; 28 Jan 2021 07:29:41 +0000 Received: from localhost ([127.0.0.1]:47008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l51kL-0001xQ-0g for submit@debbugs.gnu.org; Thu, 28 Jan 2021 02:29:41 -0500 Received: from mx08-00115501.pphosted.com ([91.207.212.23]:3570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l51kJ-0001xI-7p for 44178@debbugs.gnu.org; Thu, 28 Jan 2021 02:29:40 -0500 Received: from pps.filterd (m0030078.ppops.net [127.0.0.1]) by mx08-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10S7Oaf2010382; Thu, 28 Jan 2021 08:29:37 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=radiofrance20190306; bh=loqBn6OKkA/5bJsnzNC/Z08Higv64YQ49M+N+yA6a+g=; b=WhPdNbe4p/cZpPTCK369BH/CRovmIbCBdKTAR5kFO1KCdq9OFhALhqAlQce9RInT/Q9Q yJslnOPhdtEtrIbZRq6UkT5oCe6OmhHKMpk3zy4SvS3QDOHuZVxDJaFcS0wShqTl4Y5w UFUVbKv+yu6R2z5Pzck2suPeh+2feJQHMoOYaQPcSLrz4NhZaCLXYstRtSmbrU2g8pA3 1CTNj/aR5LPULGN7Kr58E1+nYOnDK2SZRDLkbF2uEjW5DNcYngtKiNLr/h5M0oTIQfan n7KIo7aNuYJ8p2iSjXEoLCVfXXwyiIP5XlYaJ6H2HZXA86SUDS7J5kD5lqXL7/k1/ihW 8A== Received: from fra01-mr2-obe.outbound.protection.outlook.com (mail-mr2fra01on0103.outbound.protection.outlook.com [104.47.25.103]) by mx08-00115501.pphosted.com with ESMTP id 3688byr2e2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Jan 2021 08:29:37 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iQ+q9qJkInV6mCTfE6WFhvQUyLKe9ovKxISStFX/pmlOgGwa1y4JIG4Q7r0iO2tJv/w6SPQ7XdlG3PouyqAe1mwnb8X2otpOAEXSNDkZzJeWzNmuVrsWE7TmgEj9FuSivxwyyK1nyUGUHqVnK+7K5j6TKYU/K45hm1b56QbRgJ4MWL1ROf8xUW+w3rhRibxfNLVTsMPSgrx4PHArXB3njVqY2WufYYjTjpPodetyBxlEaUvGvsYyAFTSAkl33qRBQF3Tuqnh0bOj/0ZmKioBocKJRLJIIBue8TPBU6TPc8gVfas1Ru0BPmb3CjJJDqGHGa3Ebw85tXFqb3qm+xZ3fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=loqBn6OKkA/5bJsnzNC/Z08Higv64YQ49M+N+yA6a+g=; b=CLdJkhEnF6kRiY0G2/RKkrOO+POYGW+NCIrpmShJ2X2fzSZFk4Jl0MsHaWRcOw+D8w3R3s6dz6Yuthwl9t0JWfQyDvfDDydXnOGAcC2gg2Usrm627sUJx6hWt3CM325qlguSPbgUYxEYsrCTrrMoMTLhJ5YPmFcB/Q0fage0c5gaGLaHZxR1OQ6aGidtb5LctNT266rSyo1FMIzIQPN86ChGDAQuqdCZ84XnYHxguVsKzRz4Hz4sN5p7WbHZMOf34wUZzAOSZflPqGHB6d4nBB2XdEow2ZUCw3zYcBYjKC6LLuFPAh4vwvdwd/6zsx9WNjYCeJOJArSsALn1qsPL5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=loqBn6OKkA/5bJsnzNC/Z08Higv64YQ49M+N+yA6a+g=; b=ghok/i1c9pZA+xIbDz+NXm1cN4bJtP0Au5dR+LAv6KzAC8pCZeOFWWuSbrDkAPwc7+erKOyQPGcuzNgW4vGezFdHaZHryE74oY0oB5KIRfbGCIHuhQTm8IpLOqwKMtN5cDfIEvhUs1aDT2v/TE1c3mXVXPw+vgRXfl8BDLeDS3I= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR0P264MB1241.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:161::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.15; Thu, 28 Jan 2021 07:29:36 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58%6]) with mapi id 15.20.3784.017; Thu, 28 Jan 2021 07:29:36 +0000 From: =?utf-8?B?Sk9VTEFVRCBGcmFuw6dvaXM=?= To: Timmy Douglas Subject: RE: [bug#44178] [PATCH] Create importer for Go modules Thread-Topic: [bug#44178] [PATCH] Create importer for Go modules Thread-Index: AQHW9UdUT36mY6n4dkKGqkluHWEIBA== Date: Thu, 28 Jan 2021 07:29:36 +0000 Message-ID: Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: timmydouglas.com; dkim=none (message not signed) header.d=none;timmydouglas.com; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [93.22.148.148] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 180f7f89-7eca-4092-8886-08d8c35e772d x-ms-traffictypediagnostic: PR0P264MB1241: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1265; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ADPZM3hZirbXY8k8q/ebsG1geEbye0dp7Z4p6aoWibzCFy/8ZUcSAt16nnvnn7lm4cHe/tCNbDwSwqV7zEYxz3j1epJ67fnaa00CCAaqKYprGzBGVYoR7vsfDe/00GMEs9cqhJj0ivf0IuEV24zopV4X3euba68dZM68p+ukgPKMDh4TQG0wkpcBmAzfmY1Ary+Z29yYSJSwrLx6au71fxOQWJc5qJFLhFySSS3gQ2tkkkohvVVNeseG1egbtLpjxpaEbNNQBG7LHLQgWrZ+izhSJaKXIqr/Dg3RQQmT0rFvkbcavDNXM0GD/wseQhiLw+P++YE1lvyAi5BsNYwUmF6V3f352eKr6SXblA0VF5KZ57bCtw8zFkix1HML21oEZwRv9SukXoBVj4LdL7IOElEli+54RbLWJbedGOAho2E6cKONo05UWzJkp+hsqiZsVFtMhDh/8ipc47Tul8IbWy0R3StlgBM+nw60FDpNGdepcvabUF4ykapkrWyEUHugO9cF5Jb6S6KnItvGSJCVNg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(346002)(366004)(376002)(39850400004)(71200400001)(76116006)(8936002)(66446008)(52536014)(55016002)(91956017)(6916009)(186003)(7696005)(85182001)(6506007)(85202003)(2906002)(66556008)(66476007)(316002)(4326008)(86362001)(66946007)(558084003)(64756008)(8676002)(5660300002)(26005)(478600001)(9686003)(33656002); DI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sZ01vVGYrckVFU0NKK3Q5NGhwYnVFbVVxVXdMQlF4cGFmcHpMRHVN?= =?utf-8?B?anc4Vml1RzNPTEY4NlBQb0ZlVTdOeXlSUU8wMyt1U3ZGYmdZaEExcVpodkpa?= =?utf-8?B?Zlh5bEpoRUkraVZTWHpCQVU5ZzZ1cCtNd0VsYzJNTFMvUXQ0QjN6aDZsaUsr?= =?utf-8?B?VHd0aVExbVl3QnNsVit0OEVVajVwemVySVFQMEMxRjZSSGZ2NFBaTENBa3Zq?= =?utf-8?B?Zkx5ZWlqanRTQVhqd3N5Q0dvenFCS2JPWUcvbnpMYzlzNDJTVGo2UkJLSjF5?= =?utf-8?B?azlRZHc2ZTV0Zk8wc2ZJTEdqNlZqL3k5NW5GTmZFSDE5L0lsa3hjVytVZ21N?= =?utf-8?B?dXlQNVk5Rkhzb2d1ZTZucmhSZU92Y0c0eHdLZTdPYVVxeWRLTC9NMGhqYU4r?= =?utf-8?B?Sk1ndDVkNXVMYWE2WG5ES2UxOVNIcHhKYnJ2ajkzaFFIeFBzcW5MNFJ4bVBM?= =?utf-8?B?Z2NlSDFFaFgxUDhyb2EvOWdjckszZG55bWhOdEd5YW9STnRSL3VWQU8xemRk?= =?utf-8?B?dkllcTNrUitZQkNyckhCN3JKOW1CRlNlVUxHRFZoVHRlOGU4dTR0aXB6MlA2?= =?utf-8?Q?tfQNNxNX?= x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_PR0P264MB0425A31012E95E446788A61B96BA9PR0P264MB0425FRAP_" MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 180f7f89-7eca-4092-8886-08d8c35e772d X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jan 2021 07:29:36.5570 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DDQBYtyIwNWw6FFGhsQdJWoG8oqdnupUE7CH+vJPX4t2cQ83Kgq49DrSKz8T9y/RZuPwlhiL8Zlokc/FA8/hEAlw2YIbBixkGK9k5su3DtYGPueklcmQNO2MfViZQZLF X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB1241 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-28_02:2021-01-27, 2021-01-28 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 mlxlogscore=576 spamscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44178 Cc: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --_000_PR0P264MB0425A31012E95E446788A61B96BA9PR0P264MB0425FRAP_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGVsbG8sDQoNClByb2JsZW0gd2l0aCBrOHMuaW8gaXMga25vd24uDQoNCkkgdGVzdGVkIGh0bWxw cmFnIHF1aWNrbHkgeWVzdGVyZGF5IGFuZCBJIHRoaW5rIEkgY2FuIGNvbWUgdXAgd2l0aCBhIGZp eCBzb29uLg0KDQpSZWdhcmRzLA0KRnJhbsOnb2lzDQoNCg0KDQpFbnZvecOpIGRlcHVpcyB1biBv cmRpcGhvbmUuIFZldWlsbGV6IGV4Y3VzZXIgbGEgYnJpw6h2ZXTDqS4NCg0KDQo= --_000_PR0P264MB0425A31012E95E446788A61B96BA9PR0P264MB0425FRAP_ Content-Type: text/html; charset="utf-8" Content-ID: <35ED79888BDB1248B452905F5DFF46FC@RFonline.onmicrosoft.com> Content-Transfer-Encoding: base64 PGh0bWw+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0i dGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4NCjwvaGVhZD4NCjxib2R5IGRpcj0iYXV0byI+DQo8 ZGl2IGRpcj0iYXV0byI+SGVsbG8sPC9kaXY+DQo8ZGl2IGRpcj0iYXV0byI+PGJyPg0KPC9kaXY+ DQo8ZGl2IGRpcj0iYXV0byI+UHJvYmxlbSB3aXRoIGs4cy5pbyBpcyBrbm93bi48L2Rpdj4NCjxk aXYgZGlyPSJhdXRvIj48YnI+DQo8L2Rpdj4NCjxkaXYgZGlyPSJhdXRvIj5JIHRlc3RlZCBodG1s cHJhZyBxdWlja2x5IHllc3RlcmRheSBhbmQgSSB0aGluayBJIGNhbiBjb21lIHVwIHdpdGggYSBm aXggc29vbi48L2Rpdj4NCjxkaXYgZGlyPSJhdXRvIj48YnI+DQo8L2Rpdj4NCjxkaXYgZGlyPSJh dXRvIj5SZWdhcmRzLDwvZGl2Pg0KPGRpdiBkaXI9ImF1dG8iPkZyYW7Dp29pczwvZGl2Pg0KPGRp diBkaXI9ImF1dG8iPjxicj4NCjwvZGl2Pg0KPGRpdiBkaXI9ImF1dG8iPjxicj4NCjwvZGl2Pg0K PGRpdiBkaXI9ImF1dG8iPjxicj4NCjwvZGl2Pg0KPGRpdiBpZD0iY29tcG9zZXJfc2lnbmF0dXJl IiBkaXI9ImF1dG8iPg0KPGRpdiBzdHlsZT0iZm9udC1zaXplOjg1JTtjb2xvcjojNTc1NzU3IiBk aXI9ImF1dG8iPkVudm95w6kgZGVwdWlzIHVuIG9yZGlwaG9uZS4gVmV1aWxsZXogZXhjdXNlciBs YSBicmnDqHZldMOpLiZuYnNwOzwvZGl2Pg0KPC9kaXY+DQo8ZGl2IGRpcj0iYXV0byI+PGJyPg0K PC9kaXY+DQo8ZGl2Pjxicj4NCjwvZGl2Pg0KPC9ib2R5Pg0KPC9odG1sPg0K --_000_PR0P264MB0425A31012E95E446788A61B96BA9PR0P264MB0425FRAP_-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 03:16:04 2021 Received: (at 44178) by debbugs.gnu.org; 28 Jan 2021 08:16:04 +0000 Received: from localhost ([127.0.0.1]:47090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l52TC-0005Ek-CV for submit@debbugs.gnu.org; Thu, 28 Jan 2021 03:16:04 -0500 Received: from smtp-out-4.mxes.net ([198.205.123.69]:60022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4zQf-0002Jd-Sq for 44178@debbugs.gnu.org; Thu, 28 Jan 2021 00:01:14 -0500 Received: from Customer-MUA (mua.mxes.net [IPv6:fd::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id A3F6675983; Thu, 28 Jan 2021 00:01:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mxes.net; s=mta; t=1611810066; bh=U5CrLrZpQpmPTjJh1TblQnzryghkMrzlg+IM9igB3bs=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=RkJPz2q7G5sxMH0Kr4kogvz+FKW7sSTNI3yrKw7DdQdnRqfnYt7CMb7SbaZGnZr2o BuqtO85TUQG+uWlWvz+9EnzWyw6WoAzusXouMoYvEL0ZmNQkGGT/Q/GwK/gNJrgSF9 9f5UPcfarXpxb4jFuzmZ+d4GpV8n4jhuqKj42D0I= From: Timmy Douglas To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= , Katherine Cox-Buday Subject: Re: [bug#44178] [PATCH] Create importer for Go modules In-Reply-To: <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> <87r1mb6zu9.fsf@gmail.com> <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> Date: Wed, 27 Jan 2021 21:01:03 -0800 Message-ID: <87o8h94pv4.fsf@timmydouglas.com> MIME-Version: 1.0 Content-Type: text/plain X-Sent-To: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44178 X-Mailman-Approved-At: Thu, 28 Jan 2021 03:16:01 -0500 Cc: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Helio Machado <0x2b3bfa0@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I checked out https://github.com/kat-co/guix/tree/create-go-importer: $ ./pre-inst-env guix import go -r github.com/coredns/coredns ;;; note: source file /s/timmy/guix/guix/import/go.scm ;;; newer than compiled /home/timmy/.cache/guile/ccache/3.0-LE-8-4.3/s/timmy/guix/guix/import/go.scm.go Starting download of /tmp/guix-file.jkncVo >From https://proxy.golang.org/github.com/coredns/coredns/@v/v1.8.1.mod... v1.8.1.mod 2KiB 870KiB/s 00:00 [##################] 100.0% Starting download of /tmp/guix-file.GtI9fs >From https://proxy.golang.org/k8s.io/klog/@v/v1.0.0.mod... v1.0.0.mod 68B 189KiB/s 00:00 [##################] 100.0% Backtrace: In ice-9/boot-9.scm: 1736:10 13 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 12 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 11 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 10 (_ #(#(#))) In guix/ui.scm: 2154:12 9 (run-guix-command _ . _) In guix/scripts/import.scm: 120:11 8 (guix-import . _) In ice-9/eval.scm: 159:9 7 (_ _) In guix/import/utils.scm: 464:27 6 (recursive-import _ #:repo->guix-package _ #:guix-name _ ?) In srfi/srfi-1.scm: 586:17 5 (map1 (("k8s.io/klog" #f) ("k8s.io/client-go" #f) (?) ?)) In guix/import/utils.scm: 453:33 4 (lookup-node "k8s.io/klog" #f) In guix/utils.scm: 700:8 3 (call-with-temporary-output-file #) In ice-9/eval.scm: 293:34 2 (_ #(#(#(#(#(#(#(#(# ?) ?) ?) ?) ?) ?) ?) ?)) 155:9 1 (_ #(#(#) #f)) In unknown file: 0 (list-ref #f 1) ERROR: In procedure list-ref: In procedure list-ref: Wrong type argument in position 1: #f This is due to: (go-module->guix-package "k8s.io/klog") The temp file looks like this: module k8s.io/klog go 1.12 require github.com/go-logr/logr v0.1.0 -> (fetch-module-meta-data '("github.com/go-logr/logr")) -> (string->uri (format #f "https://~a?go-get=1" module-path)) -> #f -> (http-fetch #f) Is there a better way to debug this? `guix import` kicked me back to the cmd line instead of the guile debugger, which is understandable for users, but the stacktrace is missing a lot of information. I opened emacs and geiser and had to eval a bunch of things to narrow it down. It feels like I'm doing it wrong. (I don't have much experience with scheme) From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 05:25:29 2021 Received: (at 44178) by debbugs.gnu.org; 28 Jan 2021 10:25:29 +0000 Received: from localhost ([127.0.0.1]:47324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l54UR-0006Pe-Q4 for submit@debbugs.gnu.org; Thu, 28 Jan 2021 05:25:28 -0500 Received: from smtp-out-4.mxes.net ([198.205.123.69]:23688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l52Vk-0005JF-77 for 44178@debbugs.gnu.org; Thu, 28 Jan 2021 03:18:40 -0500 Received: from Customer-MUA (mua.mxes.net [IPv6:fd::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 4CEA97597A; Thu, 28 Jan 2021 03:18:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mxes.net; s=mta; t=1611821914; bh=mHV9Pyfs/DRlNaJpz13c+Cj/M+HxQrKEYFzNhSiqRo4=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mI1KpcXvKaqaj3WvKKR9qQb31o1qhGL2VCMRVjC42V9O5de2faF+eTck/IjcC31Vc k2O8jmqaRB7oCZfzmUuGdNSeTvYf/3irQQ/u5tor1vgELI1xX4PrCjTl5gQV+8in0f XL7bw47KJ9cUNKCOjZW1lep1vkVj/iAHSZcpfKvo= From: Timmy Douglas To: Katherine Cox-Buday , 44178@debbugs.gnu.org, JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: packaging a golang package In-Reply-To: <87wnvymoxe.fsf@gmail.com> References: <87h7nrud2a.fsf@timmydouglas.com> <4bdbc469-ad45-4739-b001-739ad3a60adc@www.fastmail.com> <87a6thtyvm.fsf@timmydouglas.com> <87bldw0ztb.fsf@timmydouglas.com> <20210125204534.ovhvt7rzj7tbqrnt@fjo-extia-HPdeb.example.avalenn.eu> <87wnvymoxe.fsf@gmail.com> Date: Thu, 28 Jan 2021 00:18:31 -0800 Message-ID: <87ft2l4gq0.fsf@timmydouglas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Sent-To: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44178 X-Mailman-Approved-At: Thu, 28 Jan 2021 05:25:26 -0500 Cc: guix-devel@gnu.org, "help-guix@gnu.org" , Helio Machado <0x2b3bfa0@gmail.com>, Leo Famulari X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Katherine Cox-Buday writes: > Hello again, Fran=C3=A7ois! I've redirected this thread to guix-devel, and > the bug since we've begun discussing implementation details. > > JOULAUD Fran=C3=A7ois writes: > >> First is to use vendored dependencies (when upstream provides them). This >> one has the merits of simplicity (as we just have to download the >> source and launch `go build` or whatever is needed) and less risks of >> bugs. The downsides are known: difficult to audit Licences, duplication >> of code source, difficulty to follow security bugs, etc. > > -1 to this approach (explanation below). Seems like there could be two sub-scenarios here: the code could use go modules or not. >> Second is to re-vendor package from go.mod (coming directly from code >> source or synthetized from source) by creating a source derivation >> including all dependencies. This is the strategy followed by Nixpkgs >> as explained in [1]. (It seems to me this is the route followed in >> the patches to from Helio in [2] but I did not take the time to read >> them.) With this approach we still have some of the downsides of using >> vendored upstream but it is at least easier to verify the existence >> of upstream. > > I don't fully understand this approach, so I don't understand how this > is different to approach three? Does this mean we create a pseudo, > non-public package which states all the dependencies as inputs? If so, > why wouldn't we just go with option three? I think this approach is like saying you git clone the upstream repo, run go mod vendor or go mod download, then go build. Or whatever buildGoModule does in nix (https://github.com/NixOS/nixpkgs/issues/84826) I read through that issue and would personally vote for this approach of using `go` to restore the code. I think trying to reimplement go module restore process with Guix packages is bordering on Not Invented Here. There would be a never ending battle of trying to reimplement the go module restore process and the amount of source packages would really clutter things up. I think some of the issues with the distro wanting to change a package could be solved with a feature to patch go.mod before calling `go` to restore. >> Third is to package every dependencies. This is the most transparent way >> and the one that leads to less code duplication but the downside is the >> difficulty to scale with the number of packages (even if the objective of >> patch at [3] is to automate it) and the need to have only one reference >> version for each package in the distribution which have its own share of >> problems (one of them being that we don't use those tested by upstream >> as stated in [4]). > > I think this is the eternal conflict between distributions and > code-bases. As a software engineer, I am a fan of vendoring. It removes > entire classes of issues: > > - Dependency on remote servers to be up to fetch dependencies and > perform builds > - Requiring some kind of system to pin versions > - Needing to stay on top of releases even if that doesn't meet your > schedule or needs > > As a packager for a distribution, I dislike vendoring because of the > reasons you outlined above, _but_ I also dislike building upstream > software with versions of dependencies that weren't approved, tested, > and verified, upstream. It seems to me like that's a recipe for > unstable, maybe even insecure, software. > > Normally, distributions are forced to do this because their packaging > and build systems are only set up to support one version at a time. Guix > can theoretically support all versions, but doesn't want to take on the > dependency graph explosion this approach would cause. > > If we go on historical precedent, and how Guix handles the other > language ecosystems, we should only have one version of each dependency, > and build all software which relies on that dependency on the version we > have packaged. Guix has already begun taking on the difficult challenges > with this approach, including patching upstream to work with versions of > dependencies upstream was not built for. That sounds like a pretty difficult challenge. Seems like it could quickly become untenable if a commonly used library had some sort of breaking change between versions and different versions of it were used by different packages. I don't think anything is stopping Guix from having multiple versions, but hand-assigning them would feel pretty manual and error-prone. On the other hand, like you said, the dependency graph explosion from importing everything would be overwhelming. > I dislike it, but I also don't think we should try to solve the broader > class of issues while trying to implement an importer. It should be a > larger discussion within the Guix community across _all_ language > packages about how we might achieve upstream parity while still > maintaining our goals as a distribution, all while not crippling our > infrastructure and people :) > > That's my viewpoint, but I think we should all defer to some of the > longer-term maintainers who have helped guide Guix. You wrote up both sides pretty well, but I couldn't tell if you had a strong opinion on having go restore dependencies vs Guix packaging dependencies. You had a lot of strong points for vendoring, but you're writing an importer... > Thanks for writing up these options. +1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 08:28:08 2021 Received: (at 44178) by debbugs.gnu.org; 28 Jan 2021 13:28:08 +0000 Received: from localhost ([127.0.0.1]:47593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l57LE-0006se-ID for submit@debbugs.gnu.org; Thu, 28 Jan 2021 08:28:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l57LC-0006s9-8a for 44178@debbugs.gnu.org; Thu, 28 Jan 2021 08:28:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41875) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l57L6-000802-AS; Thu, 28 Jan 2021 08:28:00 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58086 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l57L5-0007hx-3u; Thu, 28 Jan 2021 08:27:59 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Katherine Cox-Buday Subject: Re: [PATCH] Create importer for Go modules References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> <87r1mb6zu9.fsf@gmail.com> <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> <87sg6mmolg.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?utf-8?Q?Pluvi=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Jan 2021 14:27:57 +0100 In-Reply-To: <87sg6mmolg.fsf@gmail.com> (Katherine Cox-Buday's message of "Wed, 27 Jan 2021 08:38:51 -0600") Message-ID: <87czxpp4wy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44178 Cc: Helio Machado <0x2b3bfa0@gmail.com>, "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, JOULAUD =?utf-8?Q?Fran=C3=A7ois?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Katherine Cox-Buday skribis: > - The conversation about this seems to be happening in 3 different > places: here, help-guix, and guix-devel. I guess we should be > centralizing here. +1 > - I don't have any experience coordinating with people in this > email-style forge. I don't know how the inter-diff patches work with > attribution, nor how to get everyone on the same page. It seems like > multiple people are making conflicting changes at once (maybe that's > just my perception). I think whoever among you is available to work on it these days could take the lead and prepare a final version of the patches. It looks like it=E2=80=99s approaching a first =E2=80=9Ccommittable=E2=80=9D version (per= haps just missing an addition to doc/guix.texi and test cases like we have =E2=80=98tests/cpan.s= cm=E2=80=99 & co.) For attribution, I=E2=80=99d keep Katherine as the commit author and add a =E2=80=98Co-authored-by=E2=80=99 line for Fran=C3=A7ois and for Helio (that= =E2=80=99s how we usually handle that given that Git assumes each commit has a single author). When that first version is committed, you can all submit patches for improvements. For now, the focus should be on getting the first version in. :-) My 2=C2=A2, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 11:03:36 2021 Received: (at 44178) by debbugs.gnu.org; 28 Jan 2021 16:03:36 +0000 Received: from localhost ([127.0.0.1]:49596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l59lg-000314-45 for submit@debbugs.gnu.org; Thu, 28 Jan 2021 11:03:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l59le-00030n-Ga for 44178@debbugs.gnu.org; Thu, 28 Jan 2021 11:03:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45200) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l59lY-0004ay-Nv; Thu, 28 Jan 2021 11:03:28 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58482 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l59lV-00025w-Ql; Thu, 28 Jan 2021 11:03:26 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: adfeno--- via Subject: Re: packaging a golang package References: <87h7nrud2a.fsf@timmydouglas.com> <4bdbc469-ad45-4739-b001-739ad3a60adc@www.fastmail.com> <87a6thtyvm.fsf@timmydouglas.com> <87bldw0ztb.fsf@timmydouglas.com> <20210125204534.ovhvt7rzj7tbqrnt@fjo-extia-HPdeb.example.avalenn.eu> <87wnvymoxe.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?utf-8?Q?Pluvi=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Jan 2021 17:03:22 +0100 In-Reply-To: (adfeno's message of "Thu, 28 Jan 2021 07:32:18 -0300") Message-ID: <87mtwtkq0l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44178 Cc: guix-devel@gnu.org, 44178@debbugs.gnu.org, Adonay Felipe Nogueira X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, adfeno--- via skribis: > If by vendoring we mean bundling and also make users fetch data from plac= es not explicitly committed to the GNU FSDG, then allow me to jump in to ad= d some important notes. > > Em 27/01/2021 11:31, Katherine Cox-Buday escreveu: >> As a packager for a distribution, I dislike vendoring because of the >> reasons you outlined above, _but_ I also dislike building upstream >> software with versions of dependencies that weren't approved, tested, >> and verified, upstream. It seems to me like that's a recipe for >> unstable, maybe even insecure, software. > > I also agree that this would be problematic, but I fear that if we surren= der to vendoring, we might defeat the purpose of GNU Guix. I sympathize with that feeling. It=E2=80=99s definitely a hard problem. Even Debian, which has been a lighthouse for many on these matters, recently gave up: https://lwn.net/Articles/843313/ I think both Katherine=E2=80=99s concerns and yours are valid. IMO, the importer should be able to import things recursively and assume we=E2=80=99re not going to bundle anything. It=E2=80=99d be up to the pack= ager, then, to opt out and selectively use bundled copies of dependencies, if and when that appears necessary. > I'm OK with the importer approach but, *in my opinion*, I don't think thi= s tackles the true issue described on the 4th paragraph of the =E2=80=9CLic= ense Rules=E2=80=9D described on the GNU FSDG ([1]), this is why I opened G= uix bug #45450 ([2]). IMO, =E2=80=98guix import=E2=80=99 does not =E2=80=9Csteer users towards ob= taining any nonfree information=E2=80=9D any more than wget does. It=E2=80=99s a tool for pack= agers that returns a package definition or template thereof, and it=E2=80=99s up to the packager to decide what to do with it. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 29 11:43:11 2021 Received: (at 44178) by debbugs.gnu.org; 29 Jan 2021 16:43:11 +0000 Received: from localhost ([127.0.0.1]:52845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5WrW-0000oy-CU for submit@debbugs.gnu.org; Fri, 29 Jan 2021 11:43:11 -0500 Received: from mx07-00115501.pphosted.com ([185.132.182.48]:18314 helo=mx08-00115501.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5WrR-0000om-9o for 44178@debbugs.gnu.org; Fri, 29 Jan 2021 11:43:08 -0500 Received: from pps.filterd (m0001541.ppops.net [127.0.0.1]) by mx07-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10TGVWCx008897; Fri, 29 Jan 2021 17:43:03 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=radiofrance20190306; bh=CM5WxL5vRmqPsxYJQdP18+gwq09zAkNhOwrmSjqF/gQ=; b=f1kqd0hKQJfGiS/1BaBAZwwbW5HHkSS5Kw9g/TTS+AkuBH3PET6d58h8uk6zcDidTWTe xyg4W1TYt9+y2dAbS0MH03mrcZoe3aqwqTv5IMpA3n14XqwCzVppKZ7bMRS4Y/qNy6Mq ycu5WC1Djq1gYtRSVNtrnIPbql8UDwvfwJqO0MyHAcVzaTJ8gUIf9nWnuFH3QRymC4yI y4cvyYkpStbeMxpi1fUPk1wSNZIFiPdl0ze+I7J4kzSyuZ16V6FmHTdLKgVBlPu/j8Ty b5mEMwWRAMWYatVoaXo+Y5ycmhm6uI3bTQslWcHsHRwOvBTxAzlDveOG0Li3mb4rLM/T zg== Received: from fra01-mr2-obe.outbound.protection.outlook.com (mail-mr2fra01lp0102.outbound.protection.outlook.com [104.47.25.102]) by mx07-00115501.pphosted.com with ESMTP id 3688x9avma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Jan 2021 17:43:03 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bv3yS8VWPlPUuzSdqW7OQpm8jk6ZYmsqgv1Qp8U7t1SL0zvm7cmkGm6iI/Yujxix7Q4RygMMD25nl42kw/ttvZZp7y111W1OH6G/44gFxsVygKodbJtvWXyJRREKTKhLqi6jqqWC/3xzoA48DNoMbUo8H5WEgfoKctRj51SxTL3UvKt5Bou655caltOecWhmjIlF3UFI//D7vjgGfQiP7gOlWc16XurAb4N4Cy7IBDhCpd0r6QdCBaIugGASZYlaALrUb7wXjWSNI78qiBUL+OOFHPWGPL+OF2O+xgnH3vXR5TioW9r88AUY2iGGjiHa2ejPr6PNy+ouNDK0bz4vFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CM5WxL5vRmqPsxYJQdP18+gwq09zAkNhOwrmSjqF/gQ=; b=M+GeyaG5IzHhNa8rpEDM1JFE4rOUIX/AGKJFd0ImFTYPEzz2ICJl9tPQcCa2vriah0Hh1h/AJ5DmtaZV+MkXgpxIUymZVJDfBAsz7XY3XKZsV2m+uwzGad2+rmjnqzQfqjpP0xx0r+LFc8tjrZFtdvC346oAUX/RJpl9cSXbTpSyj5rqrHsNf2fXZSB9CvJDUKXOhyXYlIlX6EtvaeTNpC56LhPdgStZZHa1VXULPKpfbMMIpCIp5Et47Y77mOB1XrYvVvo8FaPV2D2K7BQ6pc3nmVDysbrhGaxRYPlGrVTJmHb0V+8N5zL79YulaDXHHt7dlJ9Yt7Zh6Rw9ITKaoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CM5WxL5vRmqPsxYJQdP18+gwq09zAkNhOwrmSjqF/gQ=; b=pZNpCMtr1Uft8tNFSWxP5rm70CuxhV0/mwflCzXhhqZYOyznagVle4J1uU+rua6PoSvcbxSvU8k/LziKj2se/evTYZqCgEIs98lhr6JbzJnQ4KVgGbvYHZb0scV1HUKCRJWmQ1N+p5Py1AVCqlLlTJIMJTfMj2oJiZNAKlPILJw= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR0P264MB0987.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:147::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.16; Fri, 29 Jan 2021 16:43:02 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58%6]) with mapi id 15.20.3784.017; Fri, 29 Jan 2021 16:43:02 +0000 From: =?utf-8?B?Sk9VTEFVRCBGcmFuw6dvaXM=?= To: =?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?= , "44178@debbugs.gnu.org" <44178@debbugs.gnu.org> Subject: Re: [PATCH] Create importer for Go modules Thread-Topic: [PATCH] Create importer for Go modules Thread-Index: AQHW8c+fh3EThKxKn0aE+FBPMWbUYao1zif4gAMIIACAArpljIABfodkgAHH4YA= Date: Fri, 29 Jan 2021 16:43:02 +0000 Message-ID: <20210129163945.irrdlm3updejkcsg@fjo-extia-HPdeb.example.avalenn.eu> References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> <87r1mb6zu9.fsf@gmail.com> <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> <87sg6mmolg.fsf@gmail.com> <87czxpp4wy.fsf@gnu.org> In-Reply-To: <87czxpp4wy.fsf@gnu.org> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 40136abd-68fd-4539-fb35-08d8c474f1e0 x-ms-traffictypediagnostic: PR0P264MB0987: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: El/TLmO+r8QYa7V/t4VtWw9yPL3Wegx1nmbi8yuXpbIHh+t25i6hZMUYNwDKACw024AqQVaoem8pgrdT+1pNEuT7dNGY5eXzwmfGY/M/13lNXs5zcBtqPXqh18Cn1wDgw7SGY7ylJCTpO/tocQpY7zsoMR/cAKM6M30/UU9Wnef6Zr/5E0TCbEftvKxIWjVz+uTtWQk9Fpx4S/2z84EyvnOaJ0cmUxfqW5A7Zj+tKRnddns3MzqL5OHs9kdkfLSAtaf45fptazttxrTBceagqoA6oMFPrs+/DxRWoUjQpEO9AxllzoBjIuLlpKdPxfukjHchMveZzfjU0008z3RqLSpGXe6HRHeCsnbRi6smxHGLS4JIARm8AHxGabKM/BeJZOoCsuJ/DK2Z5M9RwFHi8jV7tDRtRODzVvShlZta7X+eIb+XUdo18iheajgs+wR/iXcd8SNmo+F2KyVvkILp4ck0TphytI3k6LS1D0glvMTFAH3r5mrpgKVos4QOsssK+gi5lEa/HfvqjzN17QXnqDyXTv9HSGHs00bCaQGeSX1Fi9eS9J7cPg9EK41upjDtk1185BiSpShokUIU7a/wDtb8ZQv4l3K0A/9LRK/KImo= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(110136005)(6512007)(966005)(8936002)(83380400001)(316002)(76116006)(8676002)(66946007)(66556008)(85202003)(64756008)(85182001)(66446008)(86362001)(2906002)(186003)(4326008)(1076003)(5660300002)(6486002)(66476007)(66574015)(478600001)(26005)(4744005)(71200400001)(6506007)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?utf-8?B?dWkxL0xCNlpFOCsvQVNLTmR6d2ZYZ1BoOUdCRUw3VnVUU01qSVJ5dmVEK1ZC?= =?utf-8?B?Wk5ZbHluYWFraS9FREdaR211eXhQRzYwcDhUdHUrcFIyeWpieGNXV25tUTFN?= =?utf-8?B?M0NENWZuS21pc0I4OUF2NUQzS2FZczFCaXMzbzJWWUw5YngwNnlsZ211ckFH?= =?utf-8?B?T3FIckVGOG5SbnRlaktUWW84cHk1cEJIRnBURng0YTZxRVZrc2kwdDJPUHJz?= =?utf-8?B?N0NjV1pzRVpCWGIxZysvMEkvRkttbmtjcTBpZWZnYUxYaVFTVDEvNUxzaFZ1?= =?utf-8?B?QXNVUjk1Q0d2TFJWd1dvdkFEenhDK3hEVzBkeURGN0xTa1ZjZ0JBTnkyaElZ?= =?utf-8?B?QzVUWXdjTjZRTHpsTVAyYWlBMVVJay9haFFoNWF5ZWhjSmVVTXlkSHpZMmJk?= =?utf-8?B?c3JaYUYrUnM4Y3BndW83ZUxSRzM5WlNCeVJKTEpHRVNGM2g0Y1ozY3h5Nkls?= =?utf-8?B?dWxidUJpUHVYbVQzUWw3cmtpd2NHeGpsVTFhTEJqbGVHZlRBUkZwcGJnbFdM?= =?utf-8?B?UkY3Qys0UmRRcnlxcmtDcjJKUi9JQThlQ1ZRQTV4Vmd3aGlJVmo1QzAxV0hR?= =?utf-8?B?YnR6MmFiaU9ObU8vU2l5Nk5ML1Joc0dKeFQrV2dkNDY1YmNObGhWaGxmV0lk?= =?utf-8?B?amhoc2ZtUGEvNHpWaWNVNk5rcFBCY0tiUmg5Tlc4MXdSVENyK2xuckJIQnRh?= =?utf-8?B?bDJKSk5oUmduZHZMWlhXS1Qwa2VTYWRoRDdCSXFMN2VxTk9RRWJyNHZyYURO?= =?utf-8?B?WW42VnBudGZ6UCszcjhoUnF4aEg2bnRvWFlMWU8vMGNEK1Jsem9Pc3Jka0sx?= =?utf-8?B?WUdESndWWTlRYVBXbkExdFk5dmVrZEFkVG42ZzVONm5ROG02azdVWk43UUpo?= =?utf-8?B?MUxQa1JZNnA0RXpUK1dIcENaRzMrWWQrT0lUMzJRTVRSTENyZGJpeTBzRFlq?= =?utf-8?B?TVZhbUs0REtxR291Njc3STMrWE9xMU0yWmlMaDAyWlFvSURuK3NDZWF6eVRw?= =?utf-8?B?SVAvSXFlamlaNHUyWHVLMm4xUC9XUlhLQ3doRGxwbERrUDczNlNoU0ViTDdV?= =?utf-8?B?bUMzWnk3NHJ6OERKL2FVQ1ZrSVR2Yi9kNW5XaUZjelR3MmMwREwvWE8xS1ZI?= =?utf-8?B?OTFyZWtWODJWZy91b1dwK2s5VHdMNjVyVVgzYWVnRklhMk1MMEw4bm0reW9x?= =?utf-8?B?MTdJUXhlWWJnOTV4cTlWNGtXZ2dOUWlEZ3RYbmpVR1VaY0FjZ0lTSkF0UGI2?= =?utf-8?B?cmxGMzRTR05SN0JYdVhpczJ2dSszdDdrN05QUnJkSTRiSEQrYisrcDNEV1Q4?= =?utf-8?B?eXNtaUwzVkJrZVNUVkZ4UTdqeGdKdmZ2ZjM2a1JITzEwOVFEREVrVExHcTl2?= =?utf-8?B?bExUYjBnWUpXUG43Y0Q0dzBnSSswb0krdDlySUJRTnlzdi84UFRZekhrQVdG?= =?utf-8?Q?VL60baww?= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 40136abd-68fd-4539-fb35-08d8c474f1e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2021 16:43:02.5139 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RQQQZO2WisWQmYiP8knXr+TDQ1qRZTmCBepfG++RK73bDsaNRUlvhp8cDh1rPnZxU/9Fb0lw3oEPZQz/voeP4g/0bS9wxQERCoBEWs47DWgSRWtGklavEbXqYsfmtqly X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB0987 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-01-29_06:2021-01-29, 2021-01-29 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 clxscore=1015 bulkscore=0 impostorscore=0 adultscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101290081 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) SGVsbG8hDQoNCk9uIFRodSwgSmFuIDI4LCAyMDIxIGF0IDAyOjI3OjU3UE0gKzAxMDAsIEx1ZG92 aWMgQ291cnTDqHMgd3JvdGU6DQo+IEkgdGhpbmsgd2hvZXZlciBhbW9uZyB5b3UgaXMgYXZhaWxh YmxlIHRvIHdvcmsgb24gaXQgdGhlc2UgZGF5cyBjb3VsZA0KPiB0YWtlIHRoZSBsZWFkIGFuZCBw cmVwYXJlIGEgZmluYWwgdmVyc2lvbiBv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GVuZGVuY2llcyBJIGZvdW5kKSBhbmQgaXQgbW9zdGx5IHdvcmtzLg0KDQpSZWdh cmRzLA0KRnJhbsOnb2lz From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 29 11:52:19 2021 Received: (at 44178) by debbugs.gnu.org; 29 Jan 2021 16:52:19 +0000 Received: from localhost ([127.0.0.1]:52871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5X0D-00018e-C1 for submit@debbugs.gnu.org; Fri, 29 Jan 2021 11:52:19 -0500 Received: from mx07-00115501.pphosted.com ([185.132.182.48]:41916 helo=mx08-00115501.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5X0A-00018S-Sd for 44178@debbugs.gnu.org; Fri, 29 Jan 2021 11:52:08 -0500 Received: from pps.filterd (m0001505.ppops.net [127.0.0.1]) by mx07-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10TGjF1R022815 for <44178@debbugs.gnu.org>; Fri, 29 Jan 2021 17:52:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=radiofrance20190306; bh=A2tAJyG7PGX6eZE66F0SE7XwtkHHRJ63IU6ic7Q+oE4=; b=L6/E/6UyJndijpRIARoLlxgTetCPgchC2JGKxryJmiqDXbsGW5zSSVZwPGXNav+gDQZ4 rf0rnZgpg4oXMkv+LOrggrOQha0lh07i9Wqk2kwc7gNiFf5MFf4kkvkzx+z32fNZjTjD +I7jRYpYdPv/L1D2C7Uydi0k5EM8xsDXtuFvVPWG7cEqbdtLo5NaNpm2BzN69v2+NcFt p+x5HhFpJe0T2qsyzqNu0HyXyW7sD0k0GECA51K1addapckyz8jNNcm2n78gQwaqbgW/ pohyfsw/bf1BjHZ2swUbB5Fc+FjB19IgrK68XklHlUsk5OYshiou6dwP74V06ekgZtF5 4g== Received: from fra01-pr2-obe.outbound.protection.outlook.com (mail-pr2fra01on0108.outbound.protection.outlook.com [104.47.24.108]) by mx07-00115501.pphosted.com with ESMTP id 36895rjwty-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <44178@debbugs.gnu.org>; Fri, 29 Jan 2021 17:52:04 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O5fWt0xE0sjizVYjQNrSVrFA8ewM2NQJofTDAgDSh4eslQdFLbWXfPK019j8Jhiz0AFHE8lRRVPyzlsKcrd45LG8/p3uxjI8JjckDtcV8u2BclcY8ztSfb0USNQyDcIoUyTZ/2zTz7iDcYO44Gdnfa+z+UAxGV+6dMVUNurcyx9oRBB2P8tqDQT50uM2DupzQQEKblI1in0r1DeF+DDRCEdlYvFgV/gTechQYu45PKh2YPFbIDUpW2sgHNQlJ50mC4+9+gsWkRt6aapABl8BGO+ezL3Td/oGFs7OsaXzyuVJXUVqhXq0drMMJiu98qlsWLGZYrVdESfj9RhCoFW26A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A2tAJyG7PGX6eZE66F0SE7XwtkHHRJ63IU6ic7Q+oE4=; b=hYmV/HKoS+nJIJQaIeCBJHyEaf0G4i/F5vtgX8sQT72nOWqZoVm/oUd4qogAtmR8uriI5z3tK6g5w031K0ViNv2zdW1LL+U2uT2MDnczpUmEs9IWQswi9fED15R39lHyLNhH1P7yQ8SxiCkofv/rvw8kf4pdYhI5bUPShdpHXI4VTDZBwVULkIrqWXDTpgYmS0MhoBYJ8FeouhXvNiVc4G9790J5j07b6pJ5N43yJkiz+j7f3bvTK3F6FPO0bEp0BOAM2gwXY4uuxZhA7cMEC2J581Bb4KkrChUgxR/9XvnzDeR7kkG0YaWnbKl4F4kEd5TlLIFS6RFLHhxG9O05XA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A2tAJyG7PGX6eZE66F0SE7XwtkHHRJ63IU6ic7Q+oE4=; b=ZwHqKLQChaXxjaVtjen4QAAmIdL2TQPdiCwhdN/G/dqB9UF6OinQpyqmS7GeCgY5EgtVRlkHi3YVTjsVQaa170LGQM9KBb4fNvC9GyPVO0tRCDsavrgsBkBs35MiN3ngEM1uigWEy0MB3xS8lLOrKRDWHIm7ER9AP6BHNY0jsDQ= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR0P264MB0572.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Fri, 29 Jan 2021 16:52:03 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58%6]) with mapi id 15.20.3784.017; Fri, 29 Jan 2021 16:52:03 +0000 From: =?iso-8859-1?Q?JOULAUD_Fran=E7ois?= To: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org> Subject: [PATCHv2] Create importer for Go modules Thread-Topic: [PATCHv2] Create importer for Go modules Thread-Index: AQHW9l8RwPhX3/Q56k6NvVPLE/X+iw== Date: Fri, 29 Jan 2021 16:52:02 +0000 Message-ID: <20210129164827.vrrty5gmi4paf7xv@fjo-extia-HPdeb.example.avalenn.eu> References: <20210129163945.irrdlm3updejkcsg@fjo-extia-HPdeb.example.avalenn.eu> In-Reply-To: <20210129163945.irrdlm3updejkcsg@fjo-extia-HPdeb.example.avalenn.eu> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: debbugs.gnu.org; dkim=none (message not signed) header.d=none;debbugs.gnu.org; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3b60d1ec-9488-4a48-add1-08d8c47633fb x-ms-traffictypediagnostic: PR0P264MB0572: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rjs3Xx1RQMyvZ+se3YobzuhAeRpJkM05hqJ46dhuy7XbKjCKYVbs6+fnsRv602gz+9dsEJTwvDLuEmng1msyeIqJaF69tBKDWF7RCYuUcFLEohsc9mvi/sGCQij/RHLd+qh7IJ/r0NJOduNxZVXH1Jg+dbhkPij+myGKQxZ0KioDfRu9UFF6d38jitMUjNR6phB5WGUJsyza44Y4bqWu2hezN8RX60l+eV6mSu+Kt9SylPBsUVy9mbZn9LXsTtTjJcgQ+MqOJYzzYZr687JuSEeBQtCj3Rw/1RiiWOEFmrR2MsglZeKu0hXeTUXNvfNikxYQVV1wWHpmsR5SAmmAs/fipGBhlEy12YHhCB2jNl80o/Mcf/mnGwKTvYSeEef6RBs9uk3GeXMEzMDO5wf9V1Zwb+ar8OeviNGp/Yb9q4uArG3WvlOmQKBJKJEW4bQsi+CJ6jdMioB5FSmvopbKu5pnhPojIdhm7WPZOwyih3grKypCmDAlEqeD/VKm5DgfhNTnUgRub+nA1f6ZQly9uWDny7jYOkSwyeOyowYplN5KtRrSMXuf59+J4lP97FXANNro3np88SoJ1eV8IanKs34RTWKz8HrBbDb2Wf12vO/ixphI3N33LGfrVS9jvsOv6WMLjK2Sab3AVMkoqIk3tQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(396003)(346002)(136003)(366004)(66476007)(66574015)(76116006)(66946007)(6486002)(66556008)(966005)(5660300002)(186003)(478600001)(86362001)(66446008)(26005)(71200400001)(8936002)(2906002)(316002)(64756008)(9686003)(6512007)(83380400001)(30864003)(6506007)(1076003)(6916009)(8676002)(2004002)(579004)(559001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?5Rot5tK4sjd+E4mAXcKmoTIxGxs+xHdsPq/o/YFO7lIx8XZ4X16sO7D0C0?= =?iso-8859-1?Q?+S4FdHUoZ+LDckJP8ZJUEZNozCHoaYr7oJYQUocx+6/qaCAeW44iMxRfXZ?= =?iso-8859-1?Q?31btcvOGVMWKTa3tNHvlPzKSUN+5dDMhrSbNBAIZ8s0W3jr30snhp42j47?= =?iso-8859-1?Q?aubQUuYFb+pP1bB+qIzJe50Xxtv9EhHs0ZYC38GuUZdUl5Es1hfNdeMdYl?= =?iso-8859-1?Q?G7UT0oW8f709sx4DQ8xxbxHOSQ2zhDIYpsnKy10PZI4odsL2ZInTSyLBmp?= =?iso-8859-1?Q?dqGBeQmrL84hJBD5WdomTqmS2SozlsZOAbwOvXK+vakYKNcilbU6kUQMeS?= =?iso-8859-1?Q?hfXEoTDuKFpnQBOQzWXhacaIiyqCzRuA8jwXJHyrR3kq1E19Dm+SzgKqs2?= =?iso-8859-1?Q?66uOcaXyh4JcTmS0b0wWftQB9stQLMaD/U29bBOJovH6sos8Wtf5YM6iQp?= =?iso-8859-1?Q?XBnJ2LFf6/wQxxTeFQe+G33WdtPaiAw1VoJUYzi47nD38UWCwA/AuvoIWt?= =?iso-8859-1?Q?3ee8xkKE4oN7bgBqq+u2K7R0+7TK/oY7gTdJR/nbzEhUOt8Ido2roLaJJA?= =?iso-8859-1?Q?Zvbyj9TS1j/yH1yimIUqyuRBQd/rm/3A3ECyyC9/Bhvf04wdCiNPEqpwMd?= =?iso-8859-1?Q?QmBqSVq9RaTxgyjy40Rp0Jl0P+4b45gTwowWtt/XAfOEJvkgfudVz689yT?= =?iso-8859-1?Q?xZ9t5a6Z2ZHSAMx0sPJnLcubBPLvkMyNgho7U3C7WcuTZoeHi4hSUdPLVz?= =?iso-8859-1?Q?dmSPFQg/xz4PUlHgpRC1GID+xA3y+TE7SKB5neBVY2NZsRLA9bDsyT2q63?= =?iso-8859-1?Q?wznbTWmxVHeFD60b0agXAanBPzDQmCa4zPDkEQycvQ/fVibixG0ahMHFfG?= =?iso-8859-1?Q?q7TCmpS1g8BdMzJrGu7Y9JvjbCAa8DKU4DMV6nzxbx80HOMIdiSs109cJv?= =?iso-8859-1?Q?PZFqj2Yo4H2+D1PYWBoiZqugjqfIaNSeQnSXcf8oCruXeHunlv8Jl8LKmt?= =?iso-8859-1?Q?CSRqzNCppcCIiV5mwzCF6/TUfNN0S1OH8dCnp4rALEHGZbr+GRxz5hb9Mh?= =?iso-8859-1?Q?ygXIhqTvlHLWHh+bDCaYhNb3HrNqhfBiPIlCjtRjg8/c?= Content-Type: text/plain; charset="iso-8859-1" Content-ID: <24A251FD2E97CE4A826BCA2AB96C6DA5@FRAP264.PROD.OUTLOOK.COM> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 3b60d1ec-9488-4a48-add1-08d8c47633fb X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2021 16:52:02.9592 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: v3OzlCL/s/lNiQeH4SZ8eDFQLvq9ReNt3/5PZjY+8SofwRnnqnyTeSJp6USc4e0H5UczxPzkrYPhoRRPoArOSYtky4F3t3cnwsvIgXNQQoYSwbqmZXAnBJp/lQ9t1P/i X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB0572 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-01-29_06:2021-01-29, 2021-01-29 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 clxscore=1015 mlxscore=0 suspectscore=0 adultscore=0 impostorscore=0 priorityscore=1501 spamscore=0 phishscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101290082 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 44178 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) This patch add a `guix import go` command. It was tested with several big repositories and seems to mostly work for the import part (because building Guix packages is an other story). * guix/import/go.sc: Created Go Importerm * guix/scripts/import.scm: Added Go Importer Subcommand * guix/scripts/import/go.scm: Created Go Importer Subcommand * doc/guix.texi: add a paragraph about `guix import go` * tests/import-go.scm: tests for parse-go.mod procedure Signed-off-by: Francois Joulaud --- doc/guix.texi | 25 +++ guix/import/go.scm | 384 +++++++++++++++++++++++++++++++++++++ guix/scripts/import.scm | 2 +- guix/scripts/import/go.scm | 118 ++++++++++++ tests/import-go.scm | 143 ++++++++++++++ 5 files changed, 671 insertions(+), 1 deletion(-) create mode 100644 guix/import/go.scm create mode 100644 guix/scripts/import/go.scm create mode 100644 tests/import-go.scm diff --git a/doc/guix.texi b/doc/guix.texi index 6ea782fd23..d77e2811ae 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -860,6 +860,10 @@ substitutes (@pxref{Invoking guix publish}). @uref{https://ngyro.com/software/guile-semver.html, Guile-Semver} for the @code{crate} importer (@pxref{Invoking guix import}). =20 +@item +@uref{https://www.nongnu.org/guile-lib/doc/ref/htmlprag/, guile-lib} for +the @code{crate} importer (@pxref{Invoking guix import}). + @item When @url{http://www.bzip.org, libbz2} is available, @command{guix-daemon} can use it to compress build logs. @@ -11370,6 +11374,27 @@ Select the given repository (a repository name). = Possible values include: of coq packages. @end itemize @end table + +@item go +@cindex go +Import metadata for a Go module using +@uref{https://proxy.golang.org, proxy.golang.org}. + +This importer is highly experimental. + +@example +guix import go gopkg.in/yaml.v2 +@end example + +Additional options include: + +@table @code +@item --recursive +@itemx -r +Traverse the dependency graph of the given upstream package recursively +and generate package expressions for all those packages that are not yet +in Guix. +@end table @end table =20 The structure of the @command{guix import} code is modular. It would be diff --git a/guix/import/go.scm b/guix/import/go.scm new file mode 100644 index 0000000000..cf2d31ce12 --- /dev/null +++ b/guix/import/go.scm @@ -0,0 +1,384 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2020 Katherine Cox-Buday +;;; Copyright =A9 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> +;;; Copyright =A9 2021 Fran=E7ois Joulaud +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;;; (guix import golang) wants to make easier to create Guix package +;;; declaration for Go modules. +;;; +;;; Modules in Go are "collection of related Go packages" which are +;;; "the unit of source code interchange and versioning". +;;; Modules are generally hosted in a repository. +;;; +;;; At this point it should handle correctly modules which +;;; - have only Go dependencies; +;;; - use go.mod; +;;; - and are accessible from proxy.golang.org (or configured GOPROXY). +;;; +;;; We translate Go module paths to a Guix package name under the +;;; assumption that there will be no collision. + +(define-module (guix import go) + #:use-module (ice-9 match) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 receive) + #:use-module (ice-9 regex) + #:use-module (htmlprag) + #:use-module (sxml xpath) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-11) + #:use-module (json) + #:use-module ((guix download) #:prefix download:) + #:use-module (guix import utils) + #:use-module (guix import json) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module (guix utils) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix base16) + #:use-module (guix base32) + #:use-module ((guix build download) #:prefix build-download:) + #:use-module (web uri) + + #:export (go-module->guix-package + go-module-recursive-import + infer-module-root)) + +(define (go-path-escape path) + "Escape a module path by replacing every uppercase letter with an exclam= ation +mark followed with its lowercase equivalent, as per the module Escaped Pat= hs +specification. https://godoc.org/golang.org/x/mod/module#hdr-Escaped_Paths= " + (define (escape occurrence) + (string-append "!" (string-downcase (match:substring occurrence)))) + (regexp-substitute/global #f "[A-Z]" path 'pre escape 'post)) + + +(define (fetch-latest-version goproxy-url module-path) + "Fetches the version number of the latest version for MODULE-PATH from t= he +given GOPROXY-URL server." + (assoc-ref + (json-fetch (format #f "~a/~a/@latest" goproxy-url + (go-path-escape module-path))) + "Version")) + +(define (fetch-go.mod goproxy-url module-path version file) + "Fetches go.mod from the given GOPROXY-URL server for the given MODULE-P= ATH +and VERSION." + (let ((url (format #f "~a/~a/@v/~a.mod" goproxy-url + (go-path-escape module-path) + (go-path-escape version)))) + (parameterize ((current-output-port (current-error-port))) + (build-download:url-fetch url + file + #:print-build-trace? #f)))) + +(define (parse-go.mod go.mod-path) + (parse-go.mod-port (open-input-file go.mod-path))) + +(define (parse-go.mod-port go.mod-port) + "PARSE-GO.MOD takes a filename in GO.MOD-PATH and extract a list of +requirements from it." + ;; We parse only a subset of https://golang.org/ref/mod#go-mod-file-gram= mar + ;; which we think necessary for our use case. + (define (toplevel results) + "Main parser, RESULTS is a pair of alist serving as accumulator for + all encountered requirements and replacements." + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; parsing ended, give back the result + results) + ((string=3D? line "require (") + ;; a require block begins, delegate parsing to IN-REQUIRE + (in-require results)) + ((string=3D? line "replace (") + ;; a replace block begins, delegate parsing to IN-REPLACE + (in-replace results)) + ((string-prefix? "require " line) + ;; a require directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (require-directive results stripped-line))) + (toplevel new-results))) + ((string-prefix? "replace " line) + ;; a replace directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (replace-directive results stripped-line))) + (toplevel new-results))) + (#t + ;; unrecognised line, ignore silently + (toplevel results))))) + (define (in-require results) + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; this should never happen here but we ignore silently + results) + ((string=3D? line ")") + ;; end of block, coming back to toplevel + (toplevel results)) + (#t + (in-require (require-directive results line)))))) + (define (in-replace results) + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; this should never happen here but we ignore silently + results) + ((string=3D? line ")") + ;; end of block, coming back to toplevel + (toplevel results)) + (#t + (in-replace (replace-directive results line)))))) + (define (replace-directive results line) + "Extract replaced modules and new requirements from replace directive + in LINE and add to RESULTS." + ;; ReplaceSpec =3D ModulePath [ Version ] "=3D>" FilePath newline + ;; | ModulePath [ Version ] "=3D>" ModulePath Version newl= ine . + (let* ((requirements (car results)) + (replaced (cdr results)) + (re (string-concatenate + '("([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?" + "[[:blank:]]+" "=3D>" "[[:blank:]]+" + "([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + (version (match:substring match 3)) + (new-module-path (match:substring match 4)) + (new-version (match:substring match 6)) + (new-replaced (acons module-path version replaced)) + (new-requirements + (if (string-match "^\\.?\\./" new-module-path) + requirements + (acons new-module-path new-version requirements)))) + (cons new-requirements new-replaced))) + (define (require-directive results line) + "Extract requirement from LINE and add it to RESULTS." + (let* ((requirements (car results)) + (replaced (cdr results)) + ;; A line in a require directive is composed of a module path a= nd + ;; a version separated by whitespace and an optionnal '//' comm= ent at + ;; the end. + (re (string-concatenate + '("^[[:blank:]]*" + "([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)" + "([[:blank:]]+//.*)?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + (version (match:substring match 2))) + (cons (acons module-path version requirements) replaced))) + (with-input-from-port go.mod-port + (lambda () + (let* ((results (toplevel '(() . ()))) + (requirements (car results)) + (replaced (cdr results))) + ;; At last we remove replaced modules from the requirements list + (fold + (lambda (replacedelem requirements) + (alist-delete! (car replacedelem) requirements)) + requirements + replaced))))) + +(define (infer-module-root module-path) + "Go modules can be defined at any level of a repository's tree, but quer= ying +for the meta tag usually can only be done at the webpage at the root of th= e +repository. Therefore, it is sometimes necessary to try and derive a modul= e's +root path from its path. For a set of well-known forges, the pattern of wh= at +consists of a module's root page is known before hand." + ;; See the following URL for the official Go equivalent: + ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21b9= 9f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 + ;; + ;; TODO: handle module path with VCS qualifier as described in + ;; https://golang.org/ref/mod#vcs-find and + ;; https://golang.org/cmd/go/#hdr-Remote_import_paths + (define-record-type + (make-vcs url-prefix root-regex type) + vcs? + (url-prefix vcs-url-prefix) + (root-regex vcs-root-regex) + (type vcs-type)) + (let* ((known-vcs + (list + (make-vcs + "github.com" + "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-vcs + "bitbucket.org" + "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[A-= Za-z0-9_.\\-]+)*$" + 'unknown) + (make-vcs + "hub.jazz.net/git/" + "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-vcs + "git.apache.org" + "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-]+= )*$" + 'git) + (make-vcs + "git.openstack.org" + "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(= \\.git)?(/[A-Za-z0-9_.\\-]+)*$" + 'git))) + (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs) mod= ule-path)) + known-vcs))) + (if vcs + (match:substring (string-match (vcs-root-regex vcs) module-path) 1= ) + module-path))) + +(define (go-module->guix-package-name module-path) + "Converts a module's path to the canonical Guix format for Go packages." + (string-downcase + (string-append "go-" + (string-replace-substring + (string-replace-substring + module-path + "." "-") + "/" "-")))) + +(define-record-type + (make-module-meta import-prefix vcs repo-root) + module-meta? + (import-prefix module-meta-import-prefix) + ;; VCS field is a symbol + (vcs module-meta-vcs) + (repo-root module-meta-repo-root)) + +(define (fetch-module-meta-data module-path) + "Fetches module meta-data from a module's landing page. This is + necessary because goproxy servers don't currently provide all the + information needed to build a package." + ;; + (define (meta-go-import->module-meta text) + "Takes the content of the go-import meta tag as TEXT and gives back + a MODULE-META record" + (define (get-component s start) + (let* + ((start (string-skip s char-set:whitespace start)) + (end (string-index s char-set:whitespace start)) + (end (if end end (string-length s))) + (result (substring s start end))) + (values result end))) + (let*-values (((import-prefix end) (get-component text 0)) + ((vcs end) (get-component text end)) + ((repo-root end) (get-component text end))) + (make-module-meta import-prefix (string->symbol vcs) repo-root))) + (define (html->meta-go-import port) + "Read PORT with HTML content. Find the go-import meta tag and gives + back its content as a string." + (let* ((parsedhtml (html->sxml port)) + (extract-content (node-join + (select-kids (node-typeof? 'html)) + (select-kids (node-typeof? 'head)) + (select-kids (node-typeof? 'meta)) + (select-kids (node-typeof? '@)) + (node-self + (node-join + (select-kids (node-typeof? 'name)) + (select-kids (node-equal? "go-import")))) + (select-kids (node-typeof? 'content)) + (select-kids (lambda (_) #t)))) + (content (car (extract-content parsedhtml)))) + content)) + (let* ((port (build-download:http-fetch (string->uri (format #f "https:/= /~a?go-get=3D1" module-path)))) + (meta-go-import (html->meta-go-import port)) + (module-metadata (meta-go-import->module-meta meta-go-import))) + (close-port port) + module-metadata)) + +(define (module-meta-data-repo-url meta-data goproxy-url) + "Return the URL where the fetcher which will be used can download the so= urce +control." + (if (member (module-meta-vcs meta-data)'(fossil mod)) + goproxy-url + (module-meta-repo-root meta-data))) + +(define (source-uri vcs-type vcs-repo-url file) + "Generate the `origin' block of a package depending on what type of sour= ce +control system is being used." + (case vcs-type + ((git) + `(origin + (method git-fetch) + (uri (git-reference + (url ,vcs-repo-url) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + ,(guix-hash-url file))))) + ((hg) + `(origin + (method hg-fetch) + (uri (hg-reference + (url ,vcs-repo-url) + (changeset ,version))) + (file-name (format #f "~a-~a-checkout" name version)))) + ((svn) + `(origin + (method svn-fetch) + (uri (svn-reference + (url ,vcs-repo-url) + (revision (string->number version)) + (recursive? #f))) + (file-name (format #f "~a-~a-checkout" name version)) + (sha256 + (base32 + ,(guix-hash-url file))))) + (else + (raise-exception (format #f "unsupported vcs type: ~a" vcs-type))))) + +(define* (go-module->guix-package module-path #:key (goproxy-url "https://= proxy.golang.org")) + (call-with-temporary-output-file + (lambda (temp port) + (let* ((latest-version (fetch-latest-version goproxy-url module-path)= ) + (go.mod-path (fetch-go.mod goproxy-url module-path latest-vers= ion + temp)) + (dependencies (map car (parse-go.mod temp))) + (guix-name (go-module->guix-package-name module-path)) + (root-module-path (infer-module-root module-path)) + ;; VCS type and URL are not included in goproxy information. F= or + ;; this we need to fetch it from the official module page. + (meta-data (fetch-module-meta-data root-module-path)) + (vcs-type (module-meta-vcs meta-data)) + (vcs-repo-url (module-meta-data-repo-url meta-data goproxy-url= ))) + (values + `(package + (name ,guix-name) + ;; Elide the "v" prefix Go uses + (version ,(string-trim latest-version #\v)) + (source + ,(source-uri vcs-type vcs-repo-url temp)) + (build-system go-build-system) + ,@(maybe-inputs (map go-module->guix-package-name dependencies)= ) + ;; TODO(katco): It would be nice to make an effort to fetch thi= s + ;; from known forges, e.g. GitHub + (home-page ,(format #f "https://~a" root-module-path)) + (synopsis "A Go package") + (description ,(format #f "~a is a Go package." guix-name)) + (license #f)) + dependencies))))) + +(define* (go-module-recursive-import package-name + #:key (goproxy-url "https://proxy.gol= ang.org")) + (recursive-import + package-name + #:repo->guix-package (lambda* (name . _) + (go-module->guix-package + name + #:goproxy-url goproxy-url)) + #:guix-name go-module->guix-package-name)) diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 0a3863f965..1d2b45d942 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -77,7 +77,7 @@ rather than \\n." ;;; =20 (define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa" = "gem" - "cran" "crate" "texlive" "json" "opam")) + "go" "cran" "crate" "texlive" "json" "opam")) =20 (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm new file mode 100644 index 0000000000..fde7555973 --- /dev/null +++ b/guix/scripts/import/go.scm @@ -0,0 +1,118 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2020 Katherine Cox-Buday +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts import go) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix scripts) + #:use-module (guix import go) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-go)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + '()) + +(define (show-help) + (display (G_ "Usage: guix import go PACKAGE-PATH +Import and convert the Go module for PACKAGE-PATH.\n")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (display (G_ " + -r, --recursive generate package expressions for all Go modules\ + that are not yet in Guix")) + (display (G_ " + -p, --goproxy=3DGOPROXY specify which goproxy server to use")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import go"))) + (option '(#\r "recursive") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive #t result))) + (option '(#\p "goproxy") #t #f + (lambda (opt name arg result) + (alist-cons 'goproxy + (string->symbol arg) + (alist-delete 'goproxy result)))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-go . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (G_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((module-name) + (if (assoc-ref opts 'recursive) + (map (match-lambda + ((and ('package ('name name) . rest) pkg) + `(define-public ,(string->symbol name) + ,pkg)) + (_ #f)) + (go-module-recursive-import module-name + #:goproxy-url + (or (assoc-ref opts 'goproxy) + "https://proxy.golang.org"= ))) + (let ((sexp (go-module->guix-package module-name + #:goproxy-url + (or (assoc-ref opts 'gopro= xy) + "https://proxy.golang.= org")))) + (unless sexp + (leave (G_ "failed to download meta-data for module '~a'~%"= ) + module-name)) + sexp))) + (() + (leave (G_ "too few arguments~%"))) + ((many ...) + (leave (G_ "too many arguments~%")))))) diff --git a/tests/import-go.scm b/tests/import-go.scm new file mode 100644 index 0000000000..7c59bf2d7c --- /dev/null +++ b/tests/import-go.scm @@ -0,0 +1,143 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2021 Fran=E7ois Joulaud +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;;; Summary +;; Tests for guix/import/go.scm + +(define-module (test-import-go) + #:use-module (guix import go) + #:use-module (guix base32) + ;#:use-module (guix tests) + #:use-module (ice-9 iconv) + #:use-module (ice-9 match) + #:use-module (srfi srfi-64)) + +(define fixture-go-mod-simple + "module my/thing +go 1.12 +require other/thing v1.0.2 +require new/thing/v2 v2.3.4 +exclude old/thing v1.2.3 +replace bad/thing v1.4.5 =3D> good/thing v1.4.5 +") + +(define fixture-go-mod-with-block + "module M + +require ( + A v1 + B v1.0.0 + C v1.0.0 + D v1.2.3 + E dev +) + +exclude D v1.2.3 +") + + +(define fixture-go-mod-complete + "module M + +go 1.13 + +replace github.com/myname/myproject/myapi =3D> ./api + +replace github.com/mymname/myproject/thissdk =3D> ../sdk + +replace launchpad.net/gocheck =3D> github.com/go-check/check v0.0.0-201402= 25173054-eb6ee6f84d0a + +require ( + github.com/user/project v1.1.11 + github.com/user/project/sub/directory v1.1.12 + bitbucket.org/user/project v1.11.20 + bitbucket.org/user/project/sub/directory v1.11.21 + launchpad.net/project v1.1.13 + launchpad.net/project/series v1.1.14 + launchpad.net/project/series/sub/directory v1.1.15 + launchpad.net/~user/project/branch v1.1.16 + launchpad.net/~user/project/branch/sub/directory v1.1.17 + hub.jazz.net/git/user/project v1.1.18 + hub.jazz.net/git/user/project/sub/directory v1.1.19 + k8s.io/kubernetes/subproject v1.1.101 + one.example.com/abitrary/repo v1.1.111 + two.example.com/abitrary/repo v0.0.2 +) + +replace two.example.com/abitrary/repo =3D> github.com/corp/arbitrary-repo = v0.0.2 + +replace ( + golang.org/x/sys =3D> golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a= // pinned to release-branch.go1.13 + golang.org/x/tools =3D> golang.org/x/tools v0.0.0-20190821162956-65e3620a= 7ae7 // pinned to release-branch.go1.13 +) + +") + +(test-begin "import go") + +(test-equal "go-path-escape" + "github.com/!azure/!avere" + ((@@ (guix import go) go-path-escape) "github.com/Azure/Avere")) + + + +;; We define a function for all similar tests with different go.mod files +(define (testing-parse-mod name expected input) + (define (inf? p1 p2) + (string) id 1l6FWE-0007od-Qx for submit@debbugs.gnu.org; Sun, 31 Jan 2021 11:24:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6FWB-0007oP-JI for 44178@debbugs.gnu.org; Sun, 31 Jan 2021 11:24:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35099) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6FW5-0002cG-Kn; Sun, 31 Jan 2021 11:24:01 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50408 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6FW5-0004dh-5Z; Sun, 31 Jan 2021 11:24:01 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: [PATCH] Create importer for Go modules References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> <87r1mb6zu9.fsf@gmail.com> <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> <87sg6mmolg.fsf@gmail.com> <87czxpp4wy.fsf@gnu.org> <20210129163945.irrdlm3updejkcsg@fjo-extia-HPdeb.example.avalenn.eu> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 =?utf-8?Q?Pluvi=C3=B4se?= an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 31 Jan 2021 17:23:59 +0100 In-Reply-To: <20210129163945.irrdlm3updejkcsg@fjo-extia-HPdeb.example.avalenn.eu> ("JOULAUD =?utf-8?Q?Fran=C3=A7ois=22's?= message of "Fri, 29 Jan 2021 16:43:02 +0000") Message-ID: <877dntnkgw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44178 Cc: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, JOULAUD Fran=C3=A7ois skribis: > On Thu, Jan 28, 2021 at 02:27:57PM +0100, Ludovic Court=C3=A8s wrote: >> I think whoever among you is available to work on it these days could >> take the lead and prepare a final version of the patches. It looks like >> it=E2=80=99s approaching a first =E2=80=9Ccommittable=E2=80=9D version (= perhaps just missing an >> addition to doc/guix.texi and test cases like we have =E2=80=98tests/cpa= n.scm=E2=80=99 & >> co.) > > I thought I would be able to send a working v2 of this patch today but > it seems I was too optimistic. > > I found that some go.mod out there uses quoted string > which our ad-hoc parser don't know how to parse. cf. > https://github.com/go-yaml/yaml/blob/496545a6307b2a7d7a710fd516e5e16e8ab6= 2dbc/go.mod > > I don't know if this is a blocker for a merge or not. Your call; if it=E2=80=99s an infrequent problem, we could commit it and le= ave a FIXME in the code. We could also use guile-yaml (or maybe some Go code?) to parse it correctly. > Apart from that I don't know how to add guile-lib to the dependencies of > Guix (in order to use htmlprag). Help needed. So =E2=80=98xml->sxml=E2=80=99 isn=E2=80=99t good enough? (If we can avoid= the guile-lib dependency, the better.) To depend on Guile-Lib, you would: 1. Add it to (guix self) =E2=80=94 this is the code used by =E2=80=98guix= pull=E2=80=99; 2. Add it to the =E2=80=98inputs=E2=80=99 field of the =E2=80=98guix=E2= =80=99 package; 3. Maybe add a configure check in =E2=80=98configure.ac=E2=80=99, though = it would be best if we could arrange to make it an optional dependency. > I tested it recursively with github.com/hashicorp/consul (which was one > of those with the most dependencies I found) and it mostly works. Yay, sounds promising! Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 19 10:51:12 2021 Received: (at 44178) by debbugs.gnu.org; 19 Feb 2021 15:51:12 +0000 Received: from localhost ([127.0.0.1]:50190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lD83j-0007JG-M8 for submit@debbugs.gnu.org; Fri, 19 Feb 2021 10:51:12 -0500 Received: from mx07-00115501.pphosted.com ([185.132.182.48]:40482 helo=mx08-00115501.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lD83f-0007J5-06 for 44178@debbugs.gnu.org; Fri, 19 Feb 2021 10:51:11 -0500 Received: from pps.filterd (m0001541.ppops.net [127.0.0.1]) by mx07-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11JFmlQ3005349; Fri, 19 Feb 2021 16:51:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=radiofrance20190306; bh=HdygnXKMTRgpEBoUl1y4hb0W9V9ARzi26ingYN0DWIo=; b=AIULDbMsd6EZbJU6Oiqs2zrNRhG6oujF1esfkiWDgUqXaTGKZKoY4UIM9ZK9DkCNVanp R4XsGhpO3DUqprMpIaC6yunpJY+L+GmHek0t/Ln43VV+xMoEOs8x5Kvp0B6p38bAP0Ul MV0LneoIwjSAnZv0sQSvcmQ6xQ291Hc2f0iKMO/T2l6ZLYB8zroi2/HAhd7Oi1RIR7Lc FMJLBjNchxpT5SQljmOJ7Ux8ysfYWVjdUh/04BZN6DmHhxdSFXU+IRrKGaDOBuCwYfrF xXVzxkzlXhNfg4zriwgoQPfPA1wRmao6sKco+pXXapbbZhaopBx3BobbGRwo6W+FgHb+ sQ== Received: from fra01-pr2-obe.outbound.protection.outlook.com (mail-pr2fra01on0103.outbound.protection.outlook.com [104.47.24.103]) by mx07-00115501.pphosted.com with ESMTP id 36p3wbhycj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Feb 2021 16:51:05 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nRlfoFAKEfaA/GUrALufo7N4wYKiD7sDd2M80azv4uvtWi8P4WytImOQRCdTjqUjQ8HDBErdCcmc8c1ix/WcaMSMyp2yh7sCG6vn3aG0Id7tot7OJ2QaPMgJt4H0uy/4bAWkx+3MwJopIRoODFusILA93PAd4gcq89/h4pZC02RFx3TDY66uyZxBbupN113NCvZ6Vc2A8oFhQ61qwCfENgGidgeBlsv11ngYbZbdg1fa5jvx7rUz2yXbpUa2n98aB2ZRZWFA3xWXhCbQv6sxccnIfCWM7WaHGIOpsGnN6JS9lHb1h3UwOw7ItsspSHVNbI45ysbLIf+1e/XttYXKRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HdygnXKMTRgpEBoUl1y4hb0W9V9ARzi26ingYN0DWIo=; b=FJb1XgOUaIHKxZY6HBJtwq6cXKBp7dEaPz+eJsUcxWJL4rA9vTT7Iwrp53r8hCScjb2twezXAPBSVEu8R4daq7LWc6hXtJaPE8PAzGX2ISRvCBtd7yTymWvGSKMVXbd1cK5P8gON16IfTeenRyNvgoeM0wk4B89JV7Zdn7fVEq/4LiY0qhcRM3f7Xjt9+bz0ru5YFRmH4E71AA5oTjjQpefI7XntpqVeQwUIIDS//phKO2waJMpAHDXcRzBG6XbfpE87L3DakRh/UZO/l6xOsfKLbjpMhkwCrkSEu8NtNd0u1nk9lG6KKEYRUVfNG8VX0NJNoDyRXv9i+4Helgt1ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HdygnXKMTRgpEBoUl1y4hb0W9V9ARzi26ingYN0DWIo=; b=dQx/iZ3dP+YJN87SI7y5J9xfQj41zq/BKDGmGnYU91++0VvFgRMweTmbfFvA6ZPaNBwk65ML36VTijPJxoVB4gyu8AMRiDKzshjzDgl/8AIXRfkxHJHJk9DT32cbMw+irfi98rfjq3POyAWgzt80XdedtC89Oij6heGFWCEb0Ck= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR2P264MB0350.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101:7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.38; Fri, 19 Feb 2021 15:51:04 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58%6]) with mapi id 15.20.3825.040; Fri, 19 Feb 2021 15:51:04 +0000 From: =?utf-8?B?Sk9VTEFVRCBGcmFuw6dvaXM=?= To: =?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?= Subject: Re: [PATCH] Create importer for Go modules Thread-Topic: [PATCH] Create importer for Go modules Thread-Index: AQHW8c+fh3EThKxKn0aE+FBPMWbUYao1zif4gAMIIACAArpljIABfodkgAHH4YCAAyBNZ4Ad0gSA Date: Fri, 19 Feb 2021 15:51:02 +0000 Message-ID: <20210219154028.z5aoyozf7qsrz3mt@fjo-extia-HPdeb.example.avalenn.eu> References: <20210123212742.m2thdeuzdvgpkgeo@fjo-extia-HPdeb.example.avalenn.eu> <87r1mb6zu9.fsf@gmail.com> <20210125205910.qvmcusm5w5n4pawy@fjo-extia-HPdeb.example.avalenn.eu> <87sg6mmolg.fsf@gmail.com> <87czxpp4wy.fsf@gnu.org> <20210129163945.irrdlm3updejkcsg@fjo-extia-HPdeb.example.avalenn.eu> <877dntnkgw.fsf@gnu.org> In-Reply-To: <877dntnkgw.fsf@gnu.org> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 42425d23-e88f-4ef1-3351-08d8d4ee29d7 x-ms-traffictypediagnostic: PR2P264MB0350: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kRvgCf9GUnQDglAfRVi9zAlhY/FUI8iet0fpzrsZt9nfuARRYVSxIcMiCZxp0rgAJCQ6GesUl7jAPZsf/d0wfybc+yGApHLvy6uzbg5SGoyw9eDR0MtHDlOowfpLG8Q+knX3GefGvLremTgn3tjntoEddy5gSnIqTJlUhA9MD/I2FQ17o7Rqg/1Qq1zjGckle8OWcrSc6Cbr7TK/ATf2a+FPTYDzLEOQ7JyMcspKj/D5sDGL4pammFhrIkZ5MUrg7ulOv/fgR/aTNCq88mI6Fo0P45TewP1mtdPnOiSqIMsOBYs/mXFjzpBfeJBbHfCWsODhU57gdr/AopTJxWbmkOAxGfoSIk7uKOTzlG+R4L7e/YqNJI0rDy0H1UDOMTdLnlRgtge3aFsDR+oK4jQz6CILnjwbqBPn8vn6d6Ogx5qi+lPaanxEeYXVKyEBt+BvQJzhiQ1UrhaHiB3utT6aGDs+HxLdF837JZSHFX0q0pQLpkICd40yvjdLmHBt/nqvsqC2J7Xzt4kCyYLPpP8xiAGx8LrpZUaHG1LqpRljk2tAVBiteyEkWtbzb4wplYm0GWJFXg9hCbbj5/snvASVVB6GGLCCUcSRNyGD5YYUte0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(346002)(366004)(39850400004)(136003)(76116006)(66946007)(66556008)(64756008)(66476007)(66446008)(966005)(86362001)(83380400001)(6512007)(9686003)(6916009)(71200400001)(85182001)(2906002)(54906003)(316002)(186003)(26005)(6506007)(5660300002)(1076003)(4326008)(6486002)(8936002)(66574015)(85202003)(8676002)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?utf-8?B?US9JYXB2VWhjaW5nTkxDU3hENUR2Y2dlMUpRVkNYbkYyOFlKR1owTnF4Kzhn?= =?utf-8?B?TVRxRUNUZWs0WmtHNDBudGtBWXMvTmsrL3hwbzhaWVFuN2diN3dLRnd1ZXIr?= =?utf-8?B?eWw5em9LbExxZjkrL3dxVGZjQVZHZGxrVWZLZlgvbVkvaGZLNEZVSDd2ZHNF?= =?utf-8?B?RlFjaDBzU25vaFQ0MTVxNUxJSVZaOVZJVFRYa1pCMWpVdUhlaFQ0S2NzbTdo?= =?utf-8?B?UHZJMTNNS2RaZ2k4c3JSbHRTcm9keE1jSUpEQW1Od1ZVb1k3eGx1Rkd1cTln?= =?utf-8?B?TjdWbm9CalcxQ1Yva0wwTTh0WWdheVd6YWE3NFd1WFBGeC95cU53SUhxOW9J?= =?utf-8?B?b3FFUHowakxOVEF1bDhqblJuQmlFNzRES254YTAwMUV1VFo5Znc4dWpRTWl0?= =?utf-8?B?WGppeGJUZzZSMVJzcnVEQzRMVk4rWXdzMGZSSnBqc01hajVVdzY1MU9iRGZL?= =?utf-8?B?MVJNS2lMWE01VGMwZnMvUGppa2NnMHFpSnlINklsS0MxNS8xOHFwYzVzTElM?= =?utf-8?B?TmZaWFRBOFNZeVJ3OUY3Y1dpN0tyUFZYVVg2U2p2dEVhSk1XT3hMc2lFS0JK?= =?utf-8?B?dVFzcThyL2ZnTXhmN3hoc0REQnNnRG1oNFpBTGhtdTUyYXRsSWdwSktnL2p0?= =?utf-8?B?U2dSOEZubk5RdUlKT0cwejNqVXhacHd0UHIyN1BCS05yYkVrUFFKcmJjMlVG?= =?utf-8?B?WjNOallidWxnWGd3aXJvM285cEJSV3l3eDc3YXhxeXpQRWQrUWxvd0NKNDVt?= =?utf-8?B?W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wSWdmeUhyd0VIdGxH?= =?utf-8?B?TzNBWjUwcDAweXhHY1RpTG1IeVVXRGVFMlBzWlNVeHVyNTZWbGJuMjdpTCs1?= =?utf-8?Q?xcLPHsyyNWgOVv43ZrRNXofaXAuxIVIAg39syeR?= Content-Type: text/plain; charset="utf-8" Content-ID: <9473DF8A8348BF488B8A68FECA4E1315@FRAP264.PROD.OUTLOOK.COM> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 42425d23-e88f-4ef1-3351-08d8d4ee29d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2021 15:51:04.1276 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JRB4iThQAyadixp00Qe+6khgTgSjHt/GckXFE1FfUG/upT7RreXoAtwY1RzM7JSzn5qT2HYGooTQ2g4X/0TSNn6fH4Ja9VS9gljrVr1kog5j/pooF6zkdreMgqBqXJDV X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2P264MB0350 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-02-19_07:2021-02-18, 2021-02-19 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 phishscore=0 adultscore=0 priorityscore=1501 clxscore=1011 lowpriorityscore=0 malwarescore=0 impostorscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102190126 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) SGVsbG8sDQoNCkkgd2lsbCBzZW5kIGEgdjMgb2YgdGhlIHBhdGNoIHZlcnkgc29vbiB3aGljaCBJ IGhvcGUgd2lsbCBiZSBtZXJnZWFibGUuDQoNCkl0IGlzIHN0aWxsIHZlcnkgZXhwZXJpbWVudGFs IGFuZCBJIG5vdGVkIGl0IGFzIHN1Y2ggaW4gZG9jdW1lbnRhdGlvbi4NCg0KSSBoYWQgcHJvYmxl bXMgd2l0aCB0aGUgaGFzaCBpbiBvcmlnaW4gd2hpY2ggZGlkIG5vdCB3b3JrIGFzIGV4cGVjdGVk LiBJDQpwcmVmZXJlZCB0byBkcm9wIHRoaXMgY29tcGxldGVseSBmb3Igbm93IGFuZCByZXBsYWNl ZCBpdCBieSBhIGZ1bGwgMA0KcGxhY2Vob2xkZXIuIEF0IGxlYXN0IGl0IGlzIGNvbnNpc3RlbnRs eSBhbmQgY29uc3BpY3VvdXNseSBiYWQuIEkgaGF2ZSBhDQp3b3JraW5nIHZlcnNpb24gb2Ygc29t ZXRoaW5nIHdoaWNoIGRvd25sb2FkIGdpdCByZXBvIGFuZCBnZW5lcmF0ZXMgZ3VpeA0KaGFzaCBm b3IgaXQgYnV0IEknZCByYXRoZXIgdG8gcHVzaCB0aGlzIGluIGEgc3Vic2VxdWVudCBwYXRjaCBh cyBpdCBpcw0KdmVyeSByb3VnaCBmb3Igbm93Lg0KDQpPbiBTdW4sIEphbiAzMSwgMjAyMSBhdCAw NToyMzo1OVBNICswMTAwLCBMdWRvdmljIENvdXJ0w6hzIHdyb3RlOg0KPiBKT1VMQVVEIEZyYW7D p29pcyA8RnJhbmNvaX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ljb3JwL2NvbnN1bCAod2hpY2ggd2FzIG9uZQ0KPiA+IG9mIHRob3NlIHdpdGggdGhlIG1vc3Qg ZGVwZW5kZW5jaWVzIEkgZm91bmQpIGFuZCBpdCBtb3N0bHkgd29ya3MuDQo+IA0KPiBZYXksIHNv dW5kcyBwcm9taXNpbmchDQoNClByb21pc2luZyBidXQgbm90IHRoZXJlLiBJIGhhdmUgbm93IHNl dmVyYWwgcmVjdXJzaXZlIGRlcGVuZGVuY2llcw0KYmV0d2VlbiBnZW5lcmF0ZWQgcGFja2FnZXMg SSBtdXN0IGludmVzdGlnYXRlLg0KDQpTdGlsbCwgMjM0IHBhY2thZ2UgZGVmaW5pdGlvbnMgZ2Vu ZXJhdGVkIG9uIG9uZSByZWN1cnNpdmUgaW1wb3J0IChldmVuDQppZiBJIGhhZCB0byByZXRyeSBi ZWNhdXNlIG9mIGludGVybWl0dGVudCBmYWlsdXJlIG9mIGZldGNoaW5nIGZyb20NCnByb3h5Lmdv bGFuZy5vcmcpLCBzbyBZYXkhDQoNClsxXTogaHR0cHM6Ly9naXQuc3IuaHQvfmVsYWlzL29yYW5n ZS90cmVlL21hc3Rlci9pdGVtL2d1aXgvaW1wb3J0L2dvLnNjbSNMNzg= From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 19 11:21:21 2021 Received: (at 44178) by debbugs.gnu.org; 19 Feb 2021 16:21:22 +0000 Received: from localhost ([127.0.0.1]:50238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lD8Wk-000855-UK for submit@debbugs.gnu.org; Fri, 19 Feb 2021 11:21:21 -0500 Received: from mx08-00115501.pphosted.com ([91.207.212.23]:21438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lD8Wg-00084r-RQ for 44178@debbugs.gnu.org; Fri, 19 Feb 2021 11:21:10 -0500 Received: from pps.filterd (m0030078.ppops.net [127.0.0.1]) by mx08-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11JG8oqv001253; Fri, 19 Feb 2021 17:21:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=radiofrance20190306; bh=CKrfpACY0kDCjEUnxl+mArrdWrKUYbuonE2HAGwIKdI=; b=rUIG2JJxEYpzRrn2pKFAdzxGYcFNmQbtAt74b+fyYoGNnd9S6hNf2JjZlV8TXTQn0kzB fau0Mib9Dc1CBZu+fR/gWfhFoGvusb4C8xAaekByJPQkF4jRxa2G0mbf7AzQVQ50v1P6 MvAn4hWY4QIQsuXQ1i2CtMw1anQPcx1+RdBN7ZgbNqfRf+oLG9YMByKoYHtyrBMKvk1G lS6IzsY77ezwLmMeC5fClBTNe5r1UbRHYZP7b0UqaYAX1s2zjAr2t+3fX3ZSPjtIcnll CDfhQENtFZj9pldqUA84kwnAjUzNskAi2cAV3Ab4tnnJwXtewdkuLDNQCTSUqD38eAqG Rg== Received: from fra01-mr2-obe.outbound.protection.outlook.com (mail-mr2fra01on0106.outbound.protection.outlook.com [104.47.25.106]) by mx08-00115501.pphosted.com with ESMTP id 36rd7ap5qb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Feb 2021 17:21:05 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y2rCDCB6QGVR2gNikZ9m6pjeAU0ChYEPZKe3gv/AgvZ+HpIough1BEe88iQjyNgT6Ns+LyoAOstmQq757hwJ80cY0ldfruSObzgDfbj/uBWuXEZ+QJ+uihH9dmuSN0kN25MTwmFCm0wzRcjw4JrOEWB2ajpCRQO+LCIyBlnr+z9+P+3ND2xNPLJClFLDntpZtJNUP4vO4j6H3vynjtiypCmPJ8hXOoRQrhdqaFIcKD+ZfKatWeKcQpOCJ1ocD6Ilopxoo0I7AHoH1ywCXh+mqHWKoiwS5WewVklG1m3OPhreLbSyFYD51QnzB0UPJYfsdq0mQL7FaZu2yMs2b8hMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CKrfpACY0kDCjEUnxl+mArrdWrKUYbuonE2HAGwIKdI=; b=cvYzAcufVz56I0F2GizcbEciZMM3v+iXPazPCTPiYfu3hAGFy92yFgpwbGwmEeqLad3FkKJOhhL7zoVToSPteTHSM/PPyVMZeQ5xgeGEI7+noTSLOC+0jxtJ5cFu39xc59ahyE3Oo6WKa0fnwsENqw530dJ2smd9qdg6oYe1hAXW9+ztYnYZXr0IVx2opySkSv8sVpjH9x/YbqEC0R8FI47uCeB9lpI1/u/hJjlzSIKZtUvveemf1VCG1DqdVaR8SmqnoQUFzni3eJgVCdFeqRdNW/vSZ/vVvVVN9p0fe3zjzIwBbdcyJ6YaI2jrTxhhyC3fO2+4mJtSzmXnfGZ5MQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CKrfpACY0kDCjEUnxl+mArrdWrKUYbuonE2HAGwIKdI=; b=s02xI/0aGA604swqvx5IEDKDGGWeJJKaU0KUNm+mwX29ArWhssnfMWyh8rGW8kgstifiNFpa5s4Xl0mpfRCcqLHU23SCe0UgIDOPZQ1cf+Rrvmuu1Rx6/W9PqLbxBQvH2+92+ArZgmHRfoXtBOKvMkZiRFLagzkXjt693YbndN0= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR0P264MB1177.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:165::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.36; Fri, 19 Feb 2021 16:21:03 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58%6]) with mapi id 15.20.3825.040; Fri, 19 Feb 2021 16:21:03 +0000 From: =?iso-8859-1?Q?JOULAUD_Fran=E7ois?= To: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org> Subject: [PATCHv3] Create importer for Go modules Thread-Topic: [PATCHv3] Create importer for Go modules Thread-Index: AQHXBts3rF0o2Aqs1kGgq7srmbRqZg== Date: Fri, 19 Feb 2021 16:21:03 +0000 Message-ID: <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> In-Reply-To: <20210219154028.z5aoyozf7qsrz3mt@fjo-extia-HPdeb.example.avalenn.eu> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: debbugs.gnu.org; dkim=none (message not signed) header.d=none;debbugs.gnu.org; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0499643d-03cc-4534-dffb-08d8d4f25a48 x-ms-traffictypediagnostic: PR0P264MB1177: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WN/sjV8lE8njcy0PPHY/iKljGD0OnvPmUL5kNw3x5QwGUsZbaiXJu2sLFZJr4Qpxh1tqciDrJFd8snW3DYJIx8NYPGm93KiEdpwQChoM5/zu/Ms69WfrbxZjFuY0Cmz4d1masJkpCGiiVmmgu7h1mHdQ34jB35NULZxALcjczCzZ+t+3rchfnkdl9mht/uB4+0nKIMjLm0ov/8jzpBcH/nkD9MuRi0/nV9eOeyRAy06THQ12Idglj5/S6Po/+P3PfBJURWz6ejW+V+mgPYqkMrr40lvVR1p2n5/9E0WmAh2XqfXlyScU5sfvlyv1DMQUfDXkBm6x9yagteyFNmBFL0YriLG1SOLDynrHbQ/G3rnHtDqZJ018TSQvBExoUFmI1r8HkQywctpW/Bk8Pa/8Bp2Yr8LhBxQTHitOautMlP0uFUm2i9RowVNAyk9J9GYdSO/mvMEVtSkNBkOrBzCP/G6Uj4OFc0dEv2ukC7xqZOCDmMDTVGzfg1SKRvNZSCB+omGQnwzjY9ELBZXrVU/QwiUVe2kIhr3nwVmoi3GLlr8ZXH7vWRmat2fMmYkNro0K03NfeVHTs5BcE3HnlvdJRJKmzyusKdtUN7WcX9Q8cmGMWPoIan8JCTmIrEiiuboKvAe2tUz264qSK0kGCeunbQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(39850400004)(376002)(366004)(30864003)(1076003)(76116006)(4326008)(6486002)(478600001)(5660300002)(71200400001)(54906003)(8936002)(66574015)(6506007)(6916009)(9686003)(66946007)(6512007)(316002)(66446008)(966005)(64756008)(66556008)(66476007)(2906002)(86362001)(26005)(8676002)(83380400001)(186003)(2004002)(559001)(579004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?bG3Dz3h4Qrno3yKHxzkj3f9X8LR2ShhpRqR+MmE2XN4qKOgQN5amBoTpsF?= =?iso-8859-1?Q?PS+07gLONx+y8EOx9/3isGtrDxjsM8zULZgw04I2RkIJOd9dVraq0ad+q2?= =?iso-8859-1?Q?7k5KJQi3x3pWuuosAgAniHlHZeCoH00Jt9nVkEgYt7+1XuSvuTZXYMl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ltE+gcB4Uk0JGiRgmb4YdmkmdA6fQUJifWya5N8H5xBx?= =?iso-8859-1?Q?/o3ft3YCyOqWc3cpQdkUSzrFGLtgEBXSpRovpndQbirNBgIzrC0uxBJHSe?= =?iso-8859-1?Q?Q+HohAbRrrXQGC1PCs01rm6LemMf+21zF0TvJ81b4+tOaSWRLTMC0sUKsN?= =?iso-8859-1?Q?V3bkJfFcRyFicK/M/XDgQ3gDlFJ/zYw53oOn/YZj1s7duzcA3PQjBE/DVH?= =?iso-8859-1?Q?Hy5GcIgfaU2af7mCgMjf00IF3oJZY42y+mw9tSkqGJnR2AqeYvwZBG862a?= =?iso-8859-1?Q?CXjLKj+lEnhjxvkGYFdG246mj6W6NGF5ZmPYqzbd8qxH7YmNtaj1inyISg?= =?iso-8859-1?Q?2BcR77l/1b?= Content-Type: text/plain; charset="iso-8859-1" Content-ID: <39CB4C40A3BD9748AB5C20E71470A75C@FRAP264.PROD.OUTLOOK.COM> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 0499643d-03cc-4534-dffb-08d8d4f25a48 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2021 16:21:03.4046 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3g082Rkc7ekGSMqH3X9t03ZXrzeeyX/ZQ4qs6SIK5czZUezKNqskVPLp/qMY6buyC5lSFjiniYrDYttIqDHISVtDBDayEporELyKIRNRB1GQtyv5eRjnmaGGKMkpo+Pe X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB1177 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-02-19_07:2021-02-18, 2021-02-19 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 clxscore=1015 priorityscore=1501 spamscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102190127 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: =?iso-8859-1?Q?Ludovic_Court=E8s?= , Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This patch add a `guix import go` command. It was tested with several big repositories and mostly works. Several features are lacking (see TODO in source code) but we will do the improvments step-by-step in future patches. * doc/guix.texi: doc about go importer and guile-lib dependency * gnu/packages/package-management.scm: added guile-lib dependency * guix/self.scm: add guile-lib dependency * guix/build-system/go.scm: go-version->git-ref function * guix/import/go.scm: Created Go importer * guix/scripts/import/go.scm: Subcommand for Go importer * guix/scripts/import.scm: Declare subcommand guix import go * tests/import-go.scm: Tests for parse-go.mod procedure Signed-off-by: Francois Joulaud --- doc/guix.texi | 26 ++ gnu/packages/package-management.scm | 2 + guix/build-system/go.scm | 35 ++- guix/import/go.scm | 416 ++++++++++++++++++++++++++++ guix/scripts/import.scm | 2 +- guix/scripts/import/go.scm | 118 ++++++++ guix/self.scm | 5 +- tests/import-go.scm | 144 ++++++++++ 8 files changed, 745 insertions(+), 3 deletions(-) create mode 100644 guix/import/go.scm create mode 100644 guix/scripts/import/go.scm create mode 100644 tests/import-go.scm diff --git a/doc/guix.texi b/doc/guix.texi index 5d28fca837..89c8abd261 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -861,6 +861,10 @@ substitutes (@pxref{Invoking guix publish}). @uref{https://ngyro.com/software/guile-semver.html, Guile-Semver} for the @code{crate} importer (@pxref{Invoking guix import}). =20 +@item +@uref{https://www.nongnu.org/guile-lib/doc/ref/htmlprag/, guile-lib} for +the @code{crate} importer (@pxref{Invoking guix import}). + @item When @url{http://www.bzip.org, libbz2} is available, @command{guix-daemon} can use it to compress build logs. @@ -11493,6 +11497,28 @@ Select the given repository (a repository name). = Possible values include: of coq packages. @end itemize @end table + +@item go +@cindex go +Import metadata for a Go module using +@uref{https://proxy.golang.org, proxy.golang.org}. + +This importer is highly experimental. See the source code for more info +about the current state. + +@example +guix import go gopkg.in/yaml.v2 +@end example + +Additional options include: + +@table @code +@item --recursive +@itemx -r +Traverse the dependency graph of the given upstream package recursively +and generate package expressions for all those packages that are not yet +in Guix. +@end table @end table =20 The structure of the @command{guix import} code is modular. It would be diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-man= agement.scm index 9fb8c40a31..06bb5bd2df 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -304,6 +304,7 @@ $(prefix)/etc/init.d\n"))) '((assoc-ref inputs "guile"))= )) (avahi (assoc-ref inputs "guile-avahi")) (gcrypt (assoc-ref inputs "guile-gcrypt")) + (guile-lib (assoc-ref inputs "guile-lib")= ) (json (assoc-ref inputs "guile-json")) (sqlite (assoc-ref inputs "guile-sqlite3")) (zlib (assoc-ref inputs "guile-zlib")) @@ -367,6 +368,7 @@ $(prefix)/etc/init.d\n"))) `(("guile-avahi" ,guile-avahi))) ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-4) + ("guile-lib" ,guile-lib) ("guile-sqlite3" ,guile-sqlite3) ("guile-zlib" ,guile-zlib) ("guile-lzlib" ,guile-lzlib) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index f8ebaefb27..594e0cb4f3 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -26,9 +26,42 @@ #:use-module (guix build-system gnu) #:use-module (guix packages) #:use-module (ice-9 match) + #:use-module (ice-9 regex) #:export (%go-build-system-modules go-build - go-build-system)) + go-build-system + + go-version->git-ref)) + +(define (go-version->git-ref version) + "GO-VERSION->GIT-REF parse pseudo-versions and extract the commit + hash from it, defaulting to full VERSION if we don't recognise a + pseudo-version pattern." + ;; A module version like v1.2.3 is introduced by tagging a revision in + ;; the underlying source repository. Untagged revisions can be referred + ;; to using a "pseudo-version" like v0.0.0-yyyymmddhhmmss-abcdefabcdef, + ;; where the time is the commit time in UTC and the final suffix is the + ;; prefix of the commit hash. + ;; cf. https://golang.org/cmd/go/#hdr-Pseudo_versions + (let* ((version + ;; if a source code repository has a v2.0.0 or later tag for + ;; a file tree with no go.mod, the version is considered to be + ;; part of the v1 module's available versions and is given an + ;; +incompatible suffix + ;; https://golang.org/cmd/go/#hdr-Module_compatibility_and_seman= tic_versioning + (if (string-suffix? "+incompatible" version) + (string-drop-right version 13) + version)) + (re (string-concatenate + (list + "(v?[0-9]\\.[0-9]\\.[0-9])" ; "v" prefix can be omitted in = version prefix + "(-|-pre\\.0\\.|-0\\.)" ; separator + "([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0= -9][0-9][0-9])-" ; timestamp + "([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0= -9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]= )"))) ; commit hash + (match (string-match re version))) + (if match + (match:substring match 4) + version))) =20 ;; Commentary: ;; diff --git a/guix/import/go.scm b/guix/import/go.scm new file mode 100644 index 0000000000..fead355bd2 --- /dev/null +++ b/guix/import/go.scm @@ -0,0 +1,416 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2020 Katherine Cox-Buday +;;; Copyright =A9 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> +;;; Copyright =A9 2021 Fran=E7ois Joulaud +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;;; (guix import golang) wants to make easier to create Guix package +;;; declaration for Go modules. +;;; +;;; Modules in Go are "collection of related Go packages" which are +;;; "the unit of source code interchange and versioning". +;;; Modules are generally hosted in a repository. +;;; +;;; At this point it should handle correctly modules which +;;; have only Go dependencies and are accessible from proxy.golang.org +;;; (or configured GOPROXY). +;;; +;;; We want it to work more or less this way: +;;; - get latest version for the module from GOPROXY +;;; - infer VCS root repo from which we will check-out source by +;;; + recognising known patterns (like github.com) +;;; + or (TODO) recognising .vcs suffix +;;; + or parsing meta tag in html served at the URL +;;; + or (TODO) if nothing else works by using zip file served by GOPROX= Y +;;; - get go.mod from GOPROXY (which is able to synthetize one if needed) +;;; - extract list of dependencies from this go.mod +;;; +;;; We translate Go module paths to a Guix package name under the +;;; assumption that there will be no collision. + +;;; TODO list +;;; - get correct hash in vcs->origin +;;; - print partial result during recursive imports (need to catch +;;; exceptions) +;;; - infer repo from module path with VCS qualifier +;;; (e.g. site.example/my/path/to/repo.git/and/subdir/module) +;;; - don't print fetch messages to stdout +;;; - pre-fill synopsis, description and license + +(define-module (guix import go) + #:use-module (ice-9 match) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 receive) + #:use-module (ice-9 regex) + #:use-module (guix build-system go) + #:use-module (htmlprag) + #:use-module (sxml xpath) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-11) + #:use-module (json) + #:use-module ((guix download) #:prefix download:) + #:use-module (guix git) + #:use-module (guix import utils) + #:use-module (guix import json) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module (guix utils) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix base16) + #:use-module (guix base32) + #:use-module (guix memoization) + #:use-module ((guix build download) #:prefix build-download:) + #:use-module (web uri) + + #:export (go-module->guix-package + go-module-recursive-import + infer-module-root-repo)) + + +(define (go-path-escape path) + "Escape a module path by replacing every uppercase letter with an exclam= ation +mark followed with its lowercase equivalent, as per the module Escaped Pat= hs +specification. https://godoc.org/golang.org/x/mod/module#hdr-Escaped_Paths= " + (define (escape occurrence) + (string-append "!" (string-downcase (match:substring occurrence)))) + (regexp-substitute/global #f "[A-Z]" path 'pre escape 'post)) + + +(define (go-module-latest-version goproxy-url module-path) + "Fetches the version number of the latest version for MODULE-PATH from t= he +given GOPROXY-URL server." + (assoc-ref + (json-fetch (format #f "~a/~a/@latest" goproxy-url + (go-path-escape module-path))) + "Version")) + +(define go-module-latest-version* (memoize go-module-latest-version)) + +(define (fetch-go.mod goproxy-url module-path version file) + "Fetches go.mod from the given GOPROXY-URL server for the given MODULE-P= ATH +and VERSION." + (let ((url (format #f "~a/~a/@v/~a.mod" goproxy-url + (go-path-escape module-path) + (go-path-escape version)))) + (parameterize ((current-output-port (current-error-port))) + (build-download:url-fetch url + file + #:print-build-trace? #f)))) + +(define (parse-go.mod go.mod-path) + (parse-go.mod-port (open-input-file go.mod-path))) + +(define (parse-go.mod-port go.mod-port) + "PARSE-GO.MOD takes a filename in GO.MOD-PATH and extract a list of +requirements from it." + ;; We parse only a subset of https://golang.org/ref/mod#go-mod-file-gram= mar + ;; which we think necessary for our use case. + (define (toplevel results) + "Main parser, RESULTS is a pair of alist serving as accumulator for + all encountered requirements and replacements." + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; parsing ended, give back the result + results) + ((string=3D? line "require (") + ;; a require block begins, delegate parsing to IN-REQUIRE + (in-require results)) + ((string=3D? line "replace (") + ;; a replace block begins, delegate parsing to IN-REPLACE + (in-replace results)) + ((string-prefix? "require " line) + ;; a require directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (require-directive results stripped-line))) + (toplevel new-results))) + ((string-prefix? "replace " line) + ;; a replace directive by itself + (let* ((stripped-line (string-drop line 8)) + (new-results (replace-directive results stripped-line))) + (toplevel new-results))) + (#t + ;; unrecognised line, ignore silently + (toplevel results))))) + (define (in-require results) + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; this should never happen here but we ignore silently + results) + ((string=3D? line ")") + ;; end of block, coming back to toplevel + (toplevel results)) + (#t + (in-require (require-directive results line)))))) + (define (in-replace results) + (let ((line (read-line))) + (cond + ((eof-object? line) + ;; this should never happen here but we ignore silently + results) + ((string=3D? line ")") + ;; end of block, coming back to toplevel + (toplevel results)) + (#t + (in-replace (replace-directive results line)))))) + (define (replace-directive results line) + "Extract replaced modules and new requirements from replace directive + in LINE and add to RESULTS." + ;; ReplaceSpec =3D ModulePath [ Version ] "=3D>" FilePath newline + ;; | ModulePath [ Version ] "=3D>" ModulePath Version newl= ine . + (let* ((requirements (car results)) + (replaced (cdr results)) + (re (string-concatenate + '("([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?" + "[[:blank:]]+" "=3D>" "[[:blank:]]+" + "([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + (version (match:substring match 3)) + (new-module-path (match:substring match 4)) + (new-version (match:substring match 6)) + (new-replaced (acons module-path version replaced)) + (new-requirements + (if (string-match "^\\.?\\./" new-module-path) + requirements + (acons new-module-path new-version requirements)))) + (cons new-requirements new-replaced))) + (define (require-directive results line) + "Extract requirement from LINE and add it to RESULTS." + (let* ((requirements (car results)) + (replaced (cdr results)) + ;; A line in a require directive is composed of a module path a= nd + ;; a version separated by whitespace and an optionnal '//' comm= ent at + ;; the end. + (re (string-concatenate + '("^[[:blank:]]*" + "([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)" + "([[:blank:]]+//.*)?"))) + (match (string-match re line)) + (module-path (match:substring match 1)) + ;; we saw double-quoted string in the wild without escape + ;; sequences so we just trim the quotes + (module-path (string-trim-both module-path #\")) + (version (match:substring match 2))) + (cons (acons module-path version requirements) replaced))) + (with-input-from-port go.mod-port + (lambda () + (let* ((results (toplevel '(() . ()))) + (requirements (car results)) + (replaced (cdr results))) + ;; At last we remove replaced modules from the requirements list + (fold + (lambda (replacedelem requirements) + (alist-delete! (car replacedelem) requirements)) + requirements + replaced))))) + +(define (infer-module-root-repo module-path) + "Go modules can be defined at any level of a repository's tree, but quer= ying +for the meta tag usually can only be done at the webpage at the root of th= e +repository. Therefore, it is sometimes necessary to try and derive a modul= e's +root path from its path. For a set of well-known forges, the pattern of wh= at +consists of a module's root page is known before hand." + ;; See the following URL for the official Go equivalent: + ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21b9= 9f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 + ;; + ;; TODO: handle module path with VCS qualifier as described in + ;; https://golang.org/ref/mod#vcs-find and + ;; https://golang.org/cmd/go/#hdr-Remote_import_paths + (define-record-type + (make-vcs url-prefix root-regex type) + vcs? + (url-prefix vcs-url-prefix) + (root-regex vcs-root-regex) + (type vcs-type)) + (let* ((known-vcs + (list + (make-vcs + "github.com" + "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-vcs + "bitbucket.org" + "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[A-= Za-z0-9_.\\-]+)*$" + 'unknown) + (make-vcs + "hub.jazz.net/git/" + "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" + 'git) + (make-vcs + "git.apache.org" + "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-]+= )*$" + 'git) + (make-vcs + "git.openstack.org" + "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(= \\.git)?(/[A-Za-z0-9_.\\-]+)*$" + 'git))) + (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs) mod= ule-path)) + known-vcs))) + (if vcs + (match:substring (string-match (vcs-root-regex vcs) module-path) 1= ) + module-path))) + +(define (go-module->guix-package-name module-path) + "Converts a module's path to the canonical Guix format for Go packages." + (string-downcase + (string-append "go-" + (string-replace-substring + (string-replace-substring + module-path + "." "-") + "/" "-")))) + +(define-record-type + (make-module-meta import-prefix vcs repo-root) + module-meta? + (import-prefix module-meta-import-prefix) + ;; VCS field is a symbol + (vcs module-meta-vcs) + (repo-root module-meta-repo-root)) + +(define (fetch-module-meta-data module-path) + "Fetches module meta-data from a module's landing page. This is + necessary because goproxy servers don't currently provide all the + information needed to build a package." + ;; + (define (meta-go-import->module-meta text) + "Takes the content of the go-import meta tag as TEXT and gives back + a MODULE-META record" + (define (get-component s start) + (let* + ((start (string-skip s char-set:whitespace start)) + (end (string-index s char-set:whitespace start)) + (end (if end end (string-length s))) + (result (substring s start end))) + (values result end))) + (let*-values (((import-prefix end) (get-component text 0)) + ((vcs end) (get-component text end)) + ((repo-root end) (get-component text end))) + (make-module-meta import-prefix (string->symbol vcs) repo-root))) + (define (html->meta-go-import port) + "Read PORT with HTML content. Find the go-import meta tag and gives + back its content as a string." + (let* ((parsedhtml (html->sxml port)) + (extract-content (node-join + (select-kids (node-typeof? 'html)) + (select-kids (node-typeof? 'head)) + (select-kids (node-typeof? 'meta)) + (select-kids (node-typeof? '@)) + (node-self + (node-join + (select-kids (node-typeof? 'name)) + (select-kids (node-equal? "go-import")))) + (select-kids (node-typeof? 'content)) + (select-kids (lambda (_) #t)))) + (content (car (extract-content parsedhtml)))) + content)) + (let* ((port (build-download:http-fetch (string->uri (format #f "https:/= /~a?go-get=3D1" module-path)))) + (meta-go-import (html->meta-go-import port)) + (module-metadata (meta-go-import->module-meta meta-go-import))) + (close-port port) + module-metadata)) + +(define (module-meta-data-repo-url meta-data goproxy-url) + "Return the URL where the fetcher which will be used can download the so= urce +control." + (if (member (module-meta-vcs meta-data)'(fossil mod)) + goproxy-url + (module-meta-repo-root meta-data))) + +(define (vcs->origin vcs-type vcs-repo-url version file) + "Generate the `origin' block of a package depending on what type of sour= ce +control system is being used." + (case vcs-type + ((git) + `(origin + (method git-fetch) + (uri (git-reference + (url ,vcs-repo-url) + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + ;; FIXME: get hash for git repo checkout + "0000000000000000000000000000000000000000000000000000")))) + ((hg) + `(origin + (method hg-fetch) + (uri (hg-reference + (url ,vcs-repo-url) + (changeset ,version))) + (file-name (format #f "~a-~a-checkout" name version)))) + ((svn) + `(origin + (method svn-fetch) + (uri (svn-reference + (url ,vcs-repo-url) + (revision (string->number version)) + (recursive? #f))) + (file-name (format #f "~a-~a-checkout" name version)) + (sha256 + (base32 + ,(guix-hash-url file))))) + (else + (raise-exception (format #f "unsupported vcs type: ~a" vcs-type))))) + +(define* (go-module->guix-package module-path #:key (goproxy-url "https://= proxy.golang.org")) + (call-with-temporary-output-file + (lambda (temp port) + (let* ((latest-version (go-module-latest-version* goproxy-url module-= path)) + (go.mod-path (fetch-go.mod goproxy-url module-path latest-vers= ion + temp)) + (dependencies (map car (parse-go.mod temp))) + (guix-name (go-module->guix-package-name module-path)) + (root-module-path (infer-module-root-repo module-path)) + ;; VCS type and URL are not included in goproxy information. F= or + ;; this we need to fetch it from the official module page. + (meta-data (fetch-module-meta-data root-module-path)) + (vcs-type (module-meta-vcs meta-data)) + (vcs-repo-url (module-meta-data-repo-url meta-data goproxy-url= ))) + (values + `(package + (name ,guix-name) + ;; Elide the "v" prefix Go uses + (version ,(string-trim latest-version #\v)) + (source + ,(vcs->origin vcs-type vcs-repo-url latest-version temp)) + (build-system go-build-system) + (arguments + '(#:import-path ,root-module-path)) + ,@(maybe-inputs (map go-module->guix-package-name dependencies)= ) + ;; TODO(katco): It would be nice to make an effort to fetch thi= s + ;; from known forges, e.g. GitHub + (home-page ,(format #f "https://~a" root-module-path)) + (synopsis "A Go package") + (description ,(format #f "~a is a Go package." guix-name)) + (license #f)) + dependencies))))) + +(define go-module->guix-package* (memoize go-module->guix-package)) + +(define* (go-module-recursive-import package-name + #:key (goproxy-url "https://proxy.gol= ang.org")) + (recursive-import + package-name + #:repo->guix-package (lambda* (name . _) + (go-module->guix-package* + name + #:goproxy-url goproxy-url)) + #:guix-name go-module->guix-package-name)) diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 0a3863f965..1d2b45d942 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -77,7 +77,7 @@ rather than \\n." ;;; =20 (define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa" = "gem" - "cran" "crate" "texlive" "json" "opam")) + "go" "cran" "crate" "texlive" "json" "opam")) =20 (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm new file mode 100644 index 0000000000..fde7555973 --- /dev/null +++ b/guix/scripts/import/go.scm @@ -0,0 +1,118 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2020 Katherine Cox-Buday +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts import go) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix scripts) + #:use-module (guix import go) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-go)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + '()) + +(define (show-help) + (display (G_ "Usage: guix import go PACKAGE-PATH +Import and convert the Go module for PACKAGE-PATH.\n")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (display (G_ " + -r, --recursive generate package expressions for all Go modules\ + that are not yet in Guix")) + (display (G_ " + -p, --goproxy=3DGOPROXY specify which goproxy server to use")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import go"))) + (option '(#\r "recursive") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive #t result))) + (option '(#\p "goproxy") #t #f + (lambda (opt name arg result) + (alist-cons 'goproxy + (string->symbol arg) + (alist-delete 'goproxy result)))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-go . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (G_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((module-name) + (if (assoc-ref opts 'recursive) + (map (match-lambda + ((and ('package ('name name) . rest) pkg) + `(define-public ,(string->symbol name) + ,pkg)) + (_ #f)) + (go-module-recursive-import module-name + #:goproxy-url + (or (assoc-ref opts 'goproxy) + "https://proxy.golang.org"= ))) + (let ((sexp (go-module->guix-package module-name + #:goproxy-url + (or (assoc-ref opts 'gopro= xy) + "https://proxy.golang.= org")))) + (unless sexp + (leave (G_ "failed to download meta-data for module '~a'~%"= ) + module-name)) + sexp))) + (() + (leave (G_ "too few arguments~%"))) + ((many ...) + (leave (G_ "too many arguments~%")))))) diff --git a/guix/self.scm b/guix/self.scm index 35fba1152d..ed5ee9ddea 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -814,6 +814,9 @@ itself." (define guile-ssh (specification->package "guile-ssh")) =20 + (define guile-lib + (specification->package "guile-lib")) + (define guile-git (specification->package "guile-git")) =20 @@ -842,7 +845,7 @@ itself." (append-map transitive-package-dependencies (list guile-gcrypt gnutls guile-git guile-avahi guile-json guile-semver guile-ssh guile-sqlite3 - guile-zlib guile-lzlib guile-zstd))) + guile-lib guile-zlib guile-lzlib guile-zstd))) =20 (define *core-modules* (scheme-node "guix-core" diff --git a/tests/import-go.scm b/tests/import-go.scm new file mode 100644 index 0000000000..ad4185684c --- /dev/null +++ b/tests/import-go.scm @@ -0,0 +1,144 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =A9 2021 Fran=E7ois Joulaud +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;;; Summary +;; Tests for guix/import/go.scm + +(define-module (test-import-go) + #:use-module (guix import go) + #:use-module (guix base32) + #:use-module (ice-9 iconv) + #:use-module (ice-9 match) + #:use-module (srfi srfi-64)) + +(define fixture-go-mod-simple + "module my/thing +go 1.12 +require other/thing v1.0.2 +require new/thing/v2 v2.3.4 +exclude old/thing v1.2.3 +replace bad/thing v1.4.5 =3D> good/thing v1.4.5 +") + +(define fixture-go-mod-with-block + "module M + +require ( + A v1 + B v1.0.0 + C v1.0.0 + D v1.2.3 + E dev +) + +exclude D v1.2.3 +") + + +(define fixture-go-mod-complete + "module M + +go 1.13 + +replace github.com/myname/myproject/myapi =3D> ./api + +replace github.com/mymname/myproject/thissdk =3D> ../sdk + +replace launchpad.net/gocheck =3D> github.com/go-check/check v0.0.0-201402= 25173054-eb6ee6f84d0a + +require ( + github.com/user/project v1.1.11 + github.com/user/project/sub/directory v1.1.12 + bitbucket.org/user/project v1.11.20 + bitbucket.org/user/project/sub/directory v1.11.21 + launchpad.net/project v1.1.13 + launchpad.net/project/series v1.1.14 + launchpad.net/project/series/sub/directory v1.1.15 + launchpad.net/~user/project/branch v1.1.16 + launchpad.net/~user/project/branch/sub/directory v1.1.17 + hub.jazz.net/git/user/project v1.1.18 + hub.jazz.net/git/user/project/sub/directory v1.1.19 + k8s.io/kubernetes/subproject v1.1.101 + one.example.com/abitrary/repo v1.1.111 + two.example.com/abitrary/repo v0.0.2 + \"quoted.example.com/abitrary/repo\" v0.0.2 +) + +replace two.example.com/abitrary/repo =3D> github.com/corp/arbitrary-repo = v0.0.2 + +replace ( + golang.org/x/sys =3D> golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a= // pinned to release-branch.go1.13 + golang.org/x/tools =3D> golang.org/x/tools v0.0.0-20190821162956-65e3620a= 7ae7 // pinned to release-branch.go1.13 +) + +") + +(test-begin "import go") + +(test-equal "go-path-escape" + "github.com/!azure/!avere" + ((@@ (guix import go) go-path-escape) "github.com/Azure/Avere")) + + + +;; We define a function for all similar tests with different go.mod files +(define (testing-parse-mod name expected input) + (define (inf? p1 p2) + (string) id 1lHCyq-00008i-6l for submit@debbugs.gnu.org; Tue, 02 Mar 2021 16:55:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHCyo-00008U-Ai for 44178@debbugs.gnu.org; Tue, 02 Mar 2021 16:54:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49269) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHCyi-0000VG-9R; Tue, 02 Mar 2021 16:54:52 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60212 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lHCyh-0002SV-MG; Tue, 02 Mar 2021 16:54:52 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: bug#44178: Add a Go Module Importer References: <87sga5kpdp.fsf@gmail.com> <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> Date: Tue, 02 Mar 2021 22:54:49 +0100 In-Reply-To: <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> ("JOULAUD =?utf-8?Q?Fran=C3=A7ois=22's?= message of "Fri, 19 Feb 2021 16:21:03 +0000") Message-ID: <871rcxte52.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Hi, JOULAUD Fran=C3=A7ois skribis: > This patch add a `guix import go` command. > > It was tested with several big repositories and mostly works. Several > features are lacking (see TODO in source code) but we will do the > improvments step-by-step in future patches. > > * doc/guix.texi: doc about go importer and guile-lib dependency > * gnu/packages/package-management.scm: added guile-lib dependency > * guix/self.scm: add guile-lib dependency > * guix/build-system/go.scm: go-version->git-ref function > * guix/import/go.scm: Created Go importer > * guix/scripts/import/go.scm: Subcommand for Go importer > * guix/scripts/import.scm: Declare subcommand guix import go > * tests/import-go.scm: Tests for parse-go.mod procedure Nitpick: please mention the sections (for documentation) or variables changed (see ). Some comments below, mostly stylistic as I=E2=80=99m not familiar with the actual file formats etc. that the importer implements. > +@item > +@uref{https://www.nongnu.org/guile-lib/doc/ref/htmlprag/, guile-lib} for > +the @code{crate} importer (@pxref{Invoking guix import}). s/crate/go/ s/guile-lib/Guile-Lib/ > + (re (string-concatenate > + (list > + "(v?[0-9]\\.[0-9]\\.[0-9])" ; "v" prefix can be omitted i= n version prefix > + "(-|-pre\\.0\\.|-0\\.)" ; separator > + "([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]= [0-9][0-9][0-9])-" ; timestamp > + "([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]= [0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-= f])"))) ; commit hash You can use =E2=80=98string-append=E2=80=99 instead of (string-concatenate = (list =E2=80=A6)). Use [[:xdigit:]] instead of [0-9A-Fa-f] for clarity and locale-independence. Also, you can arrange to use =E2=80=98make-regexp=E2=80=99 so that the rege= xp is compiled once for all, and then just =E2=80=98regexp-exec=E2=80=99: (define %go-version-rx (make-regexp =E2=80=A6)) (define (go-version->git-ref version) (=E2=80=A6 (regexp-exec %go-version-rx =E2=80=A6) =E2=80=A6)) It=E2=80=99s not critical though. > + (define (replace-directive results line) > + "Extract replaced modules and new requirements from replace directive > + in LINE and add to RESULTS." > + ;; ReplaceSpec =3D ModulePath [ Version ] "=3D>" FilePath newline > + ;; | ModulePath [ Version ] "=3D>" ModulePath Version ne= wline . > + (let* ((requirements (car results)) > + (replaced (cdr results)) Please use =E2=80=98match=E2=80=99 instead of car/cdr (throughout): https://guix.gnu.org/manual/en/html_node/Coding-Style.html > + (re (string-concatenate > + '("([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?" > + "[[:blank:]]+" "=3D>" "[[:blank:]]+" > + "([^[:blank:]]+)([[:blank:]]+([^[:blank:]]+))?"))) > + (match (string-match re line)) As above, you should arrange to pre-compile the regexp. > + (module-path (match:substring match 1)) > + (version (match:substring match 3)) > + (new-module-path (match:substring match 4)) > + (new-version (match:substring match 6)) > + (new-replaced (acons module-path version replaced)) s/acons/alist-cons/ for consistency with the rest of the code. > + (re (string-concatenate > + '("^[[:blank:]]*" > + "([^[:blank:]]+)[[:blank:]]+([^[:blank:]]+)" > + "([[:blank:]]+//.*)?"))) > + (match (string-match re line)) Same as above. > + ;; TODO: handle module path with VCS qualifier as described in > + ;; https://golang.org/ref/mod#vcs-find and > + ;; https://golang.org/cmd/go/#hdr-Remote_import_paths > + (define-record-type > + (make-vcs url-prefix root-regex type) > + vcs? > + (url-prefix vcs-url-prefix) > + (root-regex vcs-root-regex) > + (type vcs-type)) You could rename =E2=80=98make-vcs=E2=80=99 above to =E2=80=98%make-vcs=E2= =80=99 and do: (define (make-vcs prefix regexp type) (%make-vcs prefix (make-regex regexp) type)) so that again you can rely on pre-compiled regexps. > + (let* ((known-vcs > + (list > + (make-vcs > + "github.com" > + "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-= z0-9_.\\-]+)*$" > + 'git) > + (make-vcs > + "bitbucket.org" > + "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[= A-Za-z0-9_.\\-]+)*$" > + 'unknown) > + (make-vcs > + "hub.jazz.net/git/" > + "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-= z0-9_.\\-]+)*$" > + 'git) > + (make-vcs > + "git.apache.org" > + "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-= ]+)*$" > + 'git) > + (make-vcs > + "git.openstack.org" > + "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+= )(\\.git)?(/[A-Za-z0-9_.\\-]+)*$" > + 'git))) > + (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs) m= odule-path)) > + known-vcs))) Keep =E2=80=98known-vcs=E2=80=99 in a global variable so it doesn=E2=80=99t= have to be recomputed every time. > + `(package > + (name ,guix-name) > + ;; Elide the "v" prefix Go uses > + (version ,(string-trim latest-version #\v)) > + (source > + ,(vcs->origin vcs-type vcs-repo-url latest-version temp)) > + (build-system go-build-system) > + (arguments > + '(#:import-path ,root-module-path)) > + ,@(maybe-inputs (map go-module->guix-package-name dependencie= s)) > + ;; TODO(katco): It would be nice to make an effort to fetch t= his > + ;; from known forges, e.g. GitHub > + (home-page ,(format #f "https://~a" root-module-path)) > + (synopsis "A Go package") ^ =E2=80=98guix lint=E2=80=99 wouldn=E2=80=99t like it. :-) Maybe "Write syn= opsis here" instead? > + (description ,(format #f "~a is a Go package." guix-name)) > + (license #f)) Is there no info about the license? > +++ b/guix/self.scm > @@ -814,6 +814,9 @@ itself." > (define guile-ssh > (specification->package "guile-ssh")) >=20=20 > + (define guile-lib > + (specification->package "guile-lib")) > + > (define guile-git > (specification->package "guile-git")) >=20=20 > @@ -842,7 +845,7 @@ itself." > (append-map transitive-package-dependencies > (list guile-gcrypt gnutls guile-git guile-avahi > guile-json guile-semver guile-ssh guile-sqlite3 > - guile-zlib guile-lzlib guile-zstd))) > + guile-lib guile-zlib guile-lzlib guile-zstd))) New dependency; it=E2=80=99s a bit of a commitment, but hopefully Guile-Lib= is stable enough and works on all the supported architectures. Please add guix/scripts/import/go.scm to =E2=80=98po/guix/POTFILES.in=E2=80= =99 so it can be translated. > +++ b/tests/import-go.scm Looks nice! It should be called =E2=80=98tests/go.scm=E2=80=99 for consist= ency, with: (test-begin "go") =E2=80=A6 (test-end "go") Would it be an option to also have an end-to-end test (checking the resulting =E2=80=98package=E2=80=99 sexp)? That=E2=80=99d be nice, but per= haps we can add it afterwards if you prefer. Let=E2=80=99s see how much of the comments above you can address for a v4, = and then we can get that in and improve it from there if needed! Thanks again, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 04 00:41:00 2021 Received: (at 44178) by debbugs.gnu.org; 4 Mar 2021 05:41:00 +0000 Received: from localhost ([127.0.0.1]:57455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHgjC-00079D-Ft for submit@debbugs.gnu.org; Thu, 04 Mar 2021 00:41:00 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:36006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHgj5-00078v-UR for 44178@debbugs.gnu.org; Thu, 04 Mar 2021 00:40:48 -0500 Received: by mail-qt1-f173.google.com with SMTP id 18so16943356qty.3 for <44178@debbugs.gnu.org>; Wed, 03 Mar 2021 21:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MMcQ57WI/a4F1HVzGgAaBLizDemEewK280fkj03Sq04=; b=ZSk5JNfzYg/2OxZZE4kcMuhhlhhQoumiBUZM0UdElxK9Ri91Sl7iNq6sInmLHLrxfe IcyKDJU/8zsNDKiSAYEg/KBNX2kjXLNbrX7KA8EBo29A4gYEhK/yAXNPwQsPmi/OyjUP hK1+Sy8/6HhQkLK+pk5Os2glhuXDSIjYRLbbWLr+VPZ5ZP8+m2AvBHJMA0se+Ay89iC2 /wBc5Qcb9XG2dYjbcKpNiekxU7O2LsQCBrYtJgKusTwxL1wuohB/jd29fkZRyzxY0ZnU wZFifil37wZhWLxt6oTPl3j72rpQWVmAtDbqQw7V71iI3FSDeHbn8EVnG87jF7G97365 I9LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MMcQ57WI/a4F1HVzGgAaBLizDemEewK280fkj03Sq04=; b=iPTWOXQgIOmepZClZa8UZGKpMiayFPSXPDKx48Nk+wIrB71KMaJF5/w5zIIvehU1CN NaiqpGi9F6VJJMN2I4KyvM0mOk5UI+6Dxre7DEOTb9JFvn/YZqb05AF/EPtgrktiiYWI AD2W1WeLl1e01bIneesCFhE/uIaz+79bFXOzsfKQkCX+Hp4iRziB3IBVaSEe6zjeHZV9 VmsKKjM9q51XfoQ8f4U/oo+5eMaaVUNtOKJcg11770tv/jq1x7Aqx/HxHNitCElp/KbC eCjdjfQZ6ejuIUxtUOztZbc+ISj1yOcdZxEj0qFjfgjHZm9bmnddAyR7AOmWXIufWouZ 34BQ== X-Gm-Message-State: AOAM530N8oGbGq5a28rQm4zSxHfZOB26gGZfdOBoTcYlH+hgGKWpPh2f NaiHU2xuZ6TutzTwDCFK2KA= X-Google-Smtp-Source: ABdhPJzU9+KGwspk61dek752ACqKLnWS60FVSCZud2xuh0Uzf5M/QYQjU6ZCJ+wbJbW83uirCootNQ== X-Received: by 2002:ac8:678c:: with SMTP id b12mr2698845qtp.160.1614836438421; Wed, 03 Mar 2021 21:40:38 -0800 (PST) Received: from hurd (dsl-205-236-230-76.b2b2c.ca. [205.236.230.76]) by smtp.gmail.com with ESMTPSA id h6sm2841714qtj.75.2021.03.03.21.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 21:40:37 -0800 (PST) From: Maxim Cournoyer To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: [PATCH v4] Re: bug#44178: Add a Go Module Importer References: <87sga5kpdp.fsf@gmail.com> <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> <871rcxte52.fsf_-_@gnu.org> Date: Thu, 04 Mar 2021 00:40:36 -0500 In-Reply-To: <871rcxte52.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 02 Mar 2021 22:54:49 +0100") Message-ID: <8735xbqxwr.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 44178 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Fran=C3=A7ois, Ludovic, et al! Sorry for bumping in the review, but I have been experimenting with this importer, and it looks promising; thanks for everyone involved! I made a couple changes, mostly with regard to integrating support for the synopsis, description and license field of the package, plus other cosmetic changes. I thought I should share it quickly so that it can be used as the basis for a v5, so here's the patch, attached. I hope you don't mind! I tested it with: $ ./pre-inst-env guix environment guix $ ./pre-inst-env guix import go -r github.com/dgraph-io/badger/v2 --8<---------------cut here---------------start------------->8--- [...] (define-public go-github-com-dgraph-io-badger-v2 (package (name "go-github-com-dgraph-io-badger-v2") (version "2.2007.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/dgraph-io/badger.git") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "0000000000000000000000000000000000000000000000000000")))) (build-system go-build-system) (arguments '(#:import-path "github.com/dgraph-io/badger")) (inputs `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1) ("go-golang-org-x-sys" ,go-golang-org-x-sys) ("go-golang-org-x-net" ,go-golang-org-x-net) ("go-github-com-stretchr-testify" ,go-github-com-stretchr-testify) ("go-github-com-spf13-cobra" ,go-github-com-spf13-cobra) ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3) ("go-github-com-pkg-errors" ,go-github-com-pkg-errors) ("go-github-com-kr-pretty" ,go-github-com-kr-pretty) ("go-github-com-golang-snappy" ,go-github-com-golang-snappy) ("go-github-com-golang-protobuf" ,go-github-com-golang-protobuf) ("go-github-com-dustin-go-humanize" ,go-github-com-dustin-go-humanize) ("go-github-com-dgryski-go-farm" ,go-github-com-dgryski-go-farm) ("go-github-com-dgraph-io-ristretto" ,go-github-com-dgraph-io-ristretto) ("go-github-com-cespare-xxhash" ,go-github-com-cespare-xxhash) ("go-github-com-datadog-zstd" ,go-github-com-datadog-zstd))) (home-page "https://github.com/dgraph-io/badger") (synopsis "BadgerDB") (description "Package badger implements an embeddable, simple and fast key-value d= atabase, written in pure Go. It is designed to be highly performant for bot= h reads and writes simultaneously. Badger uses Multi-Version Concurrency Co= ntrol (MVCC), and supports transactions. It runs transactions concurrently,= with serializable snapshot isolation guarantees.") (license (license:asl2.0)))) --8<---------------cut here---------------end--------------->8--- Attached is the fixup commit which should apply cleanly on top of your v3 patch on master, along a (now required) commit to use a temporary fork of guile-lib: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-guile-lib-Update-to-a-temporary-fork.patch Content-Transfer-Encoding: quoted-printable >From 16c07537375ab5d18ee76a5fdfb2b8ed7192b395 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 3 Mar 2021 16:20:22 -0500 Subject: [PATCH] gnu: guile-lib: Update to a temporary fork. This fork add support to enable stricter/more correct parsing of HTML in htmlprag, which is used by the go importer. * gnu/packages/guile-xyz.scm (guile-lib)[source]: Fetch from git. Remove snippet and modules field. [native-inputs]: Add autoconf, automake, gettext and texinfo. --- gnu/packages/guile-xyz.scm | 96 ++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 50 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index ce5aad8ec7..c14193921b 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -16,7 +16,7 @@ ;;; Copyright =C2=A9 2017 Theodoros Foradis ;;; Copyright =C2=A9 2017 Nikita ;;; Copyright =C2=A9 2017, 2018 Tobias Geerinckx-Rice -;;; Copyright =C2=A9 2018 Maxim Cournoyer +;;; Copyright =C2=A9 2018, 2021 Maxim Cournoyer ;;; Copyright =C2=A9 2018, 2019, 2020 Arun Isaac ;;; Copyright =C2=A9 2018 Pierre-Antoine Rouby ;;; Copyright =C2=A9 2018 Eric Bavier @@ -2167,59 +2167,55 @@ library.") ("guile" ,guile-3.0))))) =20 (define-public guile-lib - (package - (name "guile-lib") - (version "0.2.6.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://savannah/guile-lib/guile-lib-" - version ".tar.gz")) - (sha256 - (base32 - "0aizxdif5dpch9cvs8zz5g8ds5s4xhfnwza2il5ji7fv2h7ks7bd")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Work around miscompilation on Guile 3.0.0 at -O2: - ;; . - (substitute* "src/md5.scm" - (("\\(define f-ash ash\\)") - "(define f-ash (@ (guile) ash))\n") - (("\\(define f-add \\+\\)") - "(define f-add (@ (guile) +))\n")) - #t)))) - (build-system gnu-build-system) - (arguments - '(#:make-flags - '("GUILE_AUTO_COMPILE=3D0") ; to prevent guild errors - #:phases - (modify-phases %standard-phases - (add-before 'configure 'patch-module-dir - (lambda _ - (substitute* "src/Makefile.in" - (("^moddir =3D ([[:graph:]]+)") - "moddir =3D $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION= @\n") - (("^godir =3D ([[:graph:]]+)") - "godir =3D \ -$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) - #t))))) - (native-inputs - `(("guile" ,guile-3.0) - ("pkg-config" ,pkg-config))) - (inputs - `(("guile" ,guile-3.0))) - (home-page "https://www.nongnu.org/guile-lib/") - (synopsis "Collection of useful Guile Scheme modules") - (description - "Guile-Lib is intended as an accumulation place for pure-scheme Guile + (let ((revision "1") + (commit "c059f13e332347201eaa4a32ef27c53d064f2d17")) + (package + (name "guile-lib") + (version (git-version "0.2.6.1" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://notabug.org/apteryx/guile-lib/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1dl2f53p737n637n2805slci5i32s6cy0bq1j0xkmzd5piymg4f8"))= )) + (build-system gnu-build-system) + (arguments + '(#:make-flags + '("GUILE_AUTO_COMPILE=3D0") ;to prevent guild errors + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-module-dir + (lambda _ + (substitute* "src/Makefile.in" + (("^moddir =3D ([[:graph:]]+)") + "moddir =3D $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSI= ON@\n") + (("^godir =3D ([[:graph:]]+)") + "godir =3D \ +$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gettext" ,gettext-minimal) + ("guile" ,guile-3.0) + ("pkg-config" ,pkg-config) + ("texinfo" ,texinfo))) + (inputs + `(("guile" ,guile-3.0))) + (home-page "https://www.nongnu.org/guile-lib/") + (synopsis "Collection of useful Guile Scheme modules") + (description + "Guile-Lib is intended as an accumulation place for pure-scheme Gui= le modules, allowing for people to cooperate integrating their generic Guile modules into a coherent library. Think \"a down-scaled, limited-scope CPAN for Guile\".") =20 - ;; The whole is under GPLv3+, but some modules are under laxer - ;; distribution terms such as LGPL and public domain. See `COPYING' f= or - ;; details. - (license license:gpl3+))) + ;; The whole is under GPLv3+, but some modules are under laxer + ;; distribution terms such as LGPL and public domain. See `COPYING'= for + ;; details. + (license license:gpl3+)))) =20 (define-public guile2.0-lib (package --=20 2.30.1 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0002-fixup-Create-importer-for-Go-modules.patch Content-Transfer-Encoding: quoted-printable >From f3a6130577252e3d079a6209ec2e21bf5d8baf25 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 3 Mar 2021 16:45:11 -0500 Subject: [PATCH] fixup! Create importer for Go modules --- guix/build-system/go.scm | 34 ++-- guix/import/go.scm | 420 ++++++++++++++++++++++----------------- 2 files changed, 257 insertions(+), 197 deletions(-) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 594e0cb4f3..d07c703a6a 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -34,30 +34,28 @@ go-version->git-ref)) =20 (define (go-version->git-ref version) - "GO-VERSION->GIT-REF parse pseudo-versions and extract the commit - hash from it, defaulting to full VERSION if we don't recognise a - pseudo-version pattern." - ;; A module version like v1.2.3 is introduced by tagging a revision in - ;; the underlying source repository. Untagged revisions can be referred - ;; to using a "pseudo-version" like v0.0.0-yyyymmddhhmmss-abcdefabcdef, - ;; where the time is the commit time in UTC and the final suffix is the - ;; prefix of the commit hash. - ;; cf. https://golang.org/cmd/go/#hdr-Pseudo_versions + "GO-VERSION->GIT-REF parse pseudo-versions and extract the commit hash f= rom +it, defaulting to full VERSION if a pseudo-version pattern is not recogniz= ed." + ;; A module version like v1.2.3 is introduced by tagging a revision in t= he + ;; underlying source repository. Untagged revisions can be referred to + ;; using a "pseudo-version" like v0.0.0-yyyymmddhhmmss-abcdefabcdef, whe= re + ;; the time is the commit time in UTC and the final suffix is the prefix= of + ;; the commit hash (see: https://golang.org/cmd/go/#hdr-Pseudo_versions). (let* ((version - ;; if a source code repository has a v2.0.0 or later tag for - ;; a file tree with no go.mod, the version is considered to be - ;; part of the v1 module's available versions and is given an - ;; +incompatible suffix - ;; https://golang.org/cmd/go/#hdr-Module_compatibility_and_seman= tic_versioning + ;; If a source code repository has a v2.0.0 or later tag for a f= ile + ;; tree with no go.mod, the version is considered to be part of = the + ;; v1 module's available versions and is given an +incompatible + ;; suffix + ;; (see:https://golang.org/cmd/go/#hdr-Module_compatibility_and_= semantic_versioning). (if (string-suffix? "+incompatible" version) (string-drop-right version 13) version)) (re (string-concatenate (list - "(v?[0-9]\\.[0-9]\\.[0-9])" ; "v" prefix can be omitted in = version prefix - "(-|-pre\\.0\\.|-0\\.)" ; separator - "([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0= -9][0-9][0-9])-" ; timestamp - "([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0= -9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]= )"))) ; commit hash + "(v?[0-9]\\.[0-9]\\.[0-9])" ;"v" prefix can be omitted in v= ersion prefix + "(-|-pre\\.0\\.|-0\\.)" ;separator + "([0-9]{14})-" ;timestamp + "([0-9A-Fa-f]{12})"))) ;commit hash (match (string-match re version))) (if match (match:substring match 4) diff --git a/guix/import/go.scm b/guix/import/go.scm index fead355bd2..7bc97c5c92 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2020 Katherine Cox-Buday ;;; Copyright =C2=A9 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> ;;; Copyright =C2=A9 2021 Fran=C3=A7ois Joulaud +;;; Copyright =C2=A9 2021 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,51 +19,37 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . =20 -;;; (guix import golang) wants to make easier to create Guix package -;;; declaration for Go modules. +;;; (guix import golang) attempts to make it easier to create Guix package +;;; declarations for Go modules. ;;; -;;; Modules in Go are "collection of related Go packages" which are -;;; "the unit of source code interchange and versioning". -;;; Modules are generally hosted in a repository. +;;; Modules in Go are a "collection of related Go packages" which are "the +;;; unit of source code interchange and versioning". Modules are generally +;;; hosted in a repository. ;;; -;;; At this point it should handle correctly modules which -;;; have only Go dependencies and are accessible from proxy.golang.org -;;; (or configured GOPROXY). +;;; At this point it should handle correctly modules which have only Go +;;; dependencies and are accessible from proxy.golang.org (or configured v= ia +;;; GOPROXY). ;;; ;;; We want it to work more or less this way: ;;; - get latest version for the module from GOPROXY ;;; - infer VCS root repo from which we will check-out source by ;;; + recognising known patterns (like github.com) -;;; + or (TODO) recognising .vcs suffix -;;; + or parsing meta tag in html served at the URL +;;; + or recognizing .vcs suffix +;;; + or parsing meta tag in HTML served at the URL ;;; + or (TODO) if nothing else works by using zip file served by GOPROXY ;;; - get go.mod from GOPROXY (which is able to synthetize one if needed) ;;; - extract list of dependencies from this go.mod ;;; -;;; We translate Go module paths to a Guix package name under the +;;; The Go module paths are translated to a Guix package name under the ;;; assumption that there will be no collision. =20 ;;; TODO list ;;; - get correct hash in vcs->origin ;;; - print partial result during recursive imports (need to catch ;;; exceptions) -;;; - infer repo from module path with VCS qualifier -;;; (e.g. site.example/my/path/to/repo.git/and/subdir/module) -;;; - don't print fetch messages to stdout -;;; - pre-fill synopsis, description and license =20 (define-module (guix import go) - #:use-module (ice-9 match) - #:use-module (ice-9 rdelim) - #:use-module (ice-9 receive) - #:use-module (ice-9 regex) #:use-module (guix build-system go) - #:use-module (htmlprag) - #:use-module (sxml xpath) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-9) - #:use-module (srfi srfi-11) - #:use-module (json) #:use-module ((guix download) #:prefix download:) #:use-module (guix git) #:use-module (guix import utils) @@ -75,49 +62,134 @@ #:use-module (guix base32) #:use-module (guix memoization) #:use-module ((guix build download) #:prefix build-download:) + #:use-module (htmlprag) + #:use-module (ice-9 match) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 receive) + #:use-module (ice-9 regex) + #:use-module (json) + #:use-module (rnrs io ports) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-26) + #:use-module (sxml xpath) + #:use-module (web client) + #:use-module (web response) #:use-module (web uri) =20 #:export (go-module->guix-package - go-module-recursive-import - infer-module-root-repo)) + go-module-recursive-import)) =20 +;;; Parameterize htmlprag to parse valid HTML more reliably. +(%strict-tokenizer? #t) =20 (define (go-path-escape path) - "Escape a module path by replacing every uppercase letter with an exclam= ation -mark followed with its lowercase equivalent, as per the module Escaped Pat= hs -specification. https://godoc.org/golang.org/x/mod/module#hdr-Escaped_Paths" + "Escape a module path by replacing every uppercase letter with an +exclamation mark followed with its lowercase equivalent, as per the module +Escaped Paths specification (see: +https://godoc.org/golang.org/x/mod/module#hdr-Escaped_Paths)." (define (escape occurrence) (string-append "!" (string-downcase (match:substring occurrence)))) (regexp-substitute/global #f "[A-Z]" path 'pre escape 'post)) =20 - (define (go-module-latest-version goproxy-url module-path) - "Fetches the version number of the latest version for MODULE-PATH from t= he + "Fetch the version number of the latest version for MODULE-PATH from the given GOPROXY-URL server." - (assoc-ref - (json-fetch (format #f "~a/~a/@latest" goproxy-url - (go-path-escape module-path))) - "Version")) + (assoc-ref (json-fetch (format #f "~a/~a/@latest" goproxy-url + (go-path-escape module-path))) + "Version")) + +(define (go-package-licenses name) + "Retrieve the list of licenses that apply to NAME, a Go package or module +name (e.g. \"github.com/golang/protobuf/proto\"). The data is scraped from +the https://pkg.go.dev/ web site." + (let*-values (((url) (string-append "https://pkg.go.dev/" name + "?tab=3Dlicenses")) + ((response body) (http-get url)) + ;; Extract the text contained in a h2 child node of any + ;; element marked with a "License" class attribute. + ((select) (sxpath `(// (* (@ (equal? (class "License")))) + h2 // *text*)))) + (and (eq? (response-code response) 200) + (match (select (html->sxml body)) + (() #f) ;nothing selected + (licenses licenses))))) + +(define (go-package-description name) + "Retrieve a short description for NAME, a Go package name, +e.g. \"google.golang.org/protobuf/proto\". The data is scraped from the +https://pkg.go.dev/ web site." + (let*-values (((url) (string-append "https://pkg.go.dev/" name)) + ((response body) (http-get url)) + ;; Extract the text contained in a h2 child node of any + ;; element marked with a "License" class attribute. + ((select) (sxpath + `(// (section + (@ (equal? (class "Documentation-overview= ")))) + (p 1))))) + (and (eq? (response-code response) 200) + (match (select (html->sxml body)) + (() #f) ;nothing selected + (((p . strings)) + ;; The paragraph text is returned as a list of strings embeddi= ng + ;; newline characters. Join them and strip the newline + ;; characters. + (string-delete #\newline (string-join strings))))))) + +(define (go-package-synopsis module-name) + "Retrieve a short synopsis for a Go module named MODULE-NAME, +e.g. \"google.golang.org/protobuf\". The data is scraped from +the https://pkg.go.dev/ web site." + ;; Note: Only the *module* (rather than package) page has the README tit= le + ;; used as a synopsis on the https://pkg.go.dev web site. + (let*-values (((url) (string-append "https://pkg.go.dev/" module-name)) + ((response body) (http-get url)) + ;; Extract the text contained in a h2 child node of any + ;; element marked with a "License" class attribute. + ((select) (sxpath + `(// (div (@ (equal? (class "UnitReadme-content= ")))) + // h3 *text*)))) + (and (eq? (response-code response) 200) + (match (select (html->sxml body)) + (() #f) ;nothing selected + ((title more ...) ;title is the first string of the = list + (string-trim-both title)))))) =20 -(define go-module-latest-version* (memoize go-module-latest-version)) +(define (list->licenses licenses) + "Given a list of LICENSES mostly following the SPDX conventions, return = the +corresponding Guix license or 'unknown-license!" + (filter-map (lambda (license) + (and (not (string-null? license)) + (not (any (cut string=3D? <> license) + '("AND" "OR" "WITH"))) + ;; Adjust the license names scraped from + ;; https://pkg.go.dev to an equivalent SPDX identifie= r, + ;; if they differ (see: https://github.com/golang/pkg= site + ;; /internal/licenses/licenses.go#L174). + (or (spdx-string->license + (match license + ("BlueOak-1.0" "BlueOak-1.0.0") + ("BSD-0-Clause" "0BSD") + ("BSD-2-Clause" "BSD-2-Clause-FreeBSD") + ("GPL2" "GPL-2.0") + ("GPL3" "GPL-3.0") + ("NIST" "NIST-PD") + (_ license))) + 'unknown-license!))) + licenses)) =20 -(define (fetch-go.mod goproxy-url module-path version file) - "Fetches go.mod from the given GOPROXY-URL server for the given MODULE-P= ATH -and VERSION." +(define (fetch-go.mod goproxy-url module-path version) + "Fetch go.mod from the given GOPROXY-URL server for the given MODULE-PATH +and VERSION and return an input port." (let ((url (format #f "~a/~a/@v/~a.mod" goproxy-url (go-path-escape module-path) (go-path-escape version)))) - (parameterize ((current-output-port (current-error-port))) - (build-download:url-fetch url - file - #:print-build-trace? #f)))) + (build-download:http-fetch (string->uri url)))) =20 -(define (parse-go.mod go.mod-path) - (parse-go.mod-port (open-input-file go.mod-path))) - -(define (parse-go.mod-port go.mod-port) - "PARSE-GO.MOD takes a filename in GO.MOD-PATH and extract a list of -requirements from it." +(define (parse-go.mod port) + "Parse the go.mod file accessible via the input PORT, returning a list of +requirements." ;; We parse only a subset of https://golang.org/ref/mod#go-mod-file-gram= mar ;; which we think necessary for our use case. (define (toplevel results) @@ -147,6 +219,7 @@ requirements from it." (#t ;; unrecognised line, ignore silently (toplevel results))))) + (define (in-require results) (let ((line (read-line))) (cond @@ -158,6 +231,7 @@ requirements from it." (toplevel results)) (#t (in-require (require-directive results line)))))) + (define (in-replace results) (let ((line (read-line))) (cond @@ -169,6 +243,7 @@ requirements from it." (toplevel results)) (#t (in-replace (replace-directive results line)))))) + (define (replace-directive results line) "Extract replaced modules and new requirements from replace directive in LINE and add to RESULTS." @@ -191,6 +266,7 @@ requirements from it." requirements (acons new-module-path new-version requirements)))) (cons new-requirements new-replaced))) + (define (require-directive results line) "Extract requirement from LINE and add it to RESULTS." (let* ((requirements (car results)) @@ -209,7 +285,8 @@ requirements from it." (module-path (string-trim-both module-path #\")) (version (match:substring match 2))) (cons (acons module-path version requirements) replaced))) - (with-input-from-port go.mod-port + + (with-input-from-port port (lambda () (let* ((results (toplevel '(() . ()))) (requirements (car results)) @@ -221,120 +298,102 @@ requirements from it." requirements replaced))))) =20 -(define (infer-module-root-repo module-path) - "Go modules can be defined at any level of a repository's tree, but quer= ying -for the meta tag usually can only be done at the webpage at the root of the -repository. Therefore, it is sometimes necessary to try and derive a modul= e's -root path from its path. For a set of well-known forges, the pattern of wh= at -consists of a module's root page is known before hand." +(define (module-path->repository-root module-path) + "Infer the repository root from a module path. Go modules can be +defined at any level of a repository tree, but querying for the meta tag +usually can only be done from the web page at the root of the repository, +hence the need to derive this information." ;; See the following URL for the official Go equivalent: ;; https://github.com/golang/go/blob/846dce9d05f19a1f53465e62a304dea21b9= 9f910/src/cmd/go/internal/vcs/vcs.go#L1026-L1087 - ;; - ;; TODO: handle module path with VCS qualifier as described in - ;; https://golang.org/ref/mod#vcs-find and - ;; https://golang.org/cmd/go/#hdr-Remote_import_paths + (define-record-type (make-vcs url-prefix root-regex type) vcs? (url-prefix vcs-url-prefix) (root-regex vcs-root-regex) (type vcs-type)) - (let* ((known-vcs - (list - (make-vcs - "github.com" - "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" - 'git) - (make-vcs - "bitbucket.org" - "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[A-= Za-z0-9_.\\-]+)*$" - 'unknown) - (make-vcs - "hub.jazz.net/git/" - "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0= -9_.\\-]+)*$" - 'git) - (make-vcs - "git.apache.org" - "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-]+= )*$" - 'git) - (make-vcs - "git.openstack.org" - "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(= \\.git)?(/[A-Za-z0-9_.\\-]+)*$" - 'git))) - (vcs (find (lambda (vcs) (string-prefix? (vcs-url-prefix vcs) mod= ule-path)) - known-vcs))) - (if vcs - (match:substring (string-match (vcs-root-regex vcs) module-path) 1) - module-path))) + + (define known-vcs + (list + (make-vcs + "github.com" + "^(github\\.com/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0-9_.\\= -]+)*$" + 'git) + (make-vcs + "bitbucket.org" + "^(bitbucket\\.org/([A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+))(/[A-Za-z0-= 9_.\\-]+)*$" + 'unknown) + (make-vcs + "hub.jazz.net/git/" + "^(hub\\.jazz\\.net/git/[a-z0-9]+/[A-Za-z0-9_.\\-]+)(/[A-Za-z0-9_.\\= -]+)*$" + 'git) + (make-vcs + "git.apache.org" + "^(git\\.apache\\.org/[a-z0-9_.\\-]+\\.git)(/[A-Za-z0-9_.\\-]+)*$" + 'git) + (make-vcs + "git.openstack.org" + "^(git\\.openstack\\.org/[A-Za-z0-9_.\\-]+/[A-Za-z0-9_.\\-]+)(\\.git= )?\ +(/[A-Za-z0-9_.\\-]+)*$" + 'git))) + + ;; For reference, see: https://golang.org/ref/mod#vcs-find. + (define vcs-qualifiers '(".bzr" ".fossil" ".git" ".hg" ".svn")) + + (define (vcs-qualified-module-path->root-repo-url module-path) + (let* ((vcs-qualifiers-group (string-join vcs-qualifiers "|")) + (pattern (format #f "^(.*(~a))(/|$)" vcs-qualifiers-group)) + (m (string-match pattern module-path))) + (and=3D> m (cut match:substring <> 1)))) + + (or (and=3D> (find (lambda (vcs) + (string-prefix? (vcs-url-prefix vcs) module-path)) + known-vcs) + (lambda (vcs) + (match:substring (string-match (vcs-root-regex vcs) + module-path) 1))) + (vcs-qualified-module-path->root-repo-url module-path) + module-path)) =20 (define (go-module->guix-package-name module-path) "Converts a module's path to the canonical Guix format for Go packages." - (string-downcase - (string-append "go-" - (string-replace-substring - (string-replace-substring - module-path - "." "-") - "/" "-")))) + (string-downcase (string-append "go-" (string-replace-substring + (string-replace-substring + module-path + "." "-") + "/" "-")))) =20 (define-record-type (make-module-meta import-prefix vcs repo-root) module-meta? (import-prefix module-meta-import-prefix) - ;; VCS field is a symbol - (vcs module-meta-vcs) + (vcs module-meta-vcs) ;a symbol (repo-root module-meta-repo-root)) =20 (define (fetch-module-meta-data module-path) - "Fetches module meta-data from a module's landing page. This is - necessary because goproxy servers don't currently provide all the - information needed to build a package." + "Retrieve the module meta-data from its landing page. This is necessary +because goproxy servers don't currently provide all the information needed= to +build a package." ;; - (define (meta-go-import->module-meta text) - "Takes the content of the go-import meta tag as TEXT and gives back - a MODULE-META record" - (define (get-component s start) - (let* - ((start (string-skip s char-set:whitespace start)) - (end (string-index s char-set:whitespace start)) - (end (if end end (string-length s))) - (result (substring s start end))) - (values result end))) - (let*-values (((import-prefix end) (get-component text 0)) - ((vcs end) (get-component text end)) - ((repo-root end) (get-component text end))) - (make-module-meta import-prefix (string->symbol vcs) repo-root))) - (define (html->meta-go-import port) - "Read PORT with HTML content. Find the go-import meta tag and gives - back its content as a string." - (let* ((parsedhtml (html->sxml port)) - (extract-content (node-join - (select-kids (node-typeof? 'html)) - (select-kids (node-typeof? 'head)) - (select-kids (node-typeof? 'meta)) - (select-kids (node-typeof? '@)) - (node-self - (node-join - (select-kids (node-typeof? 'name)) - (select-kids (node-equal? "go-import")))) - (select-kids (node-typeof? 'content)) - (select-kids (lambda (_) #t)))) - (content (car (extract-content parsedhtml)))) - content)) - (let* ((port (build-download:http-fetch (string->uri (format #f "https:/= /~a?go-get=3D1" module-path)))) - (meta-go-import (html->meta-go-import port)) - (module-metadata (meta-go-import->module-meta meta-go-import))) - (close-port port) - module-metadata)) + (let* ((port (build-download:http-fetch + (string->uri (format #f "https://~a?go-get=3D1" module-pat= h)))) + (select (sxpath `(// head (meta (@ (equal? (name "go-import")))) + // content)))) + (match (select (call-with-port port html->sxml)) + (() #f) ;nothing selected + (((content content-text)) + (match (string-split content-text #\space) + ((root-path vcs repo-url) + (make-module-meta root-path (string->symbol vcs) repo-url))))))) =20 (define (module-meta-data-repo-url meta-data goproxy-url) - "Return the URL where the fetcher which will be used can download the so= urce -control." - (if (member (module-meta-vcs meta-data)'(fossil mod)) + "Return the URL where the fetcher which will be used can download the +source." + (if (member (module-meta-vcs meta-data) '(fossil mod)) goproxy-url (module-meta-repo-root meta-data))) =20 -(define (vcs->origin vcs-type vcs-repo-url version file) +(define (vcs->origin vcs-type vcs-repo-url version) "Generate the `origin' block of a package depending on what type of sour= ce control system is being used." (case vcs-type @@ -347,61 +406,64 @@ control system is being used." (file-name (git-file-name name version)) (sha256 (base32 - ;; FIXME: get hash for git repo checkout - "0000000000000000000000000000000000000000000000000000")))) + ;; FIXME: populate hash for git repo checkout + "0000000000000000000000000000000000000000000000000000")))) ((hg) `(origin (method hg-fetch) (uri (hg-reference (url ,vcs-repo-url) (changeset ,version))) - (file-name (format #f "~a-~a-checkout" name version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + ;; FIXME: populate hash for hg repo checkout + "0000000000000000000000000000000000000000000000000000")))) ((svn) `(origin (method svn-fetch) (uri (svn-reference (url ,vcs-repo-url) - (revision (string->number version)) - (recursive? #f))) - (file-name (format #f "~a-~a-checkout" name version)) + (revision (string->number version)))) + (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - ,(guix-hash-url file))))) + ;; FIXME: populate hash for svn repo checkout + "0000000000000000000000000000000000000000000000000000")))) (else (raise-exception (format #f "unsupported vcs type: ~a" vcs-type))))) =20 -(define* (go-module->guix-package module-path #:key (goproxy-url "https://= proxy.golang.org")) - (call-with-temporary-output-file - (lambda (temp port) - (let* ((latest-version (go-module-latest-version* goproxy-url module-= path)) - (go.mod-path (fetch-go.mod goproxy-url module-path latest-vers= ion - temp)) - (dependencies (map car (parse-go.mod temp))) - (guix-name (go-module->guix-package-name module-path)) - (root-module-path (infer-module-root-repo module-path)) - ;; VCS type and URL are not included in goproxy information. F= or - ;; this we need to fetch it from the official module page. - (meta-data (fetch-module-meta-data root-module-path)) - (vcs-type (module-meta-vcs meta-data)) - (vcs-repo-url (module-meta-data-repo-url meta-data goproxy-url= ))) - (values - `(package - (name ,guix-name) - ;; Elide the "v" prefix Go uses - (version ,(string-trim latest-version #\v)) - (source - ,(vcs->origin vcs-type vcs-repo-url latest-version temp)) - (build-system go-build-system) - (arguments - '(#:import-path ,root-module-path)) - ,@(maybe-inputs (map go-module->guix-package-name dependencies)) - ;; TODO(katco): It would be nice to make an effort to fetch this - ;; from known forges, e.g. GitHub - (home-page ,(format #f "https://~a" root-module-path)) - (synopsis "A Go package") - (description ,(format #f "~a is a Go package." guix-name)) - (license #f)) - dependencies))))) +(define* (go-module->guix-package module-path #:key + (goproxy-url "https://proxy.golang.org")) + (let* ((latest-version (go-module-latest-version goproxy-url module-path= )) + (port (fetch-go.mod goproxy-url module-path latest-version)) + (dependencies (map car (call-with-port port parse-go.mod))) + (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 + ;; this we need to fetch it from the official module page. + (meta-data (fetch-module-meta-data root-module-path)) + (vcs-type (module-meta-vcs meta-data)) + (vcs-repo-url (module-meta-data-repo-url meta-data goproxy-url)) + (synopsis (go-package-synopsis root-module-path)) + (description (go-package-description module-path)) + (licenses (go-package-licenses module-path))) + (values + `(package + (name ,guix-name) + ;; Elide the "v" prefix Go uses + (version ,(string-trim latest-version #\v)) + (source + ,(vcs->origin vcs-type vcs-repo-url latest-version)) + (build-system go-build-system) + (arguments + '(#:import-path ,root-module-path)) + ,@(maybe-inputs (map go-module->guix-package-name dependencies)) + (home-page ,(format #f "https://~a" root-module-path)) + (synopsis ,synopsis) + (description ,description) + (license ,(and=3D> licenses list->licenses))) + dependencies))) =20 (define go-module->guix-package* (memoize go-module->guix-package)) =20 --=20 2.30.1 --=-=-= Content-Type: text/plain I hope I'm not making things more difficult for you! Thank you for working on it! :-) Maxim --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 04 09:14:11 2021 Received: (at 44178) by debbugs.gnu.org; 4 Mar 2021 14:14:11 +0000 Received: from localhost ([127.0.0.1]:58205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHojy-0005ky-WF for submit@debbugs.gnu.org; Thu, 04 Mar 2021 09:14:11 -0500 Received: from mx07-00115501.pphosted.com ([185.132.182.48]:50382 helo=mx08-00115501.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHoju-0005kg-Eq for 44178@debbugs.gnu.org; Thu, 04 Mar 2021 09:14:09 -0500 Received: from pps.filterd (m0001505.ppops.net [127.0.0.1]) by mx07-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 124E5HDn028296; Thu, 4 Mar 2021 15:14:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=radiofrance20190306; bh=49eEG3dDvcYJH86qqRsxvCql+peko44hOslbwgeehnk=; b=OZRKc2Eg+kk5S50L71dZBlyHwyV25DmaaQdhjYgPSZIyhM2mszr7My4sno86hg+YIOAY M1NYEJ7Ts8yE41KW0q0unPOOnHm6BLLGtnatJGE0URM4PfcVXtF6EUt5Wu/yB9h0LySO hEjFsxekfeF4kji/SgMJYCWQ8ZNsLhXcsJi+Dcj8EJ3cpbOeZBUKQWrEwCr+yp9pNxD6 +vV2APaREi+DkbbLx6OSsK3+TKME6Xy69YwQkLP/krNRZo5O97iMpavVrh/O8jcyJiWQ Oa75tHRTyFlgxQbd6alczRS/rg3SybCBZ7Ml63W2ObDBSCGmrFBtIpZ5chx5IafSRALa VA== Received: from fra01-pr2-obe.outbound.protection.outlook.com (mail-pr2fra01on0107.outbound.protection.outlook.com [104.47.24.107]) by mx07-00115501.pphosted.com with ESMTP id 370ut1xj4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Mar 2021 15:14:04 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=anAcRfDMWsqBuX/WISeQqu5THDmvupss0w5XUnchAzNu6du7FAOhHnRgVZz9JH+zCHhwOPIE/1q2FPfHd24FcWpPO2ZuIQdS4E6l2H7wLH7WrhCZZ/gcsaCardhWAezwTgdGUE9hpHnU8YyHrmxUXX9Xja/ivD1XZ1m9iZE6mtyGNfwvmsFgOh7EbgCIqiK7OTwNKs60D0XbJPVeqkya3NN3PM/FGTI1M1RzuJsKbl06ZFDTwswSzf6XD4qaUQBa9m1F9ECFyd0Qx1Sv9cb+KE0ORsqejHqFSFWhKaV3sC4z5fwOyFU4e6B4jF7fHitL8WuMOFPmPa8YcRmCsbOTKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=49eEG3dDvcYJH86qqRsxvCql+peko44hOslbwgeehnk=; b=gmxrvsCVgkRR8RxiVQaU5bzMYuUMvdVu6GER7FbeElPpAA3+z6tmha34DknluOjneqPghGalyDxbL30z3g9aRr5KzMTmDatGxOou/Pj0o6xcAwQxdeRYxwjbwzUC8FEHB+sUfKMnfFGwPUfysfSavFZTTKWDVUEFOxBL66BM1rRtsd+0eZcNbvCdfM+Z6yhRdfHXKiN8/WYW2ghW5SigZxDQre0K/ZgNR32NT1Kfiz9EqeQ4zYlYcLxHGz/z0PCgsQk4jBtfWbI8XgsuEaC98kmAUetWepw1gM6Kx7rTqT8Eh62ObC1oEbxaZNJ6BqJF7S7S9IhWKuvUGQ7lNvenOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=49eEG3dDvcYJH86qqRsxvCql+peko44hOslbwgeehnk=; b=qZv3uHoAaywQGE+h07piAKExCKlc7J5WDN1XCJriHyIhdFXc1ZdLILkTBtifsbTu3BqbSW8b6W0FklYiqv/doY/qvDjwlZ+9cLh1dPhM82YCMGNyC/rU27PMeYK5fdtGp6Ddei2p58ZUV9WvMnoBCO/IbYJ6DOmqvyReq6Q3ouY= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR0P264MB1740.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:16b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.2; Thu, 4 Mar 2021 14:14:03 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::51bc:289d:ff1a:6b58%6]) with mapi id 15.20.3868.039; Thu, 4 Mar 2021 14:14:03 +0000 From: =?iso-8859-1?Q?JOULAUD_Fran=E7ois?= To: Maxim Cournoyer Subject: Re: [PATCH v4] Re: bug#44178: Add a Go Module Importer Thread-Topic: [PATCH v4] Re: bug#44178: Add a Go Module Importer Thread-Index: AQHXD66weZSAFcbITUaPqm2Q+cGaDqpzUnpogABj3QA= Date: Thu, 4 Mar 2021 14:14:02 +0000 Message-ID: <20210304113606.jilxbgp72tmelw2j@fjo-extia-HPdeb.example.avalenn.eu> References: <87sga5kpdp.fsf@gmail.com> <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> <871rcxte52.fsf_-_@gnu.org> <8735xbqxwr.fsf_-_@gmail.com> In-Reply-To: <8735xbqxwr.fsf_-_@gmail.com> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a8e1d0c3-4ae1-4128-b291-08d8df17c38d x-ms-traffictypediagnostic: PR0P264MB1740: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HrOM1Q6G6yHsUWLPyK30PxztW0Lb+dKS/MrqMtCbnLilKPZpExsV1/ksiJv/X6urd74zxS81OiZCliR6sLlH5CUBmz+RutjgZuvO5+vZZHobr2T9YAbSzZYkni4lbCT/Nobdk8oW8ZYIgYc6CShjdmc4leD/gLufBeyxVjBY6X2IGPWcu4HZe3YguGxwYrHrhKVdZpovocMM2Lwh4BYKpaKFR3sacI1wZuw0dL9QI0VvtrJAZzCcLRJczQSdlM+hyhjy3Jp6n1FEUR6wlGeHpTbWfh6VhBCZaitc2uCI/e0Y1nfQc1eSCuO1HHe9FVMxvVZn6y+D6+nmGkxWfVYXRX6n8KrmjFYHFTrE7yQa9mBWmqCFTybbeIrKjt74+xT7M9+d9BqC/SOpXcSe6SgdcUEmbko7ud/BeUhO5ujYNwgmY4+teuCy4c99MuxJ+Zjcl+2OGtp/BC6mJZo/U9jTc6eKXX4dYUuYVjm0iBhNqcxoNiHfNQEiXksstam7SpWiwd6jbrULF0UQCt5zR8szfQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(136003)(396003)(346002)(366004)(54906003)(66574015)(6486002)(66556008)(66446008)(66946007)(66476007)(64756008)(76116006)(26005)(186003)(316002)(8936002)(86362001)(6512007)(9686003)(1076003)(71200400001)(5660300002)(4744005)(6916009)(2906002)(478600001)(6506007)(4326008)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?A4J8FUyJ/cDE00740hB/dj65Lo5TbW942KIGFsagKnav5Fk9Jdr8JQQ7Nz?= =?iso-8859-1?Q?Mtn2rpe1R1zVrUG/kOiLRsQUnCdtPEfoc2W2yEWM9P1mx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PNQXi8+kzFv1V6DRPD6dK72UsmZwpIK/73+XbDFRqn8eoYfQ?= =?iso-8859-1?Q?VO94M8GkUHZ9y/JAA84T7lHN1bd4Hln1gt9jfTAJK7aQ0LREqIOTBUAKuC?= =?iso-8859-1?Q?deAGY7EklMhXCE7rhYZRDFKQwylds12+mLzdWUTWyQJ6RmSAqxowY/2p5E?= =?iso-8859-1?Q?J5Z50cC9JMkrfRL6eudz+wBj659gbXFbDQZkZMw2w1kEcRBUZs2ZwjII7w?= =?iso-8859-1?Q?eOEKIPbfyJ9tgS9t1kFbutqiPpqC0/o2U+hg8HAe0w8iy7hn8sUnOYMCBG?= =?iso-8859-1?Q?0KCVQWWHm3WuMnSohbpXrbMv4ilisaw5X00rErpwL/gE9qHXndnCI4u9JW?= =?iso-8859-1?Q?N5UH8AVtXqgEae1UXdTHd7Tgaytq/Qn+1JKAfpzlVTDsNuOnI3SF/BPGLx?= =?iso-8859-1?Q?yhrLMHm0qd?= Content-Type: text/plain; charset="iso-8859-1" Content-ID: <1DBA973E0DFB4442A081097A438D6325@FRAP264.PROD.OUTLOOK.COM> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: a8e1d0c3-4ae1-4128-b291-08d8df17c38d X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2021 14:14:03.0190 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: w3HdK+kLcRj6BPlYC9sdlAw1gf1uZfWWc7uExY/iCBwJsEQ32qAaf4hHRr2Nb1dPrSUrMM7xTz++KaW26Ib2W5GbrurVmW8mEFU77E3SWs4vwYINKoCGwIq6JfCz9vpZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB1740 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_03:2021-03-03, 2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 mlxlogscore=970 clxscore=1011 priorityscore=1501 phishscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040067 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: =?iso-8859-1?Q?Ludovic_Court=E8s?= , "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Thu, Mar 04, 2021 at 12:40:36AM -0500, Maxim Cournoyer wrote: > I made a couple changes, mostly with regard to integrating support for th= e > synopsis, description and license field of the package, plus other > cosmetic changes. I thought I should share it quickly so that it can be > used as the basis for a v5, so here's the patch, attached. First quick glance and the code look a lot better after your work. I will rebase my work in progress on top of it and will provide a v5 this week. Thanks a lot. Fran=E7ois= From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 04 10:48:07 2021 Received: (at 44178) by debbugs.gnu.org; 4 Mar 2021 15:48:07 +0000 Received: from localhost ([127.0.0.1]:59956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHqCt-0008Qy-AD for submit@debbugs.gnu.org; Thu, 04 Mar 2021 10:48:07 -0500 Received: from mail-qv1-f44.google.com ([209.85.219.44]:43713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHqCq-0008QR-88 for 44178@debbugs.gnu.org; Thu, 04 Mar 2021 10:48:05 -0500 Received: by mail-qv1-f44.google.com with SMTP id gi9so13766732qvb.10 for <44178@debbugs.gnu.org>; Thu, 04 Mar 2021 07:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=PhK0E6eNWlyLXLDENzRwvLbNvmcQOTeTMOyxGLInBdY=; b=Enzvfgv5PZHVmmzHpIbQUdgr889k+ceZM+FrucBsZ5C8iYgys1hKuln1BytfxomjBk ygJPe6b6UcAhUCAUXDXGplAAwgRlkoC2956SdVAW7AU16peSE7YtwgB8vr1hRab93P8D 7jWDAJceriJ/Z4YnQWMkj9Z22J8Ecb6Vho0kwt7NJ5VadLUkwg44MKADm+ECL1uKCmea q+KovTatrR4C2HYGQYhOc5oc0ANspqYVSEzkSvNS3mYKMQISZuKu4icsTp3yJQ7oS97N Q5Sgk3wvNIpOcru1GkIUsaJuuZETQvW5wSMdF2ikRpm4Bra3ccgvAyVBu8LBzDc4Tfdr kmng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=PhK0E6eNWlyLXLDENzRwvLbNvmcQOTeTMOyxGLInBdY=; b=IsOwh3ImwX/GzoyLnxYscq5MsWMZjRS9vP6hFHZdbd4PhBWwcP5bQXUCrlb0D4zYHt PA1J/prBUz9B/S2aMQcTdE4MlZyPoN2mq3Pi8EfHSG6PpwcImlO77K3w5JmYUTNBkJGJ UtySqsFrY9V3304G+1upFmE0AO36KLsgmr47Wt9OzUKrPLbkdBFES7X0ilP5Al33pSMv VQjolvddKONaEZtvGeWA7Bz43XeBoUIFfPjqjYZbS/YTQtTFygCDufgMED2MFrlffXbo XIX46Zbw/taWk1C+zWXBozCKvvN+s8I2KQtR460G3qcgKR15vp3jYAK/eaedBNYHMcnf 1jyA== X-Gm-Message-State: AOAM530HTluU/1jsdRfRs397EWxbzGAxBRd9u2biMOlOjPihFuihG3oU ZUdrwV0/DeztfSfi7zxoPlw= X-Google-Smtp-Source: ABdhPJwWTcRDtVawoU1yxHNXDNqwiBYMxb05lV41ryVbe0aX7IOV/1uSrqzDJPumxbd0pzglv51Geg== X-Received: by 2002:a0c:9e13:: with SMTP id p19mr4767081qve.12.1614872878710; Thu, 04 Mar 2021 07:47:58 -0800 (PST) Received: from hurd (dsl-10-132-106.b2b2c.ca. [72.10.132.106]) by smtp.gmail.com with ESMTPSA id a19sm8774035qkl.126.2021.03.04.07.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 07:47:58 -0800 (PST) From: Maxim Cournoyer To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: [PATCH v4] Re: bug#44178: Add a Go Module Importer References: <87sga5kpdp.fsf@gmail.com> <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> <871rcxte52.fsf_-_@gnu.org> <8735xbqxwr.fsf_-_@gmail.com> <20210304113606.jilxbgp72tmelw2j@fjo-extia-HPdeb.example.avalenn.eu> Date: Thu, 04 Mar 2021 10:47:57 -0500 In-Reply-To: <20210304113606.jilxbgp72tmelw2j@fjo-extia-HPdeb.example.avalenn.eu> ("JOULAUD =?utf-8?Q?Fran=C3=A7ois=22's?= message of "Thu, 4 Mar 2021 14:14:02 +0000") Message-ID: <87r1kuq5si.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Katherine Cox-Buday X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Fran=C3=A7ois, JOULAUD Fran=C3=A7ois writes: > Hi, > > On Thu, Mar 04, 2021 at 12:40:36AM -0500, Maxim Cournoyer wrote: >> I made a couple changes, mostly with regard to integrating support for t= he >> synopsis, description and license field of the package, plus other >> cosmetic changes. I thought I should share it quickly so that it can be >> used as the basis for a v5, so here's the patch, attached. > > First quick glance and the code look a lot better after your work. > > I will rebase my work in progress on top of it and will provide a v5 > this week. > > Thanks a lot. > > Fran=C3=A7ois Sounds good! Thanks to you! Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 08:54:23 2021 Received: (at 44178) by debbugs.gnu.org; 8 Mar 2021 13:54:23 +0000 Received: from localhost ([127.0.0.1]:42414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJGKr-0002HB-2J for submit@debbugs.gnu.org; Mon, 08 Mar 2021 08:54:23 -0500 Received: from mx08-00115501.pphosted.com ([91.207.212.23]:50568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJGKm-0002H0-Ks for 44178@debbugs.gnu.org; Mon, 08 Mar 2021 08:54:12 -0500 Received: from pps.filterd (m0030079.ppops.net [127.0.0.1]) by mx08-00115501.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 128Dnsoo015476; Mon, 8 Mar 2021 14:54:07 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radiofrance.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=radiofrance20190306; bh=HulbU2gCJ51sRhP25FkB3UFlDEwm48eLDzUmk5XFPbg=; b=kNPM5kXzkCtJCGh+rsUIDEZ+dqvCiF446quIE5i305KIQG3u6EuoJ036Q+xS8NZ7M7ag pmCIPdvWzi7HMTj4aTIddetcRKbx0mVSY84pXiQQ61+soWG6dwQvZFaWd/Weou3FMxQj weuBU1TK4ylVDJf0zqvuFGIoXNiqDxPwPClK7iiVGjxhCgXaMOBMf4wmWSsJG7QW5eww vm8LnAADCTa3SiEyC8dvW6RE/zpFUqCNMZd+L0PpcU8KcmU7zDNUkuUJNhOUP/y0sR11 ls4itDq0j+4blSOgDgt/7x0RK18b5e133BpAwE0sKToCv0/iF8E1RFej8fANzKrDiiqE 1Q== Received: from fra01-mr2-obe.outbound.protection.outlook.com (mail-mr2fra01on0108.outbound.protection.outlook.com [104.47.25.108]) by mx08-00115501.pphosted.com with ESMTP id 3740ra32db-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Mar 2021 14:54:06 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eaeNnPcOng7m5QzozEZQVbGyyGRum9oq4pXDAqJapAC0+hqKQuqr/zbQvuFJDm8BAap8mNP9fJtcrD4riw3Bgewmy8yyYE3qPbU+QXArougvyEu0mux30+dt2kAE+1Y+town0MADRfDIjbzYFollbxj0iLn319dtCUReCkU3nE+balTY0TlwZU3TnlpJpwWEigxvE+IcUOm+FYHD2zyE0k7JrgYIid40gHApfQCo4QS/MpNdj3fBfZMTmDYh/fmTxm9TvcwIwbw4M3CppLyJBfbTKRJT1kT3XuaYcAM8dcX3hsVL2iF83dxx2oQ/B+WB/IWHLUTNU2kqbkZ2EJjVZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HulbU2gCJ51sRhP25FkB3UFlDEwm48eLDzUmk5XFPbg=; b=P5X47pMBP1uxIKD1KoBTSoq+m2mw+YnQH2ZTcY7sz4wDVlcHaen0xTOUhBosl4KnpfmwIVVvQWi4Bi3HGPR7LrhmvJuHmEw8YMdm7f1EoERG8++/PeKB7feraTLvdttTsE7lbSTnbsCKIh6/yFXReP6/oRtCsJw3PgTToACOWkRLuFkilzMynSIYVQ+NnryNFTPFQ/iDkofaGHnZ/T1fzkPC+VDQw4B9NnNtJWFdhi8WsktBr901CoC+2soxVvRk+uyVkbXbEorOoAgzm7AG5guUk4j6zDIF2bCNFYMgX/+OMru3tQWUmzkui0zN89A32f7Jq10sVpmJkbu5Y0nikA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=radiofrance.com; dmarc=pass action=none header.from=radiofrance.com; dkim=pass header.d=radiofrance.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RFonline.onmicrosoft.com; s=selector2-RFonline-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HulbU2gCJ51sRhP25FkB3UFlDEwm48eLDzUmk5XFPbg=; b=UESu/y86kkrnvcaUzWQUQ8LYs+jDhmf+RDND+wgCw+1qb/rnZyt4e/04OMMJq9PjHJoG8K44FgbBJ9OCGujfk2SuO5nA2/u1BoiIWYJBo+jme/POsC8mjb/Xfn4kW3p+6Jekbt+6HFpyJZtzL8erRmXjzICyxTmRBKrlJyiWu+U= Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:b::20) by PR1P264MB2173.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1b5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.8; Mon, 8 Mar 2021 13:54:05 +0000 Received: from PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::652d:a1b5:f71f:6d6d]) by PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM ([fe80::652d:a1b5:f71f:6d6d%7]) with mapi id 15.20.3912.027; Mon, 8 Mar 2021 13:54:05 +0000 From: =?utf-8?B?Sk9VTEFVRCBGcmFuw6dvaXM=?= To: =?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?= Subject: Re: bug#44178: Add a Go Module Importer Thread-Topic: bug#44178: Add a Go Module Importer Thread-Index: AQHXD66weZSAFcbITUaPqm2Q+cGaDqp6JJ2A Date: Mon, 8 Mar 2021 13:54:04 +0000 Message-ID: <20210308135025.vn32lypnivpsilcg@fjo-extia-HPdeb.example.avalenn.eu> References: <87sga5kpdp.fsf@gmail.com> <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> <871rcxte52.fsf_-_@gnu.org> In-Reply-To: <871rcxte52.fsf_-_@gnu.org> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=radiofrance.com; x-originating-ip: [88.126.13.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b82ddb78-32c7-4fae-8216-08d8e239a326 x-ms-traffictypediagnostic: PR1P264MB2173: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: e7fIDFBS7dLcm5SflOQ0/kxakFYdwD2QO1FqywBIR3BdOLqP0guX6QL01EA1B+H8hLNIaUWjZtjZkl955EbAKK/nmUSlbtjL1vS1Z6ij09bUDaFRb/qur82mlt26qZyH9Bx8Imtm4d3Azw2prf5XNqIdpwVYlFlrpuF44wmAuYRKdJWpoy2Zja5exnLpVK2sf7Q7qV2d8jBVE5aHgastf8yJxFPPpV0P0yyVCzOGGtxVD/P/Qlkm/tHKqG6I7sYidIFBGlJPZHOrl1QNHzSwWGwBYBeZqxJ8AL+BThUk9P8ugQ/xbXToS9HQQ/YbQZRIo11uqa/z3aVsQgnnapI0BsGto7cVj8bunuSx1ds+M2jSZRCZIYmMLfb0Oigl4D9JSPVbk1npQE7BDpLBaYcQ4fIWsPaVzguOsWwxb+1Dl1B7YyJLdi83JaCeKTLnYz0Q8TmhQtMarMg9GpAzm3T/U+9fXkfvTPP37WXee5MxjSI8hhs28h7jFD5dj8Vp80cq+hLj2teNOe0SAS7L2bQVsC6wLkCKgc2rhx6IyThXXjx7Y0J10vcSuVe5i2q0oJMWAf4PxXKuVZeh8HFdb6UIyvn4oRW9bb1MQ3XX+mNbVH8= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(39860400002)(366004)(136003)(376002)(8936002)(8676002)(66574015)(83380400001)(71200400001)(5660300002)(2906002)(6512007)(9686003)(6916009)(76116006)(99936003)(6486002)(85182001)(478600001)(54906003)(86362001)(85202003)(6506007)(186003)(66556008)(66946007)(66476007)(64756008)(66616009)(66446008)(1076003)(4326008)(26005)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?utf-8?B?Q2FMUzAyZitOS2FlK0lrZStFUFdBeGRUb2ROcFNDcDVlNGtOaTV6Q2REcTdZ?= =?utf-8?B?SDVGYmg5T2NlNmhIMFVDaFFCby9zNU8vbVJsb2FBRUNvUEUvWjB0b3VSbTBQ?= =?utf-8?B?dnozeWlrT1lnYVk0cm5ZZlF3T2dzUS9JVkI0R0h2ai92dTdacVIzZ2YxaG9m?= =?utf-8?B?YWNNMlpzQm1OVlU3VDdBdnlpT0x6STdSeHpMcUd5TzZ0eFBZS0NHRTRWa2U3?= =?utf-8?B?WHluWDIrZ0RtNWlybkIvbHVuQzlqNmc2NElub0k0U0hGbFRlTEZUUjhJWU5o?= =?utf-8?B?SlJ6V3MzZ21oM1FpaFhJZ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?dWN2bEE0SEpnWTRGc1dCUzdPN1ZZcWEzSGNPOGN4YmdJNHVLRHFHdjlNdisz?= =?utf-8?B?OWo5bmpEZ1FCcFJ0dldWVkhwTkwvbTVkMmhVRVZ0RTUyUkpiY2tCelNpbDdH?= =?utf-8?B?aG5XekpJY0JRRnFVRy9heXVWOERvMWkvdk1jQ2prcGlWUnFwWW5KY1FjQis1?= =?utf-8?B?aEFiUFZ3M2Vyb29ySU9xanNORG5DUFkwU3NMQ2c3UEdEQVpuUUlnSW9ZaHBQ?= =?utf-8?B?aHNYUkZlaHhUaWRPUTZJa0pETUFiM1cvaTUzZXZoZHd0UGZKNTJ5cFp5SDkr?= =?utf-8?B?YlJHcmFPUjJpNDNrTjc2TnlKNUJEaFgwamhUYzVmUGNTM3UwU1Z5UmU0YU5n?= =?utf-8?B?NmtLZ1ZjaFlXKzhTai80L0JSSUMxaVYrWGVaN3FCd0YzbyszVUtXejB6UTVu?= =?utf-8?B?SWlxZXhqZk5JVEFTeVZON0cvWkdNcVorV1RaU3o5V1hsRnZyQUxVMUxNQmk5?= =?utf-8?B?RjcvbERNUm1EeGw1ZTFYT0FKUDEvd0gwcVpoc213dHVORlFYcWdDK0F1Rzgz?= =?utf-8?Q?5p3pmwSiEMmjS7kOcHJeDh6VyBM4ndN/eb/GD0c?= Content-Type: multipart/mixed; boundary="_002_20210308135025vn32lypnivpsilcgfjoextiaHPdebexampleavale_" MIME-Version: 1.0 X-OriginatorOrg: radiofrance.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR0P264MB0425.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: b82ddb78-32c7-4fae-8216-08d8e239a326 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2021 13:54:05.0468 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d643b07-8cf5-4e2d-ad1e-86d6b948fc3b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LdxSdCQMP6ZJIP2j43ryLuLqC8nCJOJz/cRWatTp7w4yKxPraYUhjdDz+XJQEuwYe7XNtKbNlYJ0ZLVq516U82hVre6AMhcM2Cy8VcskuQf/Eg7q3BAe5kPXioN1ggHv X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR1P264MB2173 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-08_08:2021-03-08, 2021-03-08 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 clxscore=1015 adultscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103080075 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44178 Cc: "44178@debbugs.gnu.org" <44178@debbugs.gnu.org>, Katherine Cox-Buday , Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) --_002_20210308135025vn32lypnivpsilcgfjoextiaHPdebexampleavale_ Content-Type: text/plain; charset="utf-8" Content-ID: <68883EA0C41FCD4881F420D77116B8EE@FRAP264.PROD.OUTLOOK.COM> Content-Transfer-Encoding: base64 SGVsbG8sDQoNClBsZWFzZSBmaW5kIGF0dGFjaGVkIHY1IHZlcnNpb24gb2YgdGhlIHBhdGNoLiBI b3BlZnVsbHkgdGhpcyBpcyB0aGUgbGFzdCBvbmUuDQoNCkkgdG9vayBxdWl0ZSBhbGwgY2hhbmdl cyBmcm9tIE1heGltJ3MgcHJvcG9zYWwuDQoNClRoaW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OKAmWQgYmUgbmljZSwgYnV0IHBlcmhhcHMgd2UgY2Fu IGFkZCBpdA0KPiBhZnRlcndhcmRzIGlmIHlvdSBwcmVmZXIuDQoNCkkgYWRkZWQgb25lIGVuZC10 by1lbmQgdGVzdCBsb29zZWx5IGJhc2VkIG9uIGdpdGh1Yi5jb20vZ28tY2hlY2svY2hlY2sNCmV4 YW1wbGUuDQoNCkZvciBlbmQtdG8tZW5kIHRlc3RzIEkgcmV1c2VkIHRoZSAibW9jayIgc3ludGF4 IGZyb20gZ3VpeC90ZXN0cy5zY20gYnkNCmRvaW5nIGNvcHktcGFzdGUgYmVjYXVzZSB1c2UtbW9k dWxlIG9mICIoZ3VpeCB0ZXN0cykiIHdhcyByZWFsbHkgdG9vDQpzbG93IGZvciBtZS4gSSBkb24n dCBrbm93IHdoYXQncyBnb2luZyBvbiBoZXJlIChpdCBzZWVtcyB0byByZWJ1aWxkIGFsbA0Kb2Yg ImdudSIgc2NoZW1lIG1vZHVsZXMpIGJ1dCBmZWVsIGZyZWUgdG8gZGVsZXRlIHRoZSBjb3B5IGFu ZCBpbXBvcnQNCiIoZ3VpeCB0ZXN0cykiIGlmIHlvdSBwcmVmZXIuDQoNCj4gTGV04oCZcyBzZWUg aG93IG11Y2ggb2YgdGhlIGNvbW1lbnRzIGFib3ZlIHlvdSBjYW4gYWRkcmVzcyBmb3IgYSB2NCwg YW5kDQo+IHRoZW4gd2UgY2FuIGdldCB0aGF0IGluIGFuZCBpbXByb3ZlIGl0IGZyb20gdGhlcmUg aWYgbmVlZGVkIQ0KDQpJIGhvcGUgYWxsIG5lZWRlZCB0byBnZXQgdGhhdCBpbiB0aGUgdHJlZSBp cyBkb25lIG5vdyA7LSkNCg0KRnJhbsOnb2lzDQo= --_002_20210308135025vn32lypnivpsilcgfjoextiaHPdebexampleavale_ Content-Type: text/x-diff; name="0001-Create-importer-for-Go-modules-good-message.patch" Content-Description: 0001-Create-importer-for-Go-modules-good-message.patch Content-Disposition: attachment; filename="0001-Create-importer-for-Go-modules-good-message.patch"; size=50117; creation-date="Mon, 08 Mar 2021 13:54:04 GMT"; modification-date="Mon, 08 Mar 2021 13:54:04 GMT" Content-ID: <82E5D96A4F83F34FA10D769937EB42BC@FRAP264.PROD.OUTLOOK.COM> Content-Transfer-Encoding: base64 RnJvbSBkYWI2NjEyZmVjZDgwOTI3OWY2ZmM0NzEwMTc2Yzc4YTBmZGYyOGE4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQ0KRnJvbTogS2F0aGVyaW5lIENveC1CdWRheSA8Y294LmthdGhlcmluZS5l QGdtYWlsLmNvbT4NCkRhdGU6IFRodSwgMjIgT2N0IDIwMjAgMTk6NDA6MTcgLTA1MDANClN1Ympl Y3Q6IFtQQVRDSHY1XSBDcmVhdGUgaW1wb3J0ZXIgZm9yIEdvIG1vZHVsZXMgKGdvb2QgbWVzc2Fn ZSkNCg0KVGhpcyBwYXRjaCBhZGQgYSBgZ3VpeCBpbXBvcnQgZ29gIGNvbW1hbmQuDQoNCiogZG9j L2d1aXgudGV4aTogZG9jIGFib3V0IGdvIGltcG9ydGVyIGFuZCBndWlsZS1saWIgZGVwZW5kZW5j eQ0KKiBnbnUvcGFja2FnZXMvcGFja2FnZS1tYW5hZ2VtZW50LnNjbTogYWRkZWQgZ3VpbGUtbGli IGRlcGVuZGVuY3kNCiogZ3VpeC9zZWxmLnNjbTogYWRkIGd1aWxlLWxpYiBkZXBlbmRlbmN5DQoq IGd1aXgvYnVpbGQtc3lzdGVtL2dvLnNjbSAoZ28tdmVyc2lvbi0+Z2l0LXJlZik6IG5ldyBwcm9j ZWR1cmUNCiogZ3VpeC9pbXBvcnQvZ28uc2NtOiBDcmVhdGVkIEdvIGltcG9ydGVyDQoqIGd1aXgv c2NyaXB0cy9pbXBvcnQvZ28uc2NtOiBTdWJjb21tYW5kIGZvciBHbyBpbXBvcnRlcg0KKiBndWl4 L3NjcmlwdHMvaW1wb3J0LnNjbTogRGVjbGFyZSBzdWJjb21tYW5kIGd1aXggaW1wb3J0IGdvDQoq IHRlc3RzL2ltcG9ydC1nby5zY206IFRlc3RzIGZvciBHbyBpbXBvcnRlciBhbmQgYnVpbGQtc3lz dGVtDQoNClNpZ25lZC1vZmYtYnk6IEZyYW5jb2lzIEpvdWxhdWQgPGZyYW5jb2lzLmpvdWxhdWRA cmFkaW9mcmFuY2UuY29tPg0KQ28tQXV0aG9yZWQtQnk6IEhlbGlvIE1hY2hhZG8gPDB4MmIzYmZh MEBnbWFpbC5jb20+DQpDby1BdXRob3JlZC1CeTogRnJhbmNvaXMgSm91bGF1ZCA8ZnJhbmNvaXMu am91bGF1ZEByYWRpb2ZyYW5jZS5jb20+DQpDby1BdXRob3JlZC1CeTogTWF4aW0gQ291cm5veWVy IDxtYXhpbS5jb3Vybm95ZXJAZ21haWwuY29tPg0KDQpDbG9zZXM6IGh0dHBzOi8vaXNzdWVzLmd1 aXguZ251Lm9yZy9pc3N1ZS80NDE3OA0KLS0tDQogZG9jL2d1aXgudGV4aSAgICAgICAgICAgICAg ICAgICAgICAgfCAgMjYgKysNCiBnbnUvcGFja2FnZXMvcGFja2FnZS1tYW5hZ2VtZW50LnNjbSB8 ICAgMiArDQogZ3VpeC9idWlsZC1zeXN0ZW0vZ28uc2NtICAgICAgICAgICAgfCAgMzQgKy0NCiBn dWl4L2ltcG9ydC9nby5zY20gICAgICAgICAgICAgICAgICB8IDQ5MCArKysrKysrKysrKysrKysr KysrKysrKysrKysrDQogZ3VpeC9zY3JpcHRzL2ltcG9ydC5zY20gICAgICAgICAgICAgfCAgIDIg Ky0NCiBndWl4L3NjcmlwdHMvaW1wb3J0L2dvLnNjbSAgICAgICAgICB8IDExOCArKysrKysrDQog Z3VpeC9zZWxmLnNjbSAgICAgICAgICAgICAgICAgICAgICAgfCAgIDUgKy0NCiBwby9ndWl4L1BP VEZJTEVTLmluICAgICAgICAgICAgICAgICB8ICAgMSArDQogdGVzdHMvZ28uc2NtICAgICAgICAg ICAgICAgICAgICAgICAgfC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YS9nbnUvcGFja2FnZXMvcGFja2FnZS1tYW5hZ2VtZW50LnNjbSBiL2dudS9wYWNr YWdlcy9wYWNrYWdlLW1hbmFnZW1lbnQuc2NtDQppbmRleCA5ZmI4YzQwYTMxLi4wNmJiNWJkMmRm IDEwMDY0NA0KLS0tIGEvZ251L3BhY2thZ2VzL3BhY2thZ2UtbWFuYWdlbWVudC5zY20NCisrKyBi L2dudS9wYWNrYWdlcy9wYWNrYWdlLW1hbmFnZW1lbnQuc2NtDQpAQCAtMzA0LDYgKzMwNCw3IEBA ICQocHJlZml4KS9ldGMvaW5pdC5kXG4iKSkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJygoYXNzb2MtcmVmIGlucHV0cyAiZ3VpbGUiKSkpKQ0KICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoYXZhaGkgIChhc3NvYy1yZWYgaW5wdXRzICJndWls ZS1hdmFoaSIpKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ2NyeXB0IChhc3Nv Yy1yZWYgaW5wdXRzICJndWlsZS1nY3J5cHQiKSkNCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGd1aWxlLWxpYiAgIChhc3NvYy1yZWYgaW5wdXRzICJndWlsZS1saWIiKSkNCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzb24gICAoYXNzb2MtcmVmIGlucHV0cyAiZ3Vp bGUtanNvbiIpKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3FsaXRlIChhc3Nv Yy1yZWYgaW5wdXRzICJndWlsZS1zcWxpdGUzIikpDQogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICh6bGliICAgKGFzc29jLXJlZiBpbnB1dHMgImd1aWxlLXpsaWIiKSkNCkBAIC0zNjcs NiArMzY4LDcgQEAgJChwcmVmaXgpL2V0Yy9pbml0LmRcbiIpKSkNCiAgICAgICAgICAgICAgICAg ICAg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MiBjaGlsZCBub2RlIG9mIGFueQ0KKyAg ICAgICAgICAgICAgICA7OyBlbGVtZW50IG1hcmtlZCB3aXRoIGEgIkxpY2Vuc2UiIGNsYXNzIGF0 dHJpYnV0ZS4NCisgICAgICAgICAgICAgICAgKChzZWxlY3QpIChzeHBhdGgNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICBgKC8vIChzZWN0aW9uDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKEAgKGVxdWFsPyAoY2xhc3MgIkRvY3VtZW50YXRpb24tb3ZlcnZpZXciKSkpKQ0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHAgMSkpKSkpDQorICAgIChhbmQgKGVx PyAocmVzcG9uc2UtY29kZSByZXNwb25zZSkgMjAwKQ0KKyAgICAgICAgIChtYXRjaCAoc2VsZWN0 IChodG1sLT5zeG1sIGJvZHkpKQ0KKyAgICAgICAgICAgKCgpICNmKSAgICAgICAgICAgICAgICAg ICAgICA7bm90aGluZyBzZWxlY3RlZA0KKyAgICAgICAgICAgKCgocCAuIHN0cmluZ3MpKQ0KKyAg ICAgICAgICAgIDs7IFRoZSBwYXJhZ3JhcGggdGV4dCBpcyByZXR1cm5lZCBhcyBhIGxpc3Qgb2Yg c3RyaW5ncyBlbWJlZGRpbmcNCisgICAgICAgICAgICA7OyBuZXdsaW5lIGNoYXJhY3RlcnMuICBK b2luIHRoZW0gYW5kIHN0cmlwIHRoZSBuZXdsaW5lDQorICAgICAgICAgICAgOzsgY2hhcmFjdGVy cy4NCisgICAgICAgICAgICAoc3RyaW5nLWRlbGV0ZSAjXG5ld2xpbmUgKHN0cmluZy1qb2luIHN0 cmluZ3MpKSkpKSkpDQorDQorKGRlZmluZSAoZ28tcGFja2FnZS1zeW5vcHNpcyBtb2R1bGUtbmFt ZSkNCisgICJSZXRyaWV2ZSBhIHNob3J0IHN5bm9wc2lzIGZvciBhIEdvIG1vZHVsZSBuYW1lZCBN T0RVTEUtTkFNRSwNCitl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BzdHJpbmcg b2YgdGhlIGxpc3QNCisgICAgICAgICAgICAoc3RyaW5nLXRyaW0tYm90aCB0aXRsZSkpKSkpKQ0K Kw0KKyhkZWZpbmUgKGxpc3QtPmxpY2Vuc2VzIGxpY2Vuc2VzKQ0KKyAgIkdpdmVuIGEgbGlzdCBv ZiBMSUNFTlNFUyBtb3N0bHkgZm9sbG93aW5nIHRoZSBTUERYIGNvbnZlbnRpb25zLCByZXR1cm4g dGhlDQorY29ycmVzcG9uZGluZyBHdWl4IGxpY2Vuc2Ugb3IgJ3Vua25vd24tbGljZW5zZSEiDQor ICAoZmlsdGVyLW1hcCAobGFtYmRhIChsaWNlbnNlKQ0KKyAgICAgICAgICAgICAgICAoYW5kIChu b3QgKHN0cmluZy1udWxsPyBsaWNlbnNlKSkNCisgICAgICAgICAgICAgICAgICAgICAobm90IChh bnkgKGN1dCBzdHJpbmc9PyA8PiBsaWNlbnNlKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAnKCJBTkQiICJPUiIgIldJVEgiKSkpDQorICAgICAgICAgICAgICAgICAgICAgOzsgQWRq dXN0IHRoZSBsaWNlbnNlIG5hbWVzIHNjcmFwZWQgZnJvbQ0KKyAgICAgICAgICAgICAgICAgICAg IDs7IGh0dHBzOi8vcGtnLmdvLmRldiB0byBhbiBlcXVpdmFsZW50IFNQRFggaWRlbnRpZmllciwN CisgICAgICAgICAgICAgICAgICAgICA7OyBpZiB0aGV5IGRpZmZlciAoc2VlOiBodHRwczovL2dp dGh1Yi5jb20vZ29sYW5nL3BrZ3NpdGUNCisgICAgICAgICAgICAgICAgICAgICA7OyAvaW50ZXJu YWwvbGljZW5zZXMvbGljZW5zZXMuZ28jTDE3NCkuDQorICAgICAgICAgICAgICAgICAgICAgKG9y IChzcGR4LXN0cmluZy0+bGljZW5zZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgKG1hdGNo IGxpY2Vuc2UNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCJCbHVlT2FrLTEuMCIgIkJs dWVPYWstMS4wLjAiKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoIkJTRC0wLUNsYXVz ZSIgIjBCU0QiKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoIkJTRC0yLUNsYXVzZSIg IkJTRC0yLUNsYXVzZS1GcmVlQlNEIikNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCJH UEwyIiAiR1BMLTIuMCIpDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICgiR1BMMyIgIkdQ TC0zLjAiKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoIk5JU1QiICJOSVNULVBEIikN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKF8gbGljZW5zZSkpKQ0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAndW5rbm93bi1saWNlbnNlISkpKQ0KKyAgICAgICAgICAgICAgbGljZW5z ZXMpKQ0KKw0KKyhkZWZpbmUgKGZldGNoLWdvLm1vZCBnb3Byb3h5LXVybCBtb2R1bGUtcGF0aCB2 ZXJzaW9uKQ0KKyAgIkZldGNoZXMgZ28ubW9kIGZyb20gdGhlIGdpdmVuIEdPUFJPWFktVVJMIHNl cnZlciBmb3IgdGhlIGdpdmVuIE1PRFVMRS1QQVRIDQorYW5kIFZFUlNJT04uIg0KKyAgKGxldCAo KHVybCAoZm9ybWF0ICNmICJ+YS9+YS9Adi9+YS5tb2QiIGdvcHJveHktdXJsDQorICAgICAgICAg ICAgICAgICAgICAgKGdvLXBhdGgtZXNjYXBlIG1vZHVsZS1wYXRoKQ0KKyAgICAgICAgICAgICAg ICAgICAgIChnby1wYXRoLWVzY2FwZSB2ZXJzaW9uKSkpKQ0KKyAgICAoaHR0cC1mZXRjaCB1cmwp KSkNCisNCisoZGVmaW5lICVnby5tb2QtcmVxdWlyZS1kaXJlY3RpdmUtcngNCisgIDs7IEEgbGlu ZSBpbiBhIHJlcXVpcmUgZGlyZWN0aXZlIGlz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3RpdmUtcnggbGluZSkpDQorICAgICAgICAgICAgICAobW9kdWxl LXBhdGggKG1hdGNoOnN1YnN0cmluZyByeC1tYXRjaCAxKSkNCisgICAgICAgICAgICAgICh2ZXJz aW9uIChtYXRjaDpzdWJzdHJpbmcgcngtbWF0Y2ggMykpDQorICAgICAgICAgICAgICAobmV3LW1v ZHVsZS1wYXRoIChtYXRjaDpzdWJzdHJpbmcgcngtbWF0Y2ggNCkpDQorICAgICAgICAgICAgICAo bmV3LXZlcnNpb24gKG1hdGNoOnN1YnN0cmluZyByeC1tYXRjaCA2KSkNCisgICAgICAgICAgICAg IChuZXctcmVwbGFjZWQgKGFsaXN0LWNvbnMgbW9kdWxlLXBhdGggdmVyc2lvbiByZXBsYWNlZCkp DQorICAgICAgICAgICAgICAobmV3LXJlcXVpcmVtZW50cw0KKyAgICAgICAgICAgICAgIChpZiAo c3RyaW5nLW1hdGNoICJeXFwuP1xcLi8iIG5ldy1tb2R1bGUtcGF0aCkNCisgICAgICAgICAgICAg ICAgICAgcmVxdWlyZW1lbnRzDQorICAgICAgICAgICAgICAgICAgIChhbGlzdC1jb25zIG5ldy1t b2R1bGUtcGF0aCBuZXctdmVyc2lvbiByZXF1aXJlbWVudHMpKSkpDQorICAgICAgICAgKG1ha2Ut cmVzdWx0cyBuZXctcmVxdWlyZW1lbnRzIG5ldy1yZXBsYWNlZCkpKSkpDQorICAoZGVmaW5lIChy ZXF1aXJlLWRpcmVjdGl2ZSByZXN1bHRzIGxpbmUpDQorICAgICJFeHRyYWN0IHJlcXVpcmVtZW50 IGZyb20gTElORSBhbmQgYWRkIGl0IHRvIFJFU1VMVFMuIg0KKyAgICAobGV0KiAoKHJ4LW1hdGNo IChyZWdleHAtZXhlYyAlZ28ubW9kLXJlcXVpcmUtZGlyZWN0aXZlLXJ4IGxpbmUpKQ0KKyAgICAg ICAgICAgKG1vZHVsZS1wYXRoIChtYXRjaDpzdWJzdHJpbmcgcngtbWF0Y2ggMSkpDQorICAgICAg ICAg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ncyBwYXRoIHRvIHRoZSBjYW5vbmljYWwg R3VpeCBmb3JtYXQgZm9yIEdvIHBhY2thZ2VzLiINCisgIChzdHJpbmctZG93bmNhc2UgKHN0cmlu Zy1hcHBlbmQgImdvLSIgKHN0cmluZy1yZXBsYWNlLXN1YnN0cmluZw0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1yZXBsYWNlLXN1YnN0cmluZw0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZHVsZS1wYXRoDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIi4iICItIikNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIvIiAiLSIpKSkpDQorDQorKGRlZmlu ZS1yZWNvcmQtdHlwZSA8bW9kdWxlLW1ldGE+DQorICAobWFrZS1tb2R1bGUtbWV0YSBpbXBvcnQt cHJlZml4IHZjcyByZXBvLXJvb3QpDQorICBtb2R1bGUtbWV0YT8NCisgIChpbXBvcnQtcHJlZml4 IG1vZHVsZS1tZXRhLWltcG9ydC1wcmVmaXgpDQorICAodmNzIG1vZHVsZS1tZXRhLXZjcykgICAg ICAgICAgICAgICAgIDthIHN5bWJvbA0KKyAgKHJlcG8tcm9vdCBtb2R1bGUtbWV0YS1yZXBvLXJv b3QpKQ0KKw0KKyhkZWZpbmUgKGZldGNoLW1vZHVsZS1tZXRhLWRhdGEgbW9kdWxlLXBhdGgpDQor ICAiUmV0cmlldmUgdGhlIG1vZHVsZSBtZXRhLWRhdGEgZnJvbSBpdHMgbGFuZGluZyBwYWdlLiAg VGhpcyBpcyBuZWNlc3NhcnkNCitiZWNhdXNlIGdvcHJveHkgc2VydmVycyBkb24ndCBjdXJyZW50 bHkgcHJvdmlkZSBhbGwgdGhlIGluZm9ybWF0aW9uIG5lZWRlZCB0bw0KK2J1aWxkIGEgcGFja2Fn ZS4iDQorICA7OyA8bWV0YSBuYW1lPSJnby1pbXBvcnQiIGNvbnRlbnQ9ImltcG9ydC1wcmVmaXgg dmNzIHJlcG8tcm9vdCI+DQorICAobGV0KiAoKHBvcnQgKGh0dHAtZmV0Y2ggKGZvcm1hdCAjZiAi aHR0cHM6Ly9+YT9nby1nZXQ9MSIgbW9kdWxlLXBhdGgpKSkNCisgICAgICAgICAoc2VsZWN0IChz eHBhdGggYCgvLyBoZWFkIChtZXRhIChAIChlcXVhbD8gKG5hbWUgImdvLWltcG9ydCIpKSkpDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29udGVudCkpKSkNCisgICAgKG1hdGNo IChzZWxlY3QgKGNhbGwtd2l0aC1wb3J0IHBvcnQgaHRtbC0+c3htbCkpDQorICAgICAgKCgpICNm KSAgICAgICAgICAgICAgICAgICAgICAgICA7bm90aGluZyBzZWxlY3RlZA0KKyAgICAgICgoKGNv bnRlbnQgY29udGVudC10ZXh0KSkNCisgICAgICAgKG1hdGNoIChzdHJpbmctc3BsaXQgY29udGVu dC10ZXh0ICNcc3BhY2UpDQorICAgICAgICAgKChyb290LXBhdGggdmNzIHJlcG8tdXJsKQ0KKyAg ICAgICAgICAobWFrZS1tb2R1bGUtbWV0YSByb290LXBhdGggKHN0cmluZy0+c3ltYm9sIHZjcykg cmVwby11cmwpKSkpKSkpDQorDQorKGRlZmluZSAobW9kdWxlLW1ldGEtZGF0YS1yZXBvLXVybCBt ZXRhLWRhdGEgZ29wcm94eS11cmwpDQorICAiUmV0dXJuIHRoZSBVUkwgd2hlcmUgdGhlIGZldGNo ZXIgd2hpY2ggd2lsbCBiZSB1c2VkIGNhbiBkb3dubG9hZCB0aGUNCitzb3VyY2UuIg0KKyAgKGlm IChtZW1iZXIgKG1vZHVsZS1tZXRhLXZjcyBtZXRhLWRhdGEpICcoZm9zc2lsIG1vZCkpDQorICAg ICAgZ29wcm94eS11cmwNCisgICAgICAobW9kdWxlLW1ldGEtcmVwby1yb290IG1ldGEtZGF0YSkp KQ0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XBvcnQgcGFja2FnZS1uYW1lDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICM6a2V5IChnb3Byb3h5LXVybCAiaHR0cHM6Ly9wcm94eS5n b2xhbmcub3JnIikpDQorICAocmVjdXJzaXZlLWltcG9ydA0KKyAgIHBhY2thZ2UtbmFtZQ0KKyAg ICM6cmVwby0+Z3VpeC1wYWNrYWdlIChsYW1iZGEqIChuYW1lIC4gXykNCisgICAgICAgICAgICAg ICAgICAgICAgICAgIChnby1tb2R1bGUtPmd1aXgtcGFja2FnZSoNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICBuYW1lDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIzpnb3Byb3h5LXVy bCBnb3Byb3h5LXVybCkpDQorICAgIzpndWl4LW5hbWUgZ28tbW9kdWxlLT5ndWl4LXBhY2thZ2Ut bmFtZSkpDQpkaWZmIC0tZ2l0IGEvZ3VpeC9zY3JpcHRzL2ltcG9ydC5zY20gYi9ndWl4L3Njcmlw dHMvaW1wb3J0LnNjbQ0KaW5kZXggMGEzODYzZjk2NS4uMWQyYjQ1ZDk0MiAxMDA2NDQNCi0tLSBh L2d1aXgvc2NyaXB0cy9pbXBvcnQuc2NtDQorKysgYi9ndWl4L3NjcmlwdHMvaW1wb3J0LnNjbQ0K QEAgLTc3LDcgKzc3LDcgQEAgcmF0aGVyIHRoYW4gXFxuLiINCiA7OzsNCiANCiAoZGVmaW5lIGlt cG9ydGVycyAnKCJnbnUiICJuaXgiICJweXBpIiAiY3BhbiIgImhhY2thZ2UiICJzdGFja2FnZSIg ImVscGEiICJnZW0iDQotICAgICAgICAgICAgICAgICAgICAiY3JhbiIgImNyYXRlIiAidGV4bGl2 ZSIgImpzb24iICJvcGFtIikpDQorICAgICAgICAgICAgICAgICAgICAiZ28iICJjcmFuIiAiY3Jh dGUiICJ0ZXhsaXZlIiAianNvbiIgIm9wYW0iKSkNCiANCiAoZGVmaW5lIChyZXNvbHZlLWltcG9y dGVy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GF5IChHXyAiVXNhZ2U6IGd1aXggaW1wb3J0IGdvIFBBQ0tBR0UtUEFUSA0KK0ltcG9ydCBh bmQgY29udmVydCB0aGUgR28gbW9kdWxlIGZvciBQQUNLQUdFLVBBVEguXG4iKSkNCisgIChkaXNw bGF5IChHXyAiDQorICAtaCwgLS1oZWxwICAgICAgICAgICAgIGRpc3BsYXkgdGhpcyBoZWxwIGFu ZCBleGl0IikpDQorICAoZGlzcGxheSAoR18gIg0KKyAgLVYsIC0tdmVyc2lvbiAgICAgICAgICBk aXNwbGF5IHZlcnNpb24gaW5mb3JtYXRpb24gYW5kIGV4aXQiKSkNCisgIChkaXNwbGF5IChHXyAi DQorICAtciwgLS1yZWN1cnNpdmUgICAgICAgIGdlbmVyYXRlIHBhY2thZ2UgZXhwcmVzc2lvbnMg Zm9yIGFsbCBHbyBtb2R1bGVzXA0KKyB0aGF0IGFyZSBub3QgeWV0IGluIEd1aXgiKSkNCisgIChk aXNwbGF5IChHXyAiDQorICAtcCwgLS1nb3Byb3h5PUdPUFJPWFkgIHNwZWNpZnkgd2hpY2ggZ29w cm94eSBzZXJ2ZXIgdG8gdXNlIikpDQorICAobmV3bGluZSkNCisgIChzaG93LWJ1Zy1yZXBvcnQt aW5mb3JtYXRpb24pKQ0KKw0KKyhkZWZpbmUgJW9wdGlvbnMNCisgIDs7IFNwZWNpZmljYXRpb24g b2YgdGhlIGNvbW1hbmQtbGluZSBvcHRpb25zLg0KKyAgKGNvbnMqIChvcHRpb24gJygjXGggImhl bHAiKSAjZiAjZg0KKyAgICAgICAgICAgICAgICAgKGxhbWJkYSBhcmdzDQorICAgICAgICAgICAg ICAgICAgIChzaG93LWhlbHApDQorICAgICAgICAgICAgICAgICAgIChleGl0IDApKSkNCisgICAg ICAgICAob3B0aW9uICcoI1xWICJ2ZXJzaW9uIikgI2YgI2YNCisgICAgICAgICAgICAgICAgIChs YW1iZGEgYXJncw0KKyAgICAgICAgICAgICAgICAgICAoc2hvdy12ZXJzaW9uLWFuZC1leGl0ICJn dWl4IGltcG9ydCBnbyIpKSkNCisgICAgICAgICAob3B0aW9uICcoI1xyICJyZWN1cnNpdmUiKSAj ZiAjZg0KKyAgICAgICAgICAgICAgICAgKGxhbWJkYSAob3B0IG5hbWUgYXJnIHJlc3VsdCkNCisg ICAgICAgICAgICAgICAgICAgKGFsaXN0LWNvbnMgJ3JlY3Vyc2l2ZSAjdCByZXN1bHQpKSkNCisg ICAgICAgICAob3B0aW9uICcoI1xwICJnb3Byb3h5IikgI3QgI2YNCisgICAgICAgICAgICAgICAg IChsYW1iZGEgKG9wdCBuYW1lIGFyZyByZXN1bHQpDQorICAgICAgICAgICAgICAgICAgIChhbGlz dC1jb25zICdnb3Byb3h5DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzdHJpbmct PnN5bWJvbCBhcmcpDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhbGlzdC1kZWxl dGUgJ2dvcHJveHkgcmVzdWx0KSkpKQ0KKyAgICAgICAgICVzdGFuZGFyZC1pbXBvcnQtb3B0aW9u cykpDQorDQorDQorOzs7DQorOzs7IEVudHJ5IHBvaW50Lg0KKzs7Ow0KKw0KKyhkZWZpbmUgKGd1 aXgtaW1wb3J0LWdvIC4gYXJncykNCisgIChkZWZpbmUgKHBhcnNlLW9wdGlvbnMpDQorICAgIDs7 IFJldHVybiB0aGUgYWxpc3Qgb2Ygb3B0aW9uIHZhbHVlcy4NCisgICAgKGFyZ3MtZm9sZCogYXJn cyAlb3B0aW9ucw0KKyAgICAgICAgICAgICAgICAobGFtYmRhIChvcHQgbmFtZSBhcmcgcmVzdWx0 KQ0KKyAgICAgICAgICAgICAgICAgIChsZWF2ZSAoR18gIn5BOiB1bnJlY29nbml6ZWQgb3B0aW9u fiUiKSBuYW1lKSkNCisgICAgICAgICAgICAgICAgKGxhbWJkYSAoYXJnIHJlc3VsdCkNCisgICAg ICAgICAgICAgICAgICAoYWxpc3QtY29ucyAnYXJndW1lbnQgYXJnIHJlc3VsdCkpDQorICAgICAg ICAgICAgICAgICVkZWZhdWx0LW9wdGlvbnMpKQ0KKw0KKyAgKGxldCogKChvcHRzIChwYXJzZS1v cHRpb25zKSkNCisgICAgICAgICAoYXJncyAoZmlsdGVyLW1hcCAobWF0Y2gtbGFtYmRhDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoKCdhcmd1bWVudCAuIHZhbHVlKQ0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHZhbHVlKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKF8gI2YpKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChyZXZlcnNlIG9wdHMpKSkp DQorICAgIChtYXRjaCBhcmdzDQorICAgICAgKChtb2R1bGUtbmFtZSkNCisgICAgICAgKGlmIChh c3NvYy1yZWYgb3B0cyAncmVjdXJzaXZlKQ0KKyAgICAgICAgICAgKG1hcCAobWF0Y2gtbGFtYmRh DQorICAgICAgICAgICAgICAgICAgKChhbmQgKCdwYWNrYWdlICgnbmFtZSBuYW1lKSAuIHJlc3Qp IHBrZykNCisgICAgICAgICAgICAgICAgICAgYChkZWZpbmUtcHVibGljICwoc3RyaW5nLT5zeW1i b2wgbmFtZSkNCisgICAgICAgICAgICAgICAgICAgICAgLHBrZykpDQorICAgICAgICAgICAgICAg ICAgKF8gI2YpKQ0KKyAgICAgICAgICAgICAgICAoZ28tbW9kdWxlLXJlY3Vyc2l2ZS1pbXBvcnQg bW9kdWxlLW5hbWUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICM6Z29wcm94eS11cmwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChvciAoYXNzb2MtcmVmIG9wdHMgJ2dvcHJveHkpDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgImh0dHBzOi8vcHJveHkuZ29sYW5nLm9yZyIpKSkN CisgICAgICAgICAgIChsZXQgKChzZXhwIChnby1tb2R1bGUtPmd1aXgtcGFja2FnZSBtb2R1bGUt bmFtZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICM6 Z29wcm94eS11cmwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAob3IgKGFzc29jLXJlZiBvcHRzICdnb3Byb3h5KQ0KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaHR0cHM6Ly9wcm94eS5nb2xhbmcub3Jn IikpKSkNCisgICAgICAgICAgICAgKHVubGVzcyBzZXhwDQorICAgICAgICAgICAgICAgKGxlYXZl IChHXyAiZmFpbGVkIHRvIGRvd25sb2FkIG1ldGEtZGF0YSBmb3IgbW9kdWxlICd+YSd+JSIpDQor ICAgICAgICAgICAgICAgICAgICAgIG1vZHVsZS1uYW1lKSkNCisgICAgICAgICAgICAgc2V4cCkp KQ0KKyAgICAgICgoKQ0KKyAgICAgICAobGVhdmUgKEdfICJ0b28gZmV3IGFyZ3VtZW50c34lIikp KQ0KKyAgICAgICgobWFueSAuLi4pDQorICAgICAgIChsZWF2ZSAoR18gInRvbyBtYW55IGFyZ3Vt ZW50c34lIikpKSkpKQ0KZGlmZiAtLWdpdCBhL2d1aXgvc2VsZi5zY20gYi9ndWl4L3NlbGYuc2Nt DQppbmRleCAzNWZiYTExNTJkLi5lZDVlZTlkZGVhIDEwMDY0NA0KLS0tIGEvZ3VpeC9zZWxmLnNj bQ0KKysrIGIvZ3VpeC9zZWxmLnNjbQ0KQEAgLTgxNCw2ICs4MTQsOSBAQCBpdHNlbGYuIg0KICAg KGRlZmluZSBndWlsZS1zc2gNCiAgICAgKHNwZWNpZmljYXRpb24tPnBhY2thZ2UgImd1aWxlLXNz aCIpKQ0KIA0KKyAgKGRlZmluZSBndWlsZS1saWINCisgICAgKHNwZWNpZmljYXRpb24tPnBhY2th Z2UgImd1aW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DQorOzsg V2UgZGVmaW5lIGEgZnVuY3Rpb24gZm9yIGFsbCBzaW1pbGFyIHRlc3RzIHdpdGggZGlmZmVyZW50 IGdvLm1vZCBmaWxlcw0KKyhkZWZpbmUgKHRlc3RpbmctcGFyc2UtbW9kIG5hbWUgZXhwZWN0ZWQg aW5wdXQpDQorICAoZGVmaW5lIChpbmY/IHAxIHAyKQ0KKyAgICAoc3RyaW5nPD8gKGNhciBwMSkg KGNhciBwMikpKQ0KKyAgKGxldCAoKGlucHV0LXBvcnQgKG9wZW4taW5wdXQtc3RyaW5nIGlucHV0 KSkpDQorICAgICh0ZXN0LWVxdWFsIG5hbWUNCisgICAgICAoc29ydCBleHBlY3RlZCBpbmY/KQ0K KyAgICAgIChzb3J0DQorICAgICAgICggKEBAIChndWl4IGltcG9ydCBnbykgcGFyc2UtZ28ubW9k KQ0KKyAgICAgICAgIGlucHV0LXBvcnQpDQorICAgICAgIGluZj8pKSkpDQorDQorKHRlc3Rpbmct cGFyc2UtbW9kICJwYXJzZS1nby5tb2Qtc2ltcGxlIg0KKyAgICAgICAgICAgICAgICAgICAnKCgi Z29vZC90aGluZyIgLiAidjEuNC41IikNCisgICAgICAgICAgICAgICAgICAgICAoIm5ldy90aGlu Zy92MiIgLiAidjIuMy40IikNCisgICAgICAgICAgICAgICAgICAgICAoIm90aGVyL3RoaW5nIiAu ICJ2MS4wLjIiKSkNCisgICAgICAgICAgICAgICAgICAgZml4dHVyZS1nby1tb2Qtc2ltcGxlKQ0K Kw0KKyh0ZXN0aW5nLXBhcnNlLW1vZCAicGFyc2UtZ28ubW9kLXdpdGgtYmxvY2siDQorICAgICAg ICAgICAgICAgICAgICcoKCJBIiAuICJ2MSIpDQorICAgICAgICAgICAgICAgICAgICAgKCJCIiAu ICJ2MS4wLjAiKQ0KKyAgICAgICAgICAgICAgICAgICAgICgiQyIgLiAidjEuMC4wIikNCisgICAg ICAgICAgICAgICAgICAgICAoIkQiIC4gInYxLjIuMyIpDQorICAgICAgICAgICAgICAgICAgICAg KCJFIiAuICJkZXYiKSkNCisgICAgICAgICAgICAgICAgICAgZml4dHVyZS1nby1tb2Qtd2l0aC1i bG9jaykNCisNCisodGVzdGluZy1wYXJzZS1tb2QgInBhcnNlLWdvLm1vZC1jb21wbGV0ZSINCisg ICAgICAgICAgICAgICAgICAgJygoImdpdGh1Yi5jb20vY29ycC9hcmJpdHJhcnktcmVwbyIgLiAi djAuMC4yIikNCisgICAgICAgICAgICAgICAgICAgICAoInF1b3RlZC5leGFtcGxlLmNvbS9hYml0 cmFyeS9yZXBvIiAuICJ2MC4wLjIiKQ0KKyAgICAgICAgICAgICAgICAgICAgICgib25lLmV4YW1w bGUuY29tL2FiaXRyYXJ5L3JlcG8iIC4gInYxLjEuMTExIikNCisgICAgICAgICAgICAgICAgICAg ICAoImh1Yi5qYXp6Lm5ldC9naXQvdXNlci9wcm9qZWN0L3N1Yi9kaXJlY3RvcnkiIC4gInYxLjEu MTkiKQ0KKyAgICAgICAgICAgICAgICAgICAgICgiaHViLmphenoubmV0L2dpdC91c2VyL3Byb2pl Y3QiIC4gInYxLjEuMTgiKQ0KKyAgICAgICAgICAgICAgICAgICAgICgibGF1bmNocGFkLm5ldC9+ dXNlci9wcm9qZWN0L2JyYW5jaC9zdWIvZGlyZWN0b3J5IiAuICJ2MS4xLjE3IikNCisgICAgICAg ICAgICAgICAgICAgICAoImxhdW5jaHBhZC5uZXQvfnVzZXIvcHJvamVjdC9icmFuY2giIC4gInYx LjEuMTYiKQ0KKyAgICAgICAgICAgICAgICAgICAgICgibGF1bmNocGFkLm5ldC9wcm9qZWN0L3Nl cmllcy9zdWIvZGlyZWN0b3J5IiAuICJ2MS4xLjE1IikNCisgICAgICAgICAgICAgICAgICAgICAo ImxhdW5jaHBhZC5uZXQvcHJvamVjdC9zZXJpZXMiIC4gInYxLjEuMTQiKQ0KKyAgICAgICAgICAg ICAgICAgICAgICgibGF1bmNocGFkLm5ldC9wcm9qZWN0IiAuICJ2MS4xLjEzIikNCisgICAgICAg ICAgICAgICAgICAgICAoImJpdGJ1Y2tldC5vcmcvdXNlci9wcm9qZWN0L3N1Yi9kaXJlY3Rvcnki IC4gInYxLjExLjIxIikNCisgICAgICAgICAgICAgICAgICAgICAoImJpdGJ1Y2tldC5vcmcvdXNl ci9wcm9qZWN0IiAuICJ2MS4xMS4yMCIpDQorICAgICAgICAgICAgICAgICAgICAgKCJrOHMuaW8v a3ViZXJuZXRlcy9zdWJwcm9qZWN0IiAuICJ2MS4xLjEwMSIpDQorICAgICAgICAgICAgICAgICAg ICAgKCJnaXRodWIuY29tL3VzZXIvcHJvamVjdC9zdWIvZGlyZWN0b3J5IiAuICJ2MS4xLjEyIikN CisgICAgICAgICAgICAgICAgICAgICAoImdpdGh1Yi5jb20vdXNlci9wcm9qZWN0IiAuICJ2MS4x LjExIikNCisgICAgICAgICAgICAgICAgICAgICAoImdpdGh1Yi5jb20vZ28tY2hlY2svY2hlY2si IC4gInYwLjAuMC0yMDE0MDIyNTE3MzA1NC1lYjZlZTZmODRkMGEiKSkNCisgICAgICAgICAgICAg ICAgICAgZml4dHVyZS1nby1tb2QtY29tcGxldGUpDQorDQorOzs7IEVuZC10by1lbmQgdGVzdHMg Zm9yIChndWl4IGltcG9ydCBnbykNCisoZGVmaW5lIChtb2NrLWh0dHAtZmV0Y2ggdGVzdGNhc2Up DQorICAobGFtYmRhICh1cmwgLiByZXN0KQ0KKyAgICAobGV0ICgoYm9keSAoYXNzb2MtcmVmIHRl c3RjYXNlIHVybCkpKQ0KKyAgICAgIChpZiBib2R5DQorICAgICAgICAgIChvcGVuLWlucHV0LXN0 cmluZyBib2R5KQ0KKyAgICAgICAgICAoZXJyb3IgIm1vY2tlZCBodHRwLWZldGNoIFVuZXhwZWN0 ZWQgVVJMOiAiIHVybCkpKSkpDQorDQorKGRlZmluZSAobW9jay1odHRwLWdldCB0ZXN0Y2FzZSkN CisgIChsYW1iZGEgKHVybCAuIHJlc3QpDQorICAgIChsZXQgKChib2R5IChhc3NvYy1yZWYgdGVz dGNhc2UgdXJsKSkNCisgICAgICAgICAgKHJlc3BvbnNlLWhlYWRlcg0KKyAgICAgICAgICAgICAo YnVpbGQtcmVzcG9uc2UNCisgICAgICAgICAgICAgICAgIzp2ZXJzaW9uICcoMSAuIDEpDQorICAg ICAgICAgICAgICAgICM6Y29kZSAyMDANCisgICAgICAgICAgICAgICAgIzpyZWFzb24tcGhyYXNl ICJPayINCisgICAgICAgICAgICAgICAgIzpoZWFkZXJzIGAoDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChjb250ZW50LXR5cGUgdGV4dC9odG1sIChjaGFyc2V0IC4gInV0Zi04IikpDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkYXRlIC4gLChtYWtlLWRhdGUgMCAxMCA1OCAx MiA2IDMgMjAyMSAwKSkNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRyYW5zZmVyLWVu Y29kaW5nIChjaHVua2VkKSkpDQorICAgICAgICAgICAgICAgICM6cG9ydCAjZg0KKyAgICAgICAg ICAgICAgICAjOnZhbGlkYXRlLWhlYWRlcnM/ICN0KSkpDQorICAgICAgKGlmIGJvZHkNCisgICAg ICAgICAgKHZhbHVlcyByZXNwb25zZS1oZWFkZXIgYm9keSkNCisgICAgICAgICAgKGVycm9yICJt b2NrZWQgaHR0cC1nZXQgVW5leHBlY3RlZCBVUkw6ICIgdXJsKSkpKSkNCisNCisodGVzdC1lcXVh bCAiZ28tbW9kdWxlLT5ndWl4LXBhY2thZ2UiDQorICAnKHBhY2thZ2UNCisgICAgKG5hbWUgImdv LWdpdGh1Yi1jb20tZ28tY2hlY2stY2hlY2siKQ0KKyAgICAodmVyc2lvbiAiMC4wLjAtMjAyMDEx MzAxMzQ0NDItMTBjYjk4MjY3YzZjIikNCisgICAgKHNvdXJjZQ0KKyAgICAgKG9yaWdpbg0KKyAg ICAgICAobWV0aG9kIGdpdC1mZXRjaCkNCisgICAgICAgKHVyaSAoZ2l0LXJlZmVyZW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gICAgICAgICAgIChtb2NrLWh0dHAtZmV0Y2ggZml4 dHVyZXMtZ28tY2hlY2stdGVzdCkpDQorICAgICAgIChnby1tb2R1bGUtPmd1aXgtcGFja2FnZSAi Z2l0aHViLmNvbS9nby1jaGVjay9jaGVjayIpKSkpDQorDQorKHRlc3QtZW5kICJnbyIpDQorDQot LSANCjIuMzAuMQ0KDQo= --_002_20210308135025vn32lypnivpsilcgfjoextiaHPdebexampleavale_-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 10 12:13:06 2021 Received: (at 44178-done) by debbugs.gnu.org; 10 Mar 2021 17:13:06 +0000 Received: from localhost ([127.0.0.1]:51763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lK2OQ-0002jv-Ca for submit@debbugs.gnu.org; Wed, 10 Mar 2021 12:13:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lK2OO-0002jR-Tb for 44178-done@debbugs.gnu.org; Wed, 10 Mar 2021 12:13:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38346) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK2OI-0002lg-Uj; Wed, 10 Mar 2021 12:12:58 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49394 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lK2OD-0003Ut-O5; Wed, 10 Mar 2021 12:12:57 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: JOULAUD =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: bug#44178: Add a Go Module Importer References: <87sga5kpdp.fsf@gmail.com> <20210219161737.4l266imcd24gqxwn@fjo-extia-HPdeb.example.avalenn.eu> <871rcxte52.fsf_-_@gnu.org> <20210308135025.vn32lypnivpsilcg@fjo-extia-HPdeb.example.avalenn.eu> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Vent=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 10 Mar 2021 18:12:49 +0100 In-Reply-To: <20210308135025.vn32lypnivpsilcg@fjo-extia-HPdeb.example.avalenn.eu> ("JOULAUD =?utf-8?Q?Fran=C3=A7ois=22's?= message of "Mon, 8 Mar 2021 13:54:04 +0000") Message-ID: <87tupj0w6m.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44178-done Cc: Katherine Cox-Buday , "44178@debbugs.gnu.org" <44178-done@debbugs.gnu.org>, Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Fran=C3=A7ois, Katherine, & all! I=E2=80=99m happy to say that it=E2=80=99s finally pushed, on behalf of Kat= herine and the rest of you! https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D02e2e093e858e8a0c= a7bd66c1f1f6fd0a1705edb I had to make a number of changes, among which (off the top of my head): =E2=80=A2 Add files to Makefile.am. One can now run: make check TESTS=3Dtests/go.scm See . =E2=80=A2 Update =E2=80=98specification->package=E2=80=99 in (guix self). =E2=80=A2 Fix version handling in the generated sexp (thanks Maxim for he= lping out on IRC!). =E2=80=A2 Fix the generated =E2=80=98license=E2=80=99 field. =E2=80=A2 Fix minor issues reported by compiler warnings. =E2=80=A2 Compute the hash of Git checkouts (done in a followup commit) s= ince that=E2=80=99s part of the minimum one expects from importers. =E2=80=A2 Recode (guix import go) as UTF-8 rather than Latin-1. =E2=80=A2 Move commentary below =E2=80=98define-module=E2=80=99 form. Let me know if I broke anything on the way or if anything=E2=80=99s unclear! Now, you=E2=80=99ve already identified things that could be improved, so fe= el free to send focused patches addressing specific issues. Thanks everyone for the great team work! :-) Ludo=E2=80=99. From unknown Fri Jun 20 18:16:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 08 Apr 2021 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator