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