Gentoo Archives: gentoo-dev

From: yac <yac@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] dev-lang/go
Date: Wed, 19 Feb 2014 11:36:50
Message-Id: 20140219123422.702e5210@gentoo.org
In Reply to: Re: [gentoo-dev] dev-lang/go by William Hubbs
1 On Sat, 15 Feb 2014 16:44:09 -0600
2 William Hubbs <williamh@g.o> wrote:
3
4 > On Sat, Feb 15, 2014 at 12:48:44AM +0100, yac wrote:
5 > > On Fri, 14 Feb 2014 11:02:49 -0500
6 > > Emery Hemingway <emery@×××××××.net> wrote:
7 > > > The default GOROOT that go looks at for base libraries seems to be
8 > > > compiled in so this should be pretty easy, like python but
9 > > > simplier.
10 > >
11 > > I'm not sure what you are trying to solve here. Afaik GOROOT is
12 > > used to determine where to install and it can be overriden from env.
13 >
14 > Not overridden, but extended. See go help gopath.
15 >
16 > > > An eclass could look at a GO_MINIMUM variable and install for each
17 > > > version go that is present and matches.
18 > >
19 > > It might be good idea to learn from others who'd been through this
20 > > and I think the new python eclasses are good ones, going with
21 > > something like PYTHON_TARGETS array (GOLANG_TARGETS ?)
22 >
23 > I would prefer go_targets if this becomes an issue,
24
25 golang is more search friendly
26
27 > but it isn't at
28 > this point because there is only one target, go1, and we do not know
29 > if there will be a go2 or not.
30
31 There still are different compilers at least, even if changing minor
32 version would be a non-issue. But I'm not familiar with those, I think
33 those are used for compiling for other than the supported archs (iirc
34 only x86 and x86_64)
35
36 > > > Dropping old versions of go
37 > > > will be easy because linking wont break, and new releases should
38 > > > be forwards compatible.
39 > >
40 > > So far yes I think but I guess that may be quite different with in
41 > > the future with >1.x, and "should be" so there may be corner cases
42 > > where the user does need to use earlier version.
43 >
44 > Highly unlikely in the context of go1, and again, we don't know if
45 > there is going to even be a go2 or not. The only reason there will be
46 > a go2 is if there needs to be a change at the source level which can
47 > only be done in a backward incompatible way.
48 >
49 > The question really should be, do we want a system-wide workspace to
50 > store third-party libraries [1]?
51 > and if so, where do we put it -- maybe /usr/lib/go-gentoo should exist
52 > along side /usr/lib/go?
53
54 I assume you are talking about thirdparty packages installed by
55 portage, not by localy/manually by user. Well, without the system-wide
56 workspace to store the libraries, this whole go eclass would be kinda
57 pointless, no?
58
59 Currently /usr/lib/go/gentoo is used and I see no reason to change it.
60
61 >
62 > The catch would be that every time you upgrade dev-lang/go, everything
63 > stored in /usr/lib/go-gentoo has to be recompiled because there is no
64 > guarantee that the libraries we have there are compatible with each
65 > minor release of go1, only the source.
66 >
67 > Then, the executables we have in /usr/bin will still run, but it would
68 > be good to rebuild them as well to get the new libraries linked into
69 > them.
70 >
71 > If we had a work space in, say, /usr/lib/go-gentoo, we could leave the
72 > executables in there and symlink them to /usr/bin. If we did that, it
73 > would be easy for a user to rebuild everything in the workspace for
74 > the new go by doing
75 >
76 > emerge /usr/lib/go-gentoo/bin
77
78 Good idea.
79
80 > Thoughts?
81 >
82 > William
83 >
84 > [1] http://golang.org/doc/code.html
85
86
87
88 ---
89 Jan Matějka | Gentoo Developer
90 https://gentoo.org | Gentoo Linux
91 GPG: A33E F5BC A9F6 DAFD 2021 6FB6 3EBF D45B EEB6 CA8B

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] dev-lang/go William Hubbs <williamh@g.o>