We used to put a rebuilding barrier between GOPATHs, so that if you had GOPATH=dir1:dir2 and you had "p" in dir1/src/p and "q" in dir2/src/q, with "p" importing "q", then when you ran 'go install p', it would see that it was working in dir1 and (since nothing from dir2 was explicitly mentioned) would assume that everything in dir2 is up-to-date, provided it is built at all. This has the confusing behavior that if "q" hasn't been built ever, then if you update sources in q and run 'go install p', the right thing happens (q is rebuilt and then p), but after that, if you update sources in q and run 'go install p', nothing happens: the installed q is assumed up-to-date. People using code conventions with multiple GOPATH entries (for example, with commands in one place and libraries in another, or vendoring conventions that try to avoid rewriting import paths) run into this without realizing it and end up with incorrect build results. The original motivation here was to avoid rebuild standard packages since a system-installed GOROOT might be unwritable. The change introduced to separate GOROOT also separated individual GOPATH entries. Later changes added a different, more aggressive earlier shortcut for GOROOT in release settings, so the code here is now only applying to (and confusing) multiple GOPATH entries. Remove it. Fixes #10509. Change-Id: I687a3baa81eff4073b0d67f9acbc5a3ab192eda5 Reviewed-on: https://go-review.googlesource.com/9155 Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
|---|---|---|
| api | ||
| doc | ||
| lib/time | ||
| misc | ||
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
| favicon.ico | ||
| robots.txt | ||
README.md
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Please note that we do not use pull requests.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
--
Binary Distribution Notes
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.
