diff options
author | Michael Matloob <matloob@golang.org> | 2022-06-15 14:24:12 -0400 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2022-09-19 17:01:15 +0000 |
commit | 73c38f226e15e218411d87a05c878f087ad89455 (patch) | |
tree | eda7973096d621c5f2fd896552e373447d577fe6 /doc | |
parent | 0857633f8b4ca4b28aad160d1dd1dbb1fe5a4d7d (diff) | |
download | go-git-73c38f226e15e218411d87a05c878f087ad89455.tar.gz |
cmd/go: clear GOPATH from build context when importing from module
In module mode, we shouldn't handle packages under GOPATH any
differently from other packages. Clear GOPATH from the build context
before Importing to ensure that.
Fixes #37015.
Change-Id: I0203e25013716bca346fd4a67d80f1d05bbaea77
Reviewed-on: https://go-review.googlesource.com/c/go/+/412476
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/go1.20.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/go1.20.html b/doc/go1.20.html index 71850129c7..abdc684d54 100644 --- a/doc/go1.20.html +++ b/doc/go1.20.html @@ -47,6 +47,17 @@ Do not send CLs removing the interior tags from such phrases. TODO: <a href="https://go.dev/issue/45454">https://go.dev/issue/45454</a>: provide build tags for architecture environment variables </p> +<p><!-- https://go.dev/issue/37015 --> + When the main module is located within <code>GOPATH/src</code>, + <code>go</code> <code>install</code> no longer installs libraries for + non-<code>main</code> packages to <code>GOPATH/pkg</code>, + and <code>go</code> <code>list</code> no longer reports a <code>Target</code> + field for such packages. (In module mode, compiled packages are stored in the + <a href="https://pkg.go.dev/cmd/go#hdr-Build_and_test_caching">build cache</a> + only, but <a href="https://go.dev/issue/37015">a bug</a> had caused + the <code>GOPATH</code> install targets to unexpectedly remain in effect.) +</p> + <h3 id="vet">Vet</h3> <p><!-- https://go.dev/issue/48801, CL 354010 --> |