1 |
On Sat, Feb 15, 2014 at 12:48:44AM +0100, yac wrote: |
2 |
> On Fri, 14 Feb 2014 11:02:49 -0500 |
3 |
> Emery Hemingway <emery@×××××××.net> wrote: |
4 |
> > The default GOROOT that go looks at for base libraries seems to be |
5 |
> > compiled in so this should be pretty easy, like python but simplier. |
6 |
> |
7 |
> I'm not sure what you are trying to solve here. Afaik GOROOT is used to |
8 |
> determine where to install and it can be overriden from env. |
9 |
|
10 |
Not overridden, but extended. See go help gopath. |
11 |
|
12 |
> > An eclass could look at a GO_MINIMUM variable and install for each |
13 |
> > version go that is present and matches. |
14 |
> |
15 |
> It might be good idea to learn from others who'd been through this and |
16 |
> I think the new python eclasses are good ones, going with something |
17 |
> like PYTHON_TARGETS array (GOLANG_TARGETS ?) |
18 |
|
19 |
I would prefer go_targets if this becomes an issue, but it isn't at |
20 |
this point because there is only one target, go1, and we do not know if |
21 |
there will be a go2 or not. |
22 |
|
23 |
> > Dropping old versions of go |
24 |
> > will be easy because linking wont break, and new releases should be |
25 |
> > forwards compatible. |
26 |
> |
27 |
> So far yes I think but I guess that may be quite different with in the |
28 |
> future with >1.x, and "should be" so there may be corner cases where the |
29 |
> user does need to use earlier version. |
30 |
|
31 |
Highly unlikely in the context of go1, and again, we don't know if there |
32 |
is going to even be a go2 or not. The only reason there will be a go2 is |
33 |
if there needs to be a change at the source level which can only be done |
34 |
in a backward incompatible way. |
35 |
|
36 |
The question really should be, do we want a system-wide workspace to |
37 |
store third-party libraries [1]? |
38 |
and if so, where do we put it -- maybe /usr/lib/go-gentoo should exist |
39 |
along side /usr/lib/go? |
40 |
|
41 |
The catch would be that every time you upgrade dev-lang/go, everything |
42 |
stored in /usr/lib/go-gentoo has to be recompiled because there is no |
43 |
guarantee that the libraries we have there are compatible with each |
44 |
minor release of go1, only the source. |
45 |
|
46 |
Then, the executables we have in /usr/bin will still run, but it would |
47 |
be good to rebuild them as well to get the new libraries linked into |
48 |
them. |
49 |
|
50 |
If we had a work space in, say, /usr/lib/go-gentoo, we could leave the |
51 |
executables in there and symlink them to /usr/bin. If we did that, it |
52 |
would be easy for a user to rebuild everything in the workspace for the |
53 |
new go by doing |
54 |
|
55 |
emerge /usr/lib/go-gentoo/bin |
56 |
|
57 |
Thoughts? |
58 |
|
59 |
William |
60 |
|
61 |
[1] http://golang.org/doc/code.html |