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 <willi...@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: signature.asc
Description: Digital signature

Reply via email to