public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: William Hubbs <williamh@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: gyakovlev@gentoo.org
Subject: Re: [gentoo-dev] rfc: go 1.13 and go modules
Date: Tue, 10 Sep 2019 13:31:01 -0500	[thread overview]
Message-ID: <20190910183101.GA3825@whubbs1.dev.av1.gaikai.org> (raw)
In-Reply-To: <20190909232142.GA500@whubbs1.dev.av1.gaikai.org>

[-- Attachment #1: Type: text/plain, Size: 2198 bytes --]

On Mon, Sep 09, 2019 at 06:21:42PM -0500, William Hubbs wrote:
> On Mon, Sep 09, 2019 at 03:57:18PM -0700, Georgy Yakovlev wrote:
> > On Monday, September 9, 2019 2:46:16 PM PDT William Hubbs wrote:
> > > On Tue, Sep 10, 2019 at 08:35:17AM +1200, Kent Fredric wrote:
> > > > On Mon, 9 Sep 2019 12:34:18 -0500
> > > > 
> > > > William Hubbs <williamh@gentoo.org> wrote:
> > > > > There is another option I want to try which is adding "go mod vendor" to
> > > > > src_unpack for go packages.
> > > > 
> > > > Is it infeasible to write a tool that you execute as a maintainer, that
> > > > simulates what "go mod vendor" would do, but instead emits a list of
> > > > entries for SRC_URI, and then have an eclass or something construct the
> > > > vendor dir from those?
> > > > 
> > > > That's what is available for rust stuff.
> > > 
> > > I'm not sure how feasible something like that is.
> > > 
> > > $ go list -m all
> > > 
> > > will list the dependencies of a module, but that doesn't look like it
> > > can be translated into src_uri format.
> > > 
> > > You would basically have to parse go.mod exactly the way upstream does
> > > it and come up with a way to download the correct versions of the
> > > source.
> > > 
> > > William
> > 
> > check mail-client/aerc ebuild.
> > I use "go list -m all" and manually format EGO_VENDOR string which will be 
> > translated into SRC_URI by eclass.
> > tool is certainly possible and should be quite easy to implement.
> > some manual editing will still be needed if dealing with forked packages/
> > repos, but looks pretty straightforward.
> > This is very similar approach to cargo ebuilds and it supports offline 
> > installs, PM checksumming and does not require packaging every single go 
> > dependency as a package.
> 
> Ok, I took a quick look at this.
> We will need another eclass similar to the golang-vcs-snapshot eclass,
> but it doesn't need to mess with GOPATH since GOPATH isn't used by go
> modules.
> 
> I will also look at go list -m all and see what comes out of it.

It looks like we would also need a way to honor the GOPROXY environment
variable as well.

Thanks,

William

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2019-09-10 18:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 17:34 [gentoo-dev] rfc: go 1.13 and go modules William Hubbs
2019-09-09 18:19 ` Zac Medico
2019-09-09 18:41   ` William Hubbs
2019-09-09 19:00     ` Michał Górny
2019-09-09 22:10       ` William Hubbs
2019-09-09 22:25         ` Alec Warner
2019-09-09 18:54   ` Michael Orlitzky
2019-09-09 19:04     ` William Hubbs
2019-09-09 19:00 ` Ulrich Mueller
2019-09-09 20:35 ` Kent Fredric
2019-09-09 21:46   ` William Hubbs
2019-09-09 22:57     ` Georgy Yakovlev
2019-09-09 23:21       ` William Hubbs
2019-09-10 18:31         ` William Hubbs [this message]
2019-09-10 18:58           ` Kent Fredric
2019-09-10  1:15     ` Kent Fredric

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190910183101.GA3825@whubbs1.dev.av1.gaikai.org \
    --to=williamh@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=gyakovlev@gentoo.org \
    /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