From: Timmy Douglas <mail@timmydouglas.com>
To: Leo Famulari <leo@famulari.name>,
help-guix@gnu.org,
Katherine Cox-Buday <cox.katherine.e@gmail.com>,
Helio Machado <0x2b3bfa0@gmail.com>
Subject: Re: packaging a golang package
Date: Sun, 10 Jan 2021 22:09:52 -0800 [thread overview]
Message-ID: <87bldw0ztb.fsf@timmydouglas.com> (raw)
In-Reply-To: <87a6thtyvm.fsf@timmydouglas.com>
I also tried Helio's branch, rebased on the latest, with the following
changes:
diff --git a/guix/import/go-modules.scm b/guix/import/go-modules.scm
index 20fc5c9642..811c9f60ae 100644
--- a/guix/import/go-modules.scm
+++ b/guix/import/go-modules.scm
@@ -290,7 +290,7 @@ VERSION, MODULE-INPUTS, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
(() "")
(_ home-page)))
(synopsis ,synopsis)
- (description ,(beautify-description description))
+ (description ,(beautify-description (or description "")))
(license ,(match license
(() #f)
((license) license)
@@ -327,12 +327,11 @@ specified, attempt to fetch that version. Otherwise, fetch the latest version."
(define* (go-module-recursive-import name #:optional version)
"Given a module NAME and, optionally its VERSION, produce package definitions
for itself and every dependency, recursively."
- (recursive-import (if version (string-append name "@" version) name) #f
+ (recursive-import (if version (string-append name "@" version) name)
#:repo->guix-package
- (lambda (name repo)
+ (lambda* (name #:key repo version)
(let-values (((name version) (package-name->name+version name)))
- (go-module->guix-package name version))
- )
+ (go-module->guix-package name version)))
#:guix-name go-module-name+version->package-name+version))
I liked how Helio's version uses the go proxy to simplify the parsing of
the package lists, but I ran this:
./pre-inst-env guix import go-modules -r github.com/coredns/coredns
and it took what felt like thirty minutes before failing with:
error: failed to retrieve package information from "https://proxy.golang.org/replace/@v/(.info": 410 ("Gone")
Backtrace:
In ice-9/boot-9.scm:
1736:10 18 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
17 (apply-smob/0 #<thunk 7fe73061b740>)
In ice-9/boot-9.scm:
718:2 16 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
619:8 15 (_ #(#(#<directory (guile-user) 7fe730258f00>)))
In guix/ui.scm:
2154:12 14 (run-guix-command _ . _)
In guix/scripts/import.scm:
121:11 13 (guix-import . _)
In ice-9/eval.scm:
159:9 12 (_ _)
In guix/import/utils.scm:
464:27 11 (recursive-import _ #:repo->guix-package _ #:guix-name _ ?)
In srfi/srfi-1.scm:
586:29 10 (map1 (("github.com/davecgh/go-spew@v1.1.1" #f) (# #) ?))
586:29 9 (map1 (("github.com/google/go-cmp@v0.4.0" #f) ("g?" ?) ?))
586:29 8 (map1 (("github.com/google/gofuzz@v1.1.0" #f) ("g?" ?) ?))
586:29 7 (map1 (("github.com/kr/pretty@v0.2.0" #f) ("githu?" ?) ?))
586:29 6 (map1 (("github.com/spf13/pflag@v1.0.5" #f) ("gol?" ?) ?))
586:29 5 (map1 (("golang.org/x/tools@v0.0.0-20200505023115?" ?) ?))
586:29 4 (map1 (("gopkg.in/check.v1@v1.0.0-20190902080502-?" ?) ?))
586:29 3 (map1 (("k8s.io/klog/v2@v2.2.0" #f) ("sigs.k8s.io?" ?) ?))
586:29 2 (map1 (("sigs.k8s.io/yaml@v1.2.0" #f) ("replace@(" #f)))
586:17 1 (map1 (("replace@(" #f)))
In guix/import/utils.scm:
453:33 0 (lookup-node "replace@(" #f)
guix/import/utils.scm:453:33: In procedure lookup-node:
Wrong number of values returned to continuation (expected 2)
Looks like it ran into the replace syntax and didn't parse it correctly?
https://golang.org/ref/mod#go-mod-file
I sort of wonder if the `git-fetch` portion of go packages should be
something like `git-fetch-and-restore-go-modules` Maybe something like
`go mod vendor` could be used an the hash would be calculated on that?
I'm not familiar enough with the internals of go modules, but I'm not
really seeing the value in generating a bunch of package metadata on all
the module dependencies.
next prev parent reply other threads:[~2021-01-11 6:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 7:01 packaging a golang package Timmy Douglas
2021-01-08 18:33 ` raingloom
2021-01-08 19:01 ` Leo Famulari
2021-01-10 0:32 ` Timmy Douglas
2021-01-11 6:09 ` Timmy Douglas [this message]
2021-01-17 13:31 ` Helio Machado
2021-01-25 7:18 ` Timmy Douglas
2021-01-25 20:49 ` Francois.JOULAUD--- via
2021-01-25 23:38 ` Helio Machado
2021-01-27 14:31 ` Katherine Cox-Buday
2021-01-28 8:18 ` Timmy Douglas
2021-01-28 10:32 ` adfeno--- via
2021-01-28 16:03 ` Ludovic Courtès
2021-01-28 21:10 ` adfeno--- via
-- strict thread matches above, loose matches on Subject: below --
2021-01-20 3:27 jgart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bldw0ztb.fsf@timmydouglas.com \
--to=mail@timmydouglas.com \
--cc=0x2b3bfa0@gmail.com \
--cc=cox.katherine.e@gmail.com \
--cc=help-guix@gnu.org \
--cc=leo@famulari.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).